automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.11-1


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.11-1834-gd8422c9
Date: Tue, 31 Jan 2012 10:31:14 +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=d8422c9488564396d19f7bda0318829e735f9a5a

The branch, ng/master has been updated
       via  d8422c9488564396d19f7bda0318829e735f9a5a (commit)
       via  a0a4ca7d023f85185031ae5f8cbf2dd9102fd073 (commit)
       via  691492e130659a3a3520c6d99028e9820165d1b0 (commit)
       via  aa8a4ca784a1474f1934441b3381b52de1d35038 (commit)
       via  b28e10c58e822365d441d267bfbad41e74a9cb75 (commit)
       via  e38f31ff96a725e55d1feb31cb53c85dc45c93b7 (commit)
       via  8ac4902c3536b8af4a132e16c982bc864bd1f3cb (commit)
       via  3c66523fe55c94b19b5b26e0eae1c8de1d47d0cd (commit)
       via  a6c171136d2086f6c4bc4a50d1771c0e1b58ba10 (commit)
       via  2a2f57fc8b5a10d82c6797b62b2c9244144c300e (commit)
       via  41404a8feb40b1d5853a45e6f8306daee6dc6607 (commit)
       via  ef20e28bf3b966bf4f0358099f38b70a30c12755 (commit)
       via  25d3adb1b25132d5051dd97dacc707d2f3375a90 (commit)
       via  e508e09d3837c029daf8cd86d7f8925df7872389 (commit)
       via  0da744996cbdf4eab047cd524d76b93d6a483d4a (commit)
       via  32cde2a4722d25ad41e5ae2e33d43ceb2c6f4a90 (commit)
       via  925c6bdd0a3f3672edf88e5bad83d099424f4230 (commit)
       via  8727266749d30460457e997723b51151ca29fc76 (commit)
       via  0436a1ed2c44b9e8b3c8f2f049e06bfac4969d3e (commit)
       via  d55b9302515d68c178259048df592f0a80d1d67d (commit)
       via  be0a696aac24a55f8281e9585c87a14138206eb5 (commit)
       via  53339f86ceb32ff98b1ccfb05539645cb7e641fe (commit)
       via  b6c3ed5e0debbeb47c4316afb62e8415ed76f26f (commit)
       via  af5f9390a4fe3268944823ab0f3ac5af4fcf8bb0 (commit)
       via  49c9194035b60d89c9204dab9e3be27058ba832e (commit)
       via  5060920b1390bedaef7c0a4269b306bf7fa19799 (commit)
       via  bff57e68f5376806e75ef004708dbd76a5540f58 (commit)
       via  6bb56e40bd31baa2488f0975e9d03e69ba7e963e (commit)
      from  4b80b05c22b13e99499c2e96ca67653779b9c27a (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 -----------------------------------------------------------------
commit d8422c9488564396d19f7bda0318829e735f9a5a
Author: Stefano Lattarini <address@hidden>
Date:   Sat Jan 28 09:05:19 2012 +0100

    [ng] general: GNU make doesn't support the '.MAKE' special target
    
    The '.MAKE' special target can be used on NetBSD make to ensure
    that the recipes for the targets declared as its dependencies are
    executed also with "make -n".  This special target does not work
    with GNU make though, so it's pointless to use it.  To obtain a
    similar effect on GNU make, one can either prepend a recipe with
    the '+' modifier, or use the string '$(MAKE)' somewhere in the
    recipe text).
    
    * syntax-checks.mk (sc_no_dotmake_target): New syntax check,
    ensuring we don't use the '.MAKE' special target.
    (syntax_check_rules): Add it.
    * lib/am/install.am: Don't use the '.MAKE' target.
    * lib/am/subdirs.am: Likewise.
    * contrib/multilib/multilib.am: Likewise.
    * contrib/check-html.am: Likewise.
    * automake.in: Likewise.

commit a0a4ca7d023f85185031ae5f8cbf2dd9102fd073
Author: Stefano Lattarini <address@hidden>
Date:   Tue Jan 31 11:20:58 2012 +0100

    [ng] maintcheck: fix real and spurious warnings
    
    * tests/conffile-leading-dot.test ($required): Remove "GNUmake".
    * tests/gmake-vars.test: Use 'AUTOMAKE_run' instead of redirecting
    the automake stderr by hand.  Use "$MAKE", not bare "make".
    * Makefile.am, doc/Makefile.am, tests/Makefile.am,
    contrib/check-html.am: Don't use '$(AM_MAKEFLAGS)' in recursive
    make invocations.

commit 691492e130659a3a3520c6d99028e9820165d1b0
Merge: aa8a4ca 3c66523
Author: Stefano Lattarini <address@hidden>
Date:   Tue Jan 31 10:59:28 2012 +0100

    Merge branch 'master' into ng/master
    
    * master:
      ar-lib: ignore the verbose modifier instead of erroring out
      scripts: cherry-pick recent changes from master
      maintcheck: fix real and spurious warnings
      maintcheck: take advantage of some GNU make features
      build: require GNU make in order to run the maintainer checks
      maintcheck: refactor rules checking '*.am' files
      tests: do not assume the object file extension is .o
      tests: fetch the 'compile' script for subdir objects
      tests: fetch the 'ar-lib' script for archiver usage
      tests: avoid spurious failure of 'transform2.test' on Cygwin
      tests: avoid spurious failure of deleted-am.test with FreeBSD make
      tests: avoid possibly undeserved PASS from check8.test
      tests: work around MinGW/MSYS issue in fd redirections
      warnings: more precise category and message for one warning
      release: revamp rules to tag and upload the releases
      amversion: add missing dependency
      hacking: update advice w.r.t. synced files
      hacking: don't reference ChangeLog anymore
      tests: add missing dependency for some 'ar-lib*.test' tests
    
    + Extra edits:
    
    * Makefile.am: Move maintainer checks that are in 'ng/master' and
    not in 'master' from here ...
    * syntax-checks.mk: ... to this file.  Similarly, delete maintainer
    checks that have been obsoleted in 'ng/master'.  Also, prefer use
    of '$(ams)' over '$(srcdir)/lib/am/*.am' where possible.
    * tests/suffix8.tap: Remove new workaround for VPATH rewrites, since
    those are not performed by GNU make.

commit aa8a4ca784a1474f1934441b3381b52de1d35038
Author: Stefano Lattarini <address@hidden>
Date:   Thu Jan 26 13:13:03 2012 +0100

    [ng] deptrack: remove obsolescent comments
    
    * lib/am/depcomp2.am: Remove some comments describing the why and
    the how of the verbosity and organization of the recipes.  Since we
    are heavily refactoring and re-organizing the code, such comments
    are doomed to get out-of-sync with the new layout and/or behaviour
    of the code.  If the need arises, we will re-introduce an updated
    version of the comments in a future changeset.
    And since we are at it, improve another unrelated comment.

commit b28e10c58e822365d441d267bfbad41e74a9cb75
Author: Stefano Lattarini <address@hidden>
Date:   Wed Jan 25 22:18:32 2012 +0100

    [ng] deptrack: simplify by assuming more GNU make semantics
    
    GNU make supports a "laxer" variant of the 'include' directive that,
    when passed non-existing files, simply ignores them instead of
    complaining and erroring out.  The use of this directive allows us
    to simplify the code for automake dependency tracking yet a little
    more.
    
    * NG-NEWS: Update.
    * automake.in (handle_single_transform): Don't try anymore to emit
    explicit dependencies ensuring that each $(DEPDIR) is always created
    before any compilation command that might require it.  The relevant
    compile rules in 'depend2.am' will take care of this directly.
    (handle_languages): Use "-include", not "include", to include the
    '.Po' files generated by the automatic dependency tracking support.
    Don't define anymore the makefile variable 'am__depfiles_maybe',
    that is now superfluous.  Accordingly, ...
    * lib/am/configure.am (%MAKEFILE%): ... don't pass its contents to
    the 'config.status' invocation anymore.
    * lib/am/depend2.am: In all the relevant compile rules, take care
    of creating the $(DEPDIR) directory if it doesn't already exists.
    * m4/depout.m4: Delete this file, in particular removing ...
    (AM_OUTPUT_DEPENDENCY_COMMANDS, _AM_OUTPUT_DEPENDENCY_COMMANDS):
    ... these macros.
    * doc/automake.texi (Private Macros): Remove reference to deleted
    macro 'AM_OUTPUT_DEPENDENCY_COMMANDS'.
    * m4/depend.m4 (_AM_DEPENDENCIES): Don't AC_REQUIRE the deleted
    macro 'AM_OUTPUT_DEPENDENCY_COMMANDS' anymore.
    * m4/Makefile.am (dist_automake_ac_DATA): Don't list the deleted
    file 'depout.m4' anymore.
    * tests/depend.test: Adjust grepping checks.
    * tests/depend4.test: Likewise.
    * tests/exsource.test: Likewise.
    * tests/subobj11c.test: Likewise.
    * tests/subobj11a.test: Adjust: we must now run "make", not only
    config.status, in order to create the $(DEPDIR).
    * tests/depend5.test: Remove, it's obsolete now.
    * tests/depend6.test: Likewise.
    * tests/postproc.test: Likewise.
    * tests/pr243.test: Likewise.
    * tests/pr266.test: Likewise.
    * tests/list-of-tests.mk: Update.
    * tests/Makefile.am (XFAIL_TESTS): Remove 'depcomp-recover.test':
    this test passes now.

commit e38f31ff96a725e55d1feb31cb53c85dc45c93b7
Author: Stefano Lattarini <address@hidden>
Date:   Thu Jan 26 11:24:23 2012 +0100

    [ng] deptrack: refactoring for "fastdep" mode
    
    * lib/am/depcomp2.am: Use more GNU make capabilities in the rules
    implementing fast dependency tracking.  This change nicely reduce
    the size and complexity of the existing code.
    * automake.in (handle_languages): Simplify accordingly.

commit 8ac4902c3536b8af4a132e16c982bc864bd1f3cb
Author: Stefano Lattarini <address@hidden>
Date:   Wed Jan 25 22:18:04 2012 +0100

    [ng] deptrack: increase testsuite coverage
    
    This will be useful in the soon-to-appear refactoring to the code
    supporting automatic dependency tracking.
    
    * tests/depcomp-recover.test: New test, still xfailing.
    * tests/Makefile.am (XFAIL_TESTS): Add it.
    * tests/depcomp-shuffle.sh: New helper script, sourced by ...
    * tests/depcomp-shuffle-so.test, tests/depcomp-shuffle-vpath.test,
    * tests/depcomp-shuffle.test, tests/depcomp-shuffle-so-vpath.test:
    ... these new tests.
    * tests/list-of-tests.mk: Add all the new tests.
    * tests/gen-testsuite-part ($deps_extractor[depcomp_shuffle]): Also
    compute dependencies for the new tests.

-----------------------------------------------------------------------

Summary of changes:
 tests/pm/Version3.pl => GNUmakefile                |   11 +-
 HACKING                                            |   34 +-
 Makefile.am                                        |  731 ++------------------
 NG-NEWS                                            |    6 +
 automake.in                                        |   62 +--
 configure.ac                                       |    1 +
 contrib/check-html.am                              |    5 +-
 contrib/multilib/multilib.am                       |    9 +-
 doc/Makefile.am                                    |   10 +-
 doc/automake.texi                                  |    1 -
 lib/Makefile.am                                    |    4 +-
 lib/am/configure.am                                |    6 +-
 lib/am/depend2.am                                  |   84 +--
 lib/am/install.am                                  |    8 +-
 lib/am/subdirs.am                                  |    1 -
 lib/ar-lib                                         |    3 +-
 m4/Makefile.am                                     |    3 +-
 m4/depend.m4                                       |    1 -
 m4/depout.m4                                       |   73 --
 syntax-checks.mk                                   |  656 ++++++++++++++++++
 tests/CheckListOfTests.am                          |    5 +-
 tests/Makefile.am                                  |    2 +-
 tests/check8.test                                  |   13 +-
 tests/conffile-leading-dot.test                    |   61 ++
 tests/deleted-am.test                              |    4 +-
 tests/depcomp-recover.test                         |  112 +++
 .../depcomp-shuffle-sub-vpath.test                 |   26 +-
 .../Makefile.am => tests/depcomp-shuffle-sub.test  |   26 +-
 .../depcomp-shuffle-vpath.test                     |   26 +-
 tests/depcomp-shuffle.sh                           |  177 +++++
 contrib/Makefile.am => tests/depcomp-shuffle.test  |   26 +-
 tests/depend.test                                  |    2 +-
 tests/depend4.test                                 |    2 +-
 tests/depend5.test                                 |   77 --
 tests/depend6.test                                 |   45 --
 tests/exsource.test                                |    2 +-
 tests/gen-testsuite-part                           |    5 +
 tests/gmake-vars.test                              |    5 +-
 tests/libobj10.test                                |    6 +-
 tests/libobj19.test                                |    4 +-
 tests/list-of-tests.mk                             |   12 +-
 ...test => parallel-tests-fd-redirect-exeext.test} |   51 +-
 tests/parallel-tests-fd-redirect.test              |   59 +--
 tests/postproc.test                                |   49 --
 tests/pr243.test                                   |   58 --
 tests/pr266.test                                   |   47 --
 tests/specflg7.test                                |    8 +-
 tests/specflg8.test                                |    7 +-
 tests/subobj11a.test                               |    1 +
 tests/subobj11c.test                               |    2 +-
 tests/substref.test                                |    5 +-
 tests/suffix8.tap                                  |    2 +
 tests/transform2.test                              |   16 +-
 53 files changed, 1311 insertions(+), 1341 deletions(-)
 copy tests/pm/Version3.pl => GNUmakefile (79%)
 delete mode 100644 m4/depout.m4
 create mode 100644 syntax-checks.mk
 create mode 100755 tests/conffile-leading-dot.test
 create mode 100755 tests/depcomp-recover.test
 copy contrib/Makefile.am => tests/depcomp-shuffle-sub-vpath.test (72%)
 mode change 100644 => 100755
 copy contrib/Makefile.am => tests/depcomp-shuffle-sub.test (72%)
 mode change 100644 => 100755
 copy contrib/Makefile.am => tests/depcomp-shuffle-vpath.test (72%)
 mode change 100644 => 100755
 create mode 100755 tests/depcomp-shuffle.sh
 copy contrib/Makefile.am => tests/depcomp-shuffle.test (72%)
 mode change 100644 => 100755
 delete mode 100755 tests/depend5.test
 delete mode 100755 tests/depend6.test
 copy tests/{parallel-tests-fd-redirect.test => 
parallel-tests-fd-redirect-exeext.test} (67%)
 delete mode 100755 tests/postproc.test
 delete mode 100755 tests/pr243.test
 delete mode 100755 tests/pr266.test

diff --git a/tests/pm/Version3.pl b/GNUmakefile
similarity index 79%
copy from tests/pm/Version3.pl
copy to GNUmakefile
index 7c45dc9..134e743 100644
--- a/tests/pm/Version3.pl
+++ b/GNUmakefile
@@ -1,4 +1,6 @@
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# Maintainer makefile for Automake.  Requires GNU make.
+
+# 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
@@ -13,8 +15,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/>.
 
-# prog_error due to invalid $REQUIRED.
-
-use Automake::Version;
-
-Automake::Version::check ('1.2.3', '');
+include ./Makefile
+include $(srcdir)/syntax-checks.mk
diff --git a/HACKING b/HACKING
index 96cb3a9..5420fbc 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
 
@@ -201,8 +197,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
 
@@ -211,8 +205,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.
 
@@ -243,8 +237,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 793f261..868253f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -33,6 +33,8 @@ AUTOMAKESOURCES = automake.in aclocal.in
 TAGS_FILES = $(AUTOMAKESOURCES)
 
 EXTRA_DIST = \
+  GNUmakefile \
+  syntax-checks.mk \
   HACKING \
   NG-NEWS \
   ChangeLog.96 \
@@ -55,16 +57,16 @@ install-exec-hook:
        @for p in $(bin_SCRIPTS); do \
          f="`echo $$p|sed '$(transform)'`"; \
          fv="$$f-$(APIVERSION)"; \
-         rm -f $(DESTDIR)$(bindir)/$$fv; \
-         echo " $(LN) $(DESTDIR)$(bindir)/$$f $(DESTDIR)$(bindir)/$$fv"; \
-         $(LN) $(DESTDIR)$(bindir)/$$f $(DESTDIR)$(bindir)/$$fv; \
+         rm -f "$(DESTDIR)$(bindir)/$$fv"; \
+         echo " $(LN) '$(DESTDIR)$(bindir)/$$f' '$(DESTDIR)$(bindir)/$$fv'"; \
+         $(LN) "$(DESTDIR)$(bindir)/$$f" "$(DESTDIR)$(bindir)/$$fv"; \
        done
 
 uninstall-hook:
        @for p in $(bin_SCRIPTS); do \
          f="`echo $$p|sed '$(transform)'`"; \
          fv="$$f-$(APIVERSION)"; \
-         rm -f $(DESTDIR)$(bindir)/$$fv; \
+         rm -f "$(DESTDIR)$(bindir)/$$fv"; \
        done
 
 
@@ -104,11 +106,11 @@ INSTALL: lib/INSTALL
 
 # Run the testsuite with the installed aclocal and automake.
 installcheck-local:
-       am_running_installcheck=yes $(MAKE) $(AM_MAKEFLAGS) check
+       am_running_installcheck=yes $(MAKE) check
 
 # Convenience proxy target for the test suites.
 recheck:
-       $(am__cd) tests && $(MAKE) $(AM_MAKEFLAGS) $@
+       $(am__cd) tests && $(MAKE) $@
 .PHONY: recheck
 
 ################################################################
@@ -169,7 +171,7 @@ check-coverage-run recheck-coverage-run: all
        $(mkinstalldirs) $(PERL_COVERAGE_DB)
        PERL5OPT="$$PERL5OPT $(PERL_COVERAGE_FLAGS)"; export PERL5OPT; \
        WANT_NO_THREADS=yes; export WANT_NO_THREADS; unset AUTOMAKE_JOBS; \
-       $(MAKE) $(AM_MAKEFLAGS) `echo $@ | sed 's/-coverage-run//'`
+       $(MAKE) `echo $@ | sed 's/-coverage-run//'`
 
 check-coverage-report:
        @if test ! -d "$(PERL_COVERAGE_DB)"; then \
@@ -182,10 +184,9 @@ check-coverage-report:
 # We don't use direct dependencies here because we'd like to be able
 # to invoke the report even after interrupted check-coverage.
 check-coverage: check-coverage-run
-       $(MAKE) $(AM_MAKEFLAGS) check-coverage-report
-
+       $(MAKE) check-coverage-report
 recheck-coverage: recheck-coverage-run
-       $(MAKE) $(AM_MAKEFLAGS) check-coverage-report
+       $(MAKE) check-coverage-report
 
 clean-coverage:
        rm -rf "$(PERL_COVERAGE_DB)"
@@ -194,654 +195,66 @@ clean-local: clean-coverage
 .PHONY: check-coverage recheck-coverage check-coverage-run \
        recheck-coverage-run check-coverage-report clean-coverage
 
-# We also have to take into account VPATH builds (where some generated
-# tests might be in `$(builddir)' rather than in `$(srcdir)'), TAP-based
-# tests script (which have a `.tap' extension) and helper scripts used
-# by other test cases (which have a `.sh' extension).
-xtests = \
-  `if test $(srcdir) = .; then \
-     dirs=.; \
-   else \
-     dirs='$(srcdir) .'; \
-   fi; \
-   for d in $$dirs; do \
-     for s in test tap sh; do \
-       ls $$d/tests/*.$$s 2>/dev/null; \
-     done; \
-   done | sort`
-
-# Some simple checks, and then ordinary check.  These are only really
-# guaranteed to work on my machine.
-syntax_check_rules = \
-sc_test_names \
-sc_diff_automake_in_automake \
-sc_diff_aclocal_in_automake \
-sc_perl_syntax \
-sc_no_brace_variable_expansions \
-sc_rm_minus_f \
-sc_no_for_variable_in_macro \
-sc_mkinstalldirs \
-sc_pre_normal_post_install_uninstall \
-sc_perl_no_undef \
-sc_perl_no_split_regex_space \
-sc_cd_in_backquotes \
-sc_cd_relative_dir \
-sc_perl_at_uscore_in_scalar_context \
-sc_perl_local_no_parens \
-sc_perl_local \
-sc_AMDEP_TRUE_in_automake_in \
-sc_tests_no_gmake_requirement \
-sc_tests_no_gmake_checking \
-sc_tests_make_can_chain_suffix_rules \
-sc_no_am_makeflags \
-sc_tests_no_make_e \
-sc_docs_no_make_e \
-sc_make_simple_include \
-sc_tests_make_simple_include \
-sc_tests_obsolete_variables \
-sc_tests_plain_make \
-sc_tests_plain_autoconf \
-sc_tests_plain_autoupdate \
-sc_tests_plain_automake \
-sc_tests_plain_autom4te \
-sc_tests_plain_autoheader \
-sc_tests_plain_autoreconf \
-sc_tests_here_document_format \
-sc_tests_Exit_not_exit \
-sc_tests_automake_fails \
-sc_tests_plain_aclocal \
-sc_tests_plain_perl \
-sc_tests_required_after_defs \
-sc_tests_tap_plan \
-sc_tests_overriding_macros_on_cmdline \
-sc_tests_plain_sleep \
-sc_tests_plain_egrep_fgrep \
-sc_tests_PATH_SEPARATOR \
-sc_tests_logs_duplicate_prefixes \
-sc_tests_makefile_variable_order \
-sc_mkdir_p \
-sc_perl_at_substs \
-sc_unquoted_DESTDIR \
-sc_tabs_in_texi \
-sc_at_in_texi
-
-$(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
-## m4/m4sugar builtin or macro name).
-m4_builtins = \
-  __gnu__ \
-  __unix__ \
-  bpatsubst \
-  bregexp \
-  builtin \
-  changecom \
-  changequote \
-  changeword \
-  debugfile \
-  debugmode \
-  decr \
-  define \
-  defn \
-  divert \
-  divnum \
-  dnl \
-  dumpdef \
-  errprint \
-  esyscmd \
-  eval \
-  format \
-  ifdef \
-  ifelse \
-  include \
-  incr \
-  index \
-  indir \
-  len \
-  m4exit \
-  m4wrap \
-  maketemp \
-  mkstemp \
-  patsubst \
-  popdef \
-  pushdef \
-  regexp \
-  shift \
-  sinclude \
-  substr \
-  symbols \
-  syscmd \
-  sysval \
-  traceoff \
-  traceon \
-  translit \
-  undefine \
-  undivert
-sc_test_names:
-       @m4_builtin_rx=`echo $(m4_builtins) | sed 's/ /|/g'`; \
-        m4_macro_rx="\\<($$m4_builtin_rx)\\>|\\<_?(A[CUMHS]|m4)_"; \
-        if { \
-          for t in $(xtests); do echo $$t; done \
-            | LC_ALL=C grep -E "$$m4_macro_rx"; \
-        }; then \
-          echo "the names of the tests above can be problematic" 1>&2; \
-          echo "Avoid test names that contain names of m4 macros" 1>&2; \
-          exit 1; \
-        fi
-
-## These check avoids accidental configure substitutions in the source.
-## There are exactly 9 lines that should be modified from automake.in to
-## automake, and 10 lines that should be modified from aclocal.in to
-## aclocal; these wors out to 32 and 34 lines of diffs, respectively.
-sc_diff_automake_in_automake:
-       @if test `diff $(srcdir)/automake.in automake | wc -l` -ne 32; then \
-         echo "found too many diffs between automake.in and automake" 1>&2; \
-         diff -c $(srcdir)/automake.in automake; \
-         exit 1; \
-       fi
-sc_diff_aclocal_in_aclocal:
-       @if test `diff $(srcdir)/aclocal.in aclocal | wc -l` -ne 34; then \
-         echo "found too many diffs between aclocal.in and aclocal" 1>&2; \
-         diff -c $(srcdir)/aclocal.in aclocal; \
-         exit 1; \
-       fi
-
-## 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
-
-## expect no instances of '${...}'.  However, $${...} is ok, since that
-## is a shell construct, not a Makefile construct.
-sc_no_brace_variable_expansions:
-       @if grep -F '$${' $(srcdir)/lib/am/[a-z]*.am | \
-              grep -F -v '$$$$'; then \
-         echo "Found too many uses of '\$${' in the lines above." 1>&2; \
-         exit 1;                               \
-       else :; fi
-
-## Make sure `rm' is called with `-f'.
-sc_rm_minus_f:
-       @if grep -v '^#' $(srcdir)/lib/am/[a-z]*.am $(xtests) \
-          | grep -E '\<rm ([^-]|\-[^f ]*\>)'; \
-       then \
-         echo "Suspicious 'rm' invocation." 1>&2; \
-         exit 1;                               \
-       else :; fi
-
-## Never use something like `for file in $(FILES)', this doesn't work
-## if FILES is empty or if it contains shell meta characters (e.g. $ is
-## commonly used in Java filenames).
-sc_no_for_variable_in_macro:
-       @if grep 'for .* in \$$(' $(srcdir)/lib/am/[a-z]*.am; then \
-         echo 'Use "list=$$(mumble); for var in $$$$list".' 1>&2 ; \
-         exit 1; \
-       else :; fi
-
-## Make sure all invocations of mkinstalldirs are correct.
-sc_mkinstalldirs:
-       @if grep -n 'mkinstalldirs' $(srcdir)/lib/am/[a-z]*.am | \
-             grep -F -v '$$(mkinstalldirs)'; then \
-         echo "Found incorrect use of mkinstalldirs in the lines above" 1>&2; \
-         exit 1; \
-       else :; fi
-
-## Make sure all calls to PRE/NORMAL/POST_INSTALL/UNINSTALL
-sc_pre_normal_post_install_uninstall:
-       @if grep -E -n '\((PRE|NORMAL|POST)_(|UN)INSTALL\)' \
-                 $(srcdir)/lib/am/[a-z]*.am | \
-             grep -v ':##' | grep -v ':        @\$$('; then \
-         echo "Found incorrect use of PRE/NORMAL/POST_INSTALL/UNINSTALL in the 
lines above" 1>&2; \
-         exit 1; \
-       else :; fi
-
-## We never want to use "undef", only "delete", but for $/.
-sc_perl_no_undef:
-       @if grep -n -w 'undef ' $(srcdir)/automake.in | \
-             grep -F -v 'undef $$/'; then \
-         echo "Found undef in automake.in; use delete instead" 1>&2; \
-         exit 1; \
-       fi
-
-## We never want split (/ /,...), only split (' ', ...).
-sc_perl_no_split_regex_space:
-       @if grep -n 'split (/ /' $(srcdir)/automake.in; then \
-         echo "Found bad split in the lines above." 1>&2; \
-         exit 1; \
-       fi
-
-## Look for cd within backquotes
-sc_cd_in_backquotes:
-       @if grep -n '^[^#]*` *cd ' $(srcdir)/automake.in \
-             $(srcdir)/lib/am/*.am; then \
-         echo "Consider using \$$(am__cd) in the lines above." 1>&2; \
-         exit 1; \
-       fi
-
-## Look for cd to a relative directory (may be influenced by CDPATH).
-## Skip some known directories that are OK.
-sc_cd_relative_dir:
-       @if grep -n '^[^#]*cd ' $(srcdir)/automake.in \
-             $(srcdir)/lib/am/*.am | \
-             grep -v 'echo.*cd ' | \
-             grep -v 'am__cd =' | \
-             grep -v '^[^#]*cd [./]' | \
-             grep -v '^[^#]*cd \$$(top_builddir)' | \
-             grep -v '^[^#]*cd "\$$\$$am__cwd' | \
-             grep -v '^[^#]*cd \$$(abs' | \
-             grep -v '^[^#]*cd "\$$(DESTDIR)'; then \
-         echo "Consider using \$$(am__cd) in the lines above." 1>&2; \
-         exit 1; \
-       fi
-
-## Using @_ in a scalar context is most probably a programming error.
-sc_perl_at_uscore_in_scalar_context:
-       @if grep -Hn 'address@hidden) ] *= address@hidden' 
$(srcdir)/automake.in; then \
-         echo "Using @_ in a scalar context in the lines above." 1>&2; \
-         exit 1; \
-       fi
-
-## Forbid using parens with `local' to ease counting.
-sc_perl_local_no_parens:
-       @if grep '^[ \t]*local *(' $(srcdir)/automake.in; then \
-         echo "Don't use \`local' with parens: use several \`local' above." 
>&2; \
-         exit 1; \
-       fi
-
-## Allow only few variables to be localized in Automake.
-sc_perl_local:
-       @if egrep -v '^[ \t]*local \$$[_~]( *=|;)' $(srcdir)/automake.in | \
-               grep '^[ \t]*local [^*]'; then \
-         echo "Please avoid \`local'." 1>&2; \
-         exit 1; \
-       fi
-
-## Don't let AMDEP_TRUE substitution appear in automake.in.
-sc_AMDEP_TRUE_in_automake_in:
-       @if grep '@AMDEP''_TRUE@' $(srcdir)/automake.in; then \
-         echo "Don't put AMDEP_TRUE substitution in automake.in" 1>&2; \
-         exit 1; \
-       fi
-
-## Tests should never require GNU make explicitly: automake-ng assumes
-## it unconditionally.
-sc_tests_no_gmake_requirement:
-       @if grep -iE '^ *required=.*\b(gmake|gnumake)\b' \
-         $(xtests) $(srcdir)/tests/defs $(srcdir)/tests/defs-static.in \
-       ; then \
-         echo 'Tests should never require GNU make explicitly.' 1>&2; \
-         exit 1; \
-       fi
-
-## Tests should never check explicitly whether the make program being
-## used in the test suite is indeed GNU make: automake-ng assumes it
-## unconditionally.
-sc_tests_no_gmake_checking:
-       @if grep -E '\b(is|using)_g(nu)?make\b' \
-         $(xtests) $(srcdir)/tests/defs $(srcdir)/tests/defs-static.in \
-       ; then \
-         echo 'Tests should never explicitly check whether $$MAKE' \
-              'is GNU make.' 1>&2; \
-         exit 1; \
-       fi
-
-## GNU make can obviously chain suffix rules, so don't try to check
-## whether this is the case.
-sc_tests_make_can_chain_suffix_rules:
-       @if grep 'chain_suffix_rule' $(xtests); then \
-         echo 'GNU make can implicitly chain suffix rules; tests' \
-              'should just assume that without checking.' 1>&2; \
-         exit 1; \
-       fi
-
-## GNU make supports POSIX-style runtime include directives.
-sc_grep_for_bad_make_include = \
-  if grep -E 'AM_MAKE_INCLUDE|am__(include|quote)' $$files; then \
-    echo 'GNU make supports runtime "include" directive.' 1>&2; \
-    echo 'Neither am__{include,quote} nor AM_MAKE_INCLUDE' \
-         'should be used anymore.' 1>&2; \
-    exit 1; \
+## 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
-sc_tests_make_simple_include: sc_ensure_testsuite_has_run
-       @files=tests/*.log; $(sc_grep_for_bad_make_include)
-sc_make_simple_include:
-       @files=" \
-          $(xtests) \
-          $(srcdir)/lib/am/*.am \
-          $(srcdir)/m4/*.m4 \
-          $(srcdir)/automake.in \
-          $(srcdir)/doc/*.texi \
-          aclocal.m4 \
-          configure \
-        "; \
-        $(sc_grep_for_bad_make_include)
-
-## $(AM_MAKEFLAGS) is obsolete now that we assume GNU make, since it
-## is smart enough to correctly pass the values of macros redefined on
-## the command line to sub-make invocations.
-sc_no_am_makeflags:
-       @files="\
-         $(xtests) \
-         $(srcdir)/lib/am/*.am \
-         $(srcdir)/automake.in \
-         $(srcdir)/doc/*.texi \
-        "; \
-       if grep '\bAM_MAKEFLAGS\b' $$files; then \
-         echo "\$$(AM_MAKEFLAGS) is obsolete, don't use it." 1>&2; \
-         exit 1; \
-       fi
-
-## "make -e" is brittle and unsafe, since it let *all* the environment
-## win over the macro definitions in the Makefiles.  We needed it when
-## we couldn't assume GNU make, but now that the tide has turned, it's
-## better to prohibit it altogether.
-sc_tests_no_make_e:
-       @if grep -E '\$$MAKE\b.* -[a-zA-Z0-9]*e' $(xtests); then \
-         echo "\"make -e\" is brittle, don't use it." 1>&2; \
-         exit 1; \
-       fi
-sc_docs_no_make_e:
-       @if grep '\bmake\b.* -[a-zA-Z0-9]*e' README tests/README; then \
-         echo "Don't advocate the use of \"make -e\" in the manual or" \
-              " in the README files." 1>&2; \
-         exit 1; \
-       fi
-
-## Look out for some obsolete variables.
-sc_tests_obsolete_variables:
-       @vars=" \
-         using_tap \
-         parallel_tests \
-         test_prefer_config_shell \
-         original_AUTOMAKE \
-         original_ACLOCAL \
-       "; \
-       seen=""; \
-       for v in $$vars; do \
-         if grep -E "\b$$v\b" \
-           $(xtests) $(srcdir)/tests/defs \
-           $(srcdir)/tests/defs-static.in \
-         ; then \
-           seen="$$seen $$v"; \
-         fi; \
-       done; \
-       if test -n "$$seen"; then \
-         for v in $$seen; do \
-           echo "Variable '$$v' is obsolete, use 'am_$$v' instead." 1>&2; \
-         done; \
-         exit 1; \
-       else :; fi
-
-## Tests should never call make directly.
-sc_tests_plain_make:
-       @if grep -v '^#' $(xtests) | $(EGREP) ':[       ]*make( |$$)'; then \
-         echo 'Do not run "make" in the above tests.  Use "$$MAKE" instead.' 
1>&2; \
-         exit 1; \
-       fi
-
-## Tests should never call autoconf directly.
-sc_tests_plain_autoconf:
-       @if grep -v '^#' $(xtests) | grep ':[   ]*autoconf\>'; then \
-         echo 'Do not run "autoconf" in the above tests.  Use "$$AUTOCONF" 
instead.' 1>&2; \
-         exit 1; \
-       fi
-
-## Tests should never call autoupdate directly.
-sc_tests_plain_autoupdate:
-       @if grep -v '^#' $(xtests) | grep ':[   ]*autoupdate\>'; then \
-         echo 'Do not run "autoupdate" in the above tests.  Use "$$AUTOUPDATE" 
instead.' 1>&2; \
-         exit 1; \
-       fi
-
-## Tests should never call automake directly.
-sc_tests_plain_automake:
-       @if grep -v '^#' $(xtests) | grep -E ':[        ]*automake\>([^:]|$$)'; 
then \
-         echo 'Do not run "automake" in the above tests.  Use "$$AUTOMAKE" 
instead.' 1>&2;  \
-         exit 1; \
-       fi
-
-## Tests should never call autoheader directly.
-sc_tests_plain_autoheader:
-       @if grep -v '^#' $(xtests) | grep ':[   ]*autoheader\>'; then \
-         echo 'Do not run "autoheader" in the above tests.  Use "$$AUTOHEADER" 
instead.' 1>&2;  \
-         exit 1; \
-       fi
 
-## Tests should never call autoreconf directly.
-sc_tests_plain_autoreconf:
-       @if grep -v '^#' $(xtests) | grep ':[   ]*autoreconf\>'; then \
-         echo 'Do not run "autoreconf" in the above tests.  Use "$$AUTORECONF" 
instead.' 1>&2;  \
-         exit 1; \
-       fi
-
-## Tests should never call autom4te directly.
-sc_tests_plain_autom4te:
-       @if grep -v '^#' $(xtests) | grep ':[   ]*autom4te\>'; then \
-         echo 'Do not run "autom4te" in the above tests.  Use "$$AUTOM4TE" 
instead.' 1>&2;  \
-         exit 1; \
-       fi
-
-## Tests should only use END and EOF for here documents
-## (so that the next test is effective).
-sc_tests_here_document_format:
-       @if grep '<<' $(xtests) | grep -v 'END' | grep -v 'EOF'; then \
-         echo 'Use here documents with "END" and "EOF" only, for 
greppability.' 1>&2; \
-         exit 1; \
-       fi
-
-## Tests should never call exit directly, but use Exit.
-## This is so that the exit status is transported correctly across the 0 trap.
-## Ignore comments, testsuite self tests, and one perl line in ext2.test.
-sc_tests_Exit_not_exit:
-       @found=false; for file in $(xtests); do \
-         case $$file in */self-check-*) continue;; esac; \
-         res=`sed -n -e '/^#/d; /^\$$PERL/d' -e '/<<.*END/,/^END/b' \
-                     -e '/<<.*EOF/,/^EOF/b' -e '/exit [$$0-9]/p' $$file`; \
-         if test -n "$$res"; then \
-           echo "$$file:$$res"; \
-           found=true; \
-         fi; \
-       done; \
-       if $$found; then \
-         echo 'Do not call plain "exit", use "Exit" instead, in above tests.' 
1>&2; \
-         exit 1; \
-       fi
-
-## Use AUTOMAKE_fails when appropriate
-sc_tests_automake_fails:
-       @if grep -v '^#' $(xtests) | grep '\$$AUTOMAKE.*&&.*[eE]xit'; then \
-         echo 'Use AUTOMAKE_fails + grep to catch automake failures in the 
above tests.' 1>&2;  \
-         exit 1; \
-       fi
-
-## Tests should never call aclocal directly.
-sc_tests_plain_aclocal:
-       @if grep -v '^#' $(xtests) | grep ':[   ]*aclocal\>'; then \
-         echo 'Do not run "aclocal" in the above tests.  Use "$$ACLOCAL" 
instead.' 1>&2;  \
-         exit 1; \
-       fi
-
-## Tests should never call perl directly.
-sc_tests_plain_perl:
-       @if grep -v '^#' $(xtests) | grep ':[   ]*perl\>'; then \
-         echo 'Do not run "perl" in the above tests.  Use "$$PERL" instead.' 
1>&2; \
-         exit 1; \
-       fi
-
-## Setting `required' after sourcing `./defs' is a bug.
-sc_tests_required_after_defs:
-       @for file in $(xtests); do \
-         if out=`sed -n '/defs/,$${/required=/p;}' $$file`; test -n "$$out"; 
then \
-           echo 'Do not set "required" after sourcing "defs" in '"$$file: 
$$out" 1>&2; \
-           exit 1; \
-         fi; \
-       done
-
-## TAP-based test scripts should not forget to declare a TAP plan.  In
-## case it is not known in advance how many tests will be run, a "lazy"
-## plan can be used; but its use should be deliberate, explicitly declared
-## with a "plan_ later" call, rather than the result of an oversight.
-## This check helps to ensure this is indeed the case.
-sc_tests_tap_plan:
-       @with_plan=`grep -l '^ *plan_ ' $(srcdir)/tests/*.tap`; \
-        with_plan=`echo $$with_plan`; \
-        ok=:; \
-        for t in $(srcdir)/tests/*.tap; do \
-          case " $$with_plan " in *" $$t "*) continue;; esac; \
-## It's ok for an *auto-generated* test sourcing an hand-written one not
-## to declare a TAP plan: that will be done by the sourced test.
-          case $$t in \
-            *-w.tap) \
-              t2=`echo $$t | sed -e 's|.*/||' -e 's/-w\.tap$$/.tap/'` \
-                && grep -E "^ *\\.  *[^        ]*/$$t2\\b" $$t >/dev/null \
-                && continue || : ;; \
-          esac; \
-          ok=false; echo $$t; \
-        done; \
-        $$ok || { \
-         echo 'The tests above do not declare a TAP plan.' 1>&2; \
-         exit 1; \
-        }
-
-## Never use `sleep 1' to create files with different timestamps.
-## Use `$sleep' instead.  Some filesystems (e.g., Windows') have only
-## a 2sec resolution.
-sc_tests_plain_sleep:
-       @if grep -E '\bsleep +[12345]\b' $(xtests); then \
-         echo 'Do not use "sleep x" in the above tests.  Use "$$sleep" 
instead.' 1>&2; \
-         exit 1; \
-       fi
-
-## fgrep and egrep are not required by POSIX.
-sc_tests_plain_egrep_fgrep:
-       @if grep -E '\b[ef]grep\b' $(xtests) ; then \
-         echo 'Do not use egrep or fgrep in test cases.  Use $$FGREP or 
$$EGREP.' 1>&2; \
-         exit 1; \
-       fi
-       @if grep -E '\b[ef]grep\b' $(srcdir)/lib/am/*.am $(srcdir)/m4/*.m4; 
then \
-         echo 'Do not use egrep or fgrep in the above files, they are not 
portable.' 1>&2; \
-         exit 1; \
-       fi
-
-## Rule to ensure that the testsuite has been run before.  We don't depend on 
`check'
-## here, because that would be very wasteful in the common case.  We could run
-## `make check RECHECK_LOGS=' and avoid toplevel races with 
AM_RECURSIVE_TARGETS.
-## Suggest keeping test directories around for greppability of the Makefile.in 
files.
-sc_ensure_testsuite_has_run:
-       @if test ! -f tests/test-suite.log; then \
-         echo "Run \`env keep_testdirs=yes make check' before 
\`maintainer-check'" >&2; \
-         exit 1; \
-       fi
-.PHONY: sc_ensure_testsuite_has_run
-
-## Ensure our warning and error messages do not contain duplicate 'warning:' 
prefixes.
-## This test actually depends on the testsuite having been run before.
-sc_tests_logs_duplicate_prefixes: sc_ensure_testsuite_has_run
-       @if grep -E '(warning|error):.*(warning|error):' tests/*.log; then \
-         echo 'Duplicate warning/error message prefixes seen in above tests.' 
>&2; \
-         exit 1; \
-       fi
-
-## Ensure variables are listed before rules in Makefile.in files we generate.
-sc_tests_makefile_variable_order: sc_ensure_testsuite_has_run
-       @for file in `find tests -name Makefile.in -print`; do \
-         latevars=`sed -n \
-           -e :x -e 's/#.*//' \
-           -e '/\\\\$$/{' -e N -e 'b x' -e '}' \
-## Literal TAB.
-           -e '1,/^    /d' \
-## Allow @ so we match conditionals.
-           -e '/^ address@hidden,\} *=/p' $$file`; \
-         if test -n "$$latevars"; then \
-           echo 'Ensure variables are expanded before rules' >&2; \
-           echo "Variables are expanded too late in $$file:" >&2; \
-           echo "$$latevars" | sed 's/^/  /' >&2; \
-           exit 1; \
-         fi; \
-       done
-
-## Using `:' as a PATH separator is not portable.
-sc_tests_PATH_SEPARATOR:
-       @if grep -E '\bPATH=.*:.*' $(xtests) ; then \
-         echo "Use \`\$$PATH_SEPARATOR', not \`:', in PATH definitions above." 
1>&2; \
-         exit 1; \
-       fi
-
-sc_mkdir_p:
-       @if grep 'mkdir_p' \
-         $(srcdir)/automake.in \
-         $(srcdir)/lib/am/*.am \
-         $(xtests); \
-       then \
-         echo 'Do not use mkdir_p in the above files, use MKDIR_P.' 1>&2; \
-         exit 1; \
-       fi
-
-## Try to make sure all @...@ substitutions are covered by our
-## substitution rule.
-sc_perl_at_substs:
-       @if test `grep -E 'address@hidden@' aclocal | wc -l` -ne 0; then \
-         echo "Unresolved @...@ substitution in aclocal" 1>&2; \
-         exit 1; \
-       fi
-       @if test `grep -E 'address@hidden@' automake | wc -l` -ne 0; then \
-         echo "Unresolved @...@ substitution in automake" 1>&2; \
-         exit 1; \
-       fi
-
-sc_unquoted_DESTDIR:
-       @if grep -E "[^\'\"]\\\$$\(DESTDIR" $(srcdir)/lib/am/*.am; then \
-         echo 'Suspicious unquoted DESTDIR uses.' 1>&2 ; \
-         exit 1; \
-       fi
-
-sc_tabs_in_texi:
-       @if grep '      ' $(srcdir)/doc/automake.texi; then \
-         echo 'Do not use tabs in the manual.' 1>&2; \
-         exit 1; \
-       fi
-
-sc_at_in_texi:
-       @if grep -E '(address@hidden|^)@([       address@hidden|$$)' 
$(srcdir)/doc/automake.texi; \
-       then \
-         echo 'Unescaped @.' 1>&2; \
-         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.
-       $(am__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;; \
+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)
+       $(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) 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
@@ -857,14 +270,14 @@ autodiffs:
             rev=$$1 dir=$$2 \
               && echo "$@: will get files from revision $$rev" \
               && git clone -q --depth 1 "$$am_gitdir" tmp \
-              && cd tmp \
+              && $(am__cd) tmp \
               && git checkout -q "$$rev" \
               && echo "$@: bootstrapping $$rev" \
               && $(SHELL) ./bootstrap \
               && echo "$@: copying files from $$rev" \
               && makefile_ins=`find . -name Makefile.in` \
               && (tar cf - configure aclocal.m4 $$makefile_ins) | \
-                 (cd .. && cd "$$dir" && tar xf -) \
+                 (cd .. && $(am__cd) "$$dir" && tar xf -) \
               && cd .. \
               && rm -rf tmp; \
         }; \
@@ -874,7 +287,7 @@ autodiffs:
           && git --git-dir="$$am_gitdir" describe $$NEW_COMMIT >/dev/null \
           && rm -rf $$outdir \
           && mkdir $$outdir \
-          && cd $$outdir \
+          && $(am__cd) $$outdir \
           && mkdir new old \
           && get_autofiles_from_rev $$OLD_COMMIT old \
           && get_autofiles_from_rev $$NEW_COMMIT new \
@@ -920,7 +333,7 @@ WGET_SV_GIT_AC = $(WGET) 
'http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=b
 WGET_SV_GIT_GL = $(WGET) 
'http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;hb=HEAD;f='
 
 ## Files that we fetch and which we compare against.
-## FIXME should be a lot more here
+## The 'lib/COPYING' file must still be synced by hand.
 FETCHFILES = \
 INSTALL \
 config.guess \
diff --git a/NG-NEWS b/NG-NEWS
index 621cd86..ab7ee2e 100644
--- a/NG-NEWS
+++ b/NG-NEWS
@@ -14,6 +14,12 @@ Automatic dependency tracking support
   the internal m4 macro 'AM_MAKE_INCLUDE' and AC_SUBST'd variables
   'am__include' and 'am__quote' have been removed.
 
+* The makefile fragments files containing automatically computed
+  dependency information are created at make runtime by Makefile
+  recipes, not at configure time by config.status.  Accordingly,
+  the special config.status argument 'depfiles' is not supported
+  anymore.
+
 Silent rules
 ============
 
diff --git a/automake.in b/automake.in
index 087c3c0..0f7dadf 100644
--- a/automake.in
+++ b/automake.in
@@ -1300,7 +1300,6 @@ sub handle_languages
            &define_variable ('depcomp',
                              "\$(SHELL) $am_config_aux_dir/depcomp",
                              INTERNAL);
-           &define_variable ('am__depfiles_maybe', 'depfiles', INTERNAL);
 
            require_conf_file ("$am_file.am", FOREIGN, 'depcomp');
 
@@ -1312,7 +1311,7 @@ sub handle_languages
            $output_rules .= "\n";
            foreach my $iter (@deplist)
            {
-               $output_rules .= subst ('AMDEP_TRUE') . "include $iter\n";
+               $output_rules .= subst ('AMDEP_TRUE') . "-include $iter\n";
            }
 
            # Compute the set of directories to remove in distclean-depend.
@@ -1325,7 +1324,6 @@ sub handle_languages
     else
     {
        &define_variable ('depcomp', '', INTERNAL);
-       &define_variable ('am__depfiles_maybe', '', INTERNAL);
     }
 
     my %done;
@@ -1385,27 +1383,6 @@ sub handle_languages
            # This is not used by depend2.am.
            my $der_ext = (&{$lang->output_extensions} ($ext))[0];
 
-           # When we output an inference rule like `.c.o:' we
-           # have two cases to consider: either subdir-objects
-           # is used, or it is not.
-           #
-           # In the latter case the rule is used to build objects
-           # in the current directory, and dependencies always
-           # go into `./$(DEPDIR)/'.  We can hard-code this value.
-           #
-           # In the former case the rule can be used to build
-           # objects in sub-directories too.  Dependencies should
-           # go into the appropriate sub-directories, e.g.,
-           # `sub/$(DEPDIR)/'.  The value of this directory
-           # needs to be computed on-the-fly.
-           #
-           # DEPBASE holds the name of this directory, plus the
-           # basename part of the object file (extensions Po, TPo,
-           # Plo, TPlo will be added later as appropriate).  It is
-           # either hardcoded, or a shell variable (`$depbase') that
-           # will be computed by the rule.
-           my $depbase =
-             option ('subdir-objects') ? '$$depbase' : '$(DEPDIR)/$*';
            $output_rules .=
              file_contents ($rule_file,
                             new Automake::Location,
@@ -1414,7 +1391,6 @@ sub handle_languages
 
                             'DERIVED-EXT' => $der_ext,
 
-                            DEPBASE   => $depbase,
                             BASE      => '$*',
                             SOURCE    => '$<',
                             SOURCEFLAG => $sourceflags{$ext} || '',
@@ -1472,20 +1448,12 @@ sub handle_languages
            # We _need_ `-o' for per object rules.
            my $output_flag = $lang->output_flag || '-o';
 
-           my $depbase = dirname ($obj);
-           $depbase = ''
-               if $depbase eq '.';
-           $depbase .= '/'
-               unless $depbase eq '';
-           $depbase .= '$(DEPDIR)/' . basename ($obj);
-
            $output_rules .=
              file_contents ($rule_file,
                             new Automake::Location,
                             %transform,
                             GENERIC   => 0,
 
-                            DEPBASE   => $depbase,
                             BASE      => $obj,
                             SOURCE    => $source,
                             SOURCEFLAG => $sourceflags{$srcext} || '',
@@ -1951,13 +1919,6 @@ sub handle_single_transform ($$$$$%)
                }
 
                push (@dep_list, require_build_directory ($directory));
-
-               # If we're generating dependencies, we also want
-               # to make sure that the appropriate subdir of the
-               # .deps directory is created.
-               push (@dep_list,
-                     require_build_directory ($directory . '/$(DEPDIR)'))
-                 unless option 'no-dependencies';
            }
 
            &pretty_print_rule ($object . ':', "\t", @dep_list)
@@ -3613,7 +3574,6 @@ sub handle_tags
                          . "\tdone\n");
        push (@tag_deps, 'tags-recursive');
        &depend ('.PHONY', 'tags-recursive');
-       &depend ('.MAKE', 'tags-recursive');
 
        $output_rules .= ("ctags-recursive:\n"
                          . "\tlist=\'\$(SUBDIRS)\'; for subdir in \$\$list; do 
\\\n"
@@ -3624,7 +3584,6 @@ sub handle_tags
                          . "\tdone\n");
        push (@ctag_deps, 'ctags-recursive');
        &depend ('.PHONY', 'ctags-recursive');
-       &depend ('.MAKE', 'ctags-recursive');
 
        $output_rules .= ("cscopelist-recursive:\n"
                          . "\tlist=\'\$(SUBDIRS)\'; for subdir in \$\$list; do 
\\\n"
@@ -3635,7 +3594,6 @@ sub handle_tags
                          . "\tdone\n");
        push (@cscope_deps, 'cscopelist-recursive');
        &depend ('.PHONY', 'cscopelist-recursive');
-       &depend ('.MAKE', 'cscopelist-recursive');
     }
 
     if (&saw_sources_p (1)
@@ -4539,7 +4497,6 @@ sub handle_all ($)
                        . "\n\t\$(MAKE) "
                        . (var ('SUBDIRS') ? 'all-recursive' : 'all-am')
                        . "\n\n");
-        depend ('.MAKE', 'all');
       }
     else
       {
@@ -4574,14 +4531,12 @@ sub do_check_merge_target ()
         {
          pretty_print_rule ("\t\$(MAKE)", "\t  ",
                             @check);
-         depend ('.MAKE', 'check-am');
        }
     }
   if (@check_tests)
     {
       pretty_print_rule ("\t\$(MAKE)", "\t  ",
                         @check_tests);
-      depend ('.MAKE', 'check-am');
     }
 
   depend '.PHONY', 'check', 'check-am';
@@ -4592,8 +4547,6 @@ sub do_check_merge_target ()
                       : '')
                    . (var ('SUBDIRS') ? 'check-recursive' : 'check-am')
                    . "\n");
-  depend ('.MAKE', 'check')
-    if var ('BUILT_SOURCES');
 }
 
 # handle_clean ($MAKEFILE)
@@ -4710,7 +4663,6 @@ sub handle_factored_dependencies
     {
       if (user_phony_rule "$_-hook")
        {
-         depend ('.MAKE', "$_-am");
          register_action("$_-am",
                          ("address@hidden(NORMAL_INSTALL)\n"
                           . "\t\$(MAKE) $_-hook"));
@@ -4736,9 +4688,8 @@ sub handle_factored_dependencies
       # to append dependencies.  This would not work if Automake
       # refrained from defining its own .PHONY target as it does
       # with other overridden targets.
-      # Likewise for `.MAKE'.
       my @undefined_conds = (TRUE,);
-      if ($_ ne '.PHONY' && $_ ne '.MAKE')
+      if ($_ ne '.PHONY')
        {
          @undefined_conds =
            Automake::Rule::define ($_, 'internal',
@@ -5126,10 +5077,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)
        {
diff --git a/configure.ac b/configure.ac
index aea14ad..e461e17 100644
--- a/configure.ac
+++ b/configure.ac
@@ -328,6 +328,7 @@ AC_CONFIG_FILES([
   m4/Makefile
   tests/Makefile
 ])
+AC_CONFIG_LINKS([GNUmakefile:GNUmakefile])
 AC_CONFIG_LINKS([tests/defs:tests/defs])
 AC_CONFIG_FILES([tests/aclocal-${APIVERSION}:tests/aclocal.in],
                 [chmod +x tests/aclocal-${APIVERSION}],
diff --git a/contrib/check-html.am b/contrib/check-html.am
index 1526976..9bba391 100644
--- a/contrib/check-html.am
+++ b/contrib/check-html.am
@@ -49,11 +49,10 @@ mostlyclean-check-html:
 # And expect check to fail.
 check-html recheck-html:
        @target=`echo $@ | sed 's/-html$$//'`; \
-       rv=0; $(MAKE) $(AM_MAKEFLAGS) $$target || rv=$$?; \
+       rv=0; $(MAKE) $$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; \
+       $(MAKE) $(TEST_SUITE_HTML) TEST_LOGS= || exit 4; \
        exit $$rv
 
 .PHONY: check-html recheck-html
-.MAKE: check-html recheck-html
diff --git a/contrib/multilib/multilib.am b/contrib/multilib/multilib.am
index d829d73..5549d44 100644
--- a/contrib/multilib/multilib.am
+++ b/contrib/multilib/multilib.am
@@ -1,8 +1,7 @@
 ## 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.
+## Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
 ## This Makefile.in is free software; the Free Software Foundation
 ## gives unlimited permission to copy and/or distribute it,
 ## with or without modifications, as long as this notice is preserved.
@@ -35,8 +34,8 @@ distclean-multi:
 maintainer-clean-multi:
        $(MULTICLEAN) DO=maintainer-clean multi-clean # $(MAKE)
 
-.MAKE .PHONY: all-multi clean-multi distclean-multi install-am \
-             install-multi maintainer-clean-multi mostlyclean-multi
+.PHONY: all-multi clean-multi distclean-multi install-am \
+        install-multi maintainer-clean-multi mostlyclean-multi
 
 install-exec-local: install-multi
 
diff --git a/doc/Makefile.am b/doc/Makefile.am
index ee5c439..71c7a6a 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -71,10 +71,10 @@ 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
-       $(AM_V_GEN)abs_top_builddir=`cd '$(top_builddir)' && pwd` && \
-       PATH="$$abs_top_builddir/tests$(PATH_SEPARATOR)$$PATH" && \
+       $(AM_V_GEN): && \
+       PATH="$(abs_top_builddir)/tests$(PATH_SEPARATOR)$$PATH" && \
        export PATH && \
-       cd $(srcdir)/amhello && \
+       $(am__cd) $(srcdir)/amhello && \
        ACLOCAL=aclocal-$(APIVERSION) && export ACLOCAL && \
        AUTOMAKE=automake-$(APIVERSION) && export AUTOMAKE && \
        AUTOCONF='$(am_AUTOCONF)' && export AUTOCONF && \
@@ -84,7 +84,7 @@ $(srcdir)/amhello-1.0.tar.gz: $(amhello_sources) 
$(top_srcdir)/configure.ac
        AUTOUPDATE='$(am_AUTOUPDATE)' && export AUTOUPDATE && \
        $(am_AUTORECONF) -vfi && \
        ./configure && \
-       $(MAKE) $(AM_MAKEFLAGS) distcheck && \
-       $(MAKE) $(AM_MAKEFLAGS) distclean && \
+       $(MAKE) distcheck && \
+       $(MAKE) distclean && \
        rm -rf $(amhello_configury) && \
        mv amhello-1.0.tar.gz ..
diff --git a/doc/automake.texi b/doc/automake.texi
index 15af185..0ef66da 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -4169,7 +4169,6 @@ skip this section!
 @item _AM_DEPENDENCIES
 @itemx AM_SET_DEPDIR
 @itemx AM_DEP_TRACK
address@hidden AM_OUTPUT_DEPENDENCY_COMMANDS
 These macros are used to implement Automake's automatic dependency
 tracking scheme.  They are called automatically by Automake when
 required, and there should be no need to invoke them manually.
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 2e6445b..a7c8295 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -51,8 +51,8 @@ EXTRA_DIST = gnupload gitlog-to-changelog
 install-data-hook:
        @$(POST_INSTALL)
        @for prog in $(dist_script_DATA); do \
-         echo " chmod +x $(DESTDIR)$(scriptdir)/$$prog"; \
-         chmod +x $(DESTDIR)$(scriptdir)/$$prog; \
+         echo " chmod +x '$(DESTDIR)$(scriptdir)/$$prog'"; \
+         chmod +x "$(DESTDIR)$(scriptdir)/$$prog"; \
        done
 
 ## `test -x' is not portable.  So we use Perl instead.  If Perl
diff --git a/lib/am/configure.am b/lib/am/configure.am
index 3876740..23ee7b8 100644
--- a/lib/am/configure.am
+++ b/lib/am/configure.am
@@ -77,10 +77,8 @@ endif %?TOPDIR_P%
 ?TOPDIR_P?         $(SHELL) ./config.status;; \
 ?!TOPDIR_P?        cd $(top_builddir) && $(MAKE) am--refresh;; \
          *) \
-## FIXME: $(am__depfiles_maybe) lets us re-run the rule to create the
-## .P files.  Ideally we wouldn't have to do this by hand.
-           echo ' cd $(top_builddir) && $(SHELL) ./config.status 
%CONFIG-MAKEFILE% $(am__depfiles_maybe)'; \
-           cd $(top_builddir) && $(SHELL) ./config.status %CONFIG-MAKEFILE% 
$(am__depfiles_maybe);; \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status 
%CONFIG-MAKEFILE%'; \
+           cd $(top_builddir) && $(SHELL) ./config.status %CONFIG-MAKEFILE%;; \
        esac;
 
 ## Avoid the "deleted header file" problem for the dependencies.
diff --git a/lib/am/depend2.am b/lib/am/depend2.am
index 9a193a4..cc2f85c 100644
--- a/lib/am/depend2.am
+++ b/lib/am/depend2.am
@@ -1,6 +1,7 @@
 ## automake - create Makefile.in from Makefile.am
 ## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-## 2003, 2004, 2006, 2008, 2009, 2010  Free Software Foundation, Inc.
+## 2003, 2004, 2006, 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
@@ -28,50 +29,34 @@
 ##   the `if AMDEP' chunk is prefix with @AMDEP_TRUE@ just like for any
 ##   other configure-time conditional.
 ##
-## We do likewise for %FASTDEP%; this expands to an ordinary
-## configure-time conditional.  %FASTDEP% is used to speed up the
-## common case of building a package with gcc 3.x.  In this case we
-## can skip the use of depcomp and easily inline the dependency
-## tracking.
+## We do likewise for %FASTDEP%; this expands to an ordinary configure-time
+## conditional.  %FASTDEP% is used to speed up the common case of building
+## a package with gcc >= 3.x.  In this case we can skip the use of depcomp
+## and easily inline the dependency tracking.
 
-## Verbosity of FASTDEP rules
-## --------------------------
-## (1) Some people want to see what happens during make.  They think
-##     @-commands are evil because hiding things hinders debugging.
-## (2) Other people want to see only the important commands--those that
-##     may produce diagnostics, such as compiler invocations.  They
-##     do not care about build details such as dependency generation
-##     (the if/then/else machinery in FASTDEP rules).  Their point is
-##     that it is hard to spot diagnostics in a verbose output.
-## (3) Other people want `make -s' to work as expected: silently.
-##     This way they can spot any diagnostic really easily.
-##
-## The second point suggests we hide rules with @ and that we `echo'
-## only the relevant parts.  However this goes against the two others.
-## There are regular complaints about this on the mailing list, but
-## it's hard to please everybody.  On April 2003, William Fulton (from
-## clan (3)) and Karl Berry (from clan (2)) agreed that folding the
-## compile rules so that they are output on a single line (instead of 5)
-## would be a good compromise.  Actually we use two lines rather than one,
-## because this way %SOURCE% is always located at the end of the first
-## line and is therefore easier to spot.  (We need an extra line when
-## depbase is used.)
+if %?FIRST%
+?SUBDIROBJ?am__depdir = $(dir $@)/$(DEPDIR)
+?!SUBDIROBJ?am__depdir = $(DEPDIR)
+## FIXME: more precise in the removal of the suffix?
+am__depbase = $(am__depdir)/$(basename $(notdir $@))
+## Avoid useless forks when possible.
+am__ensure_depdir = test -d $(am__depdir) || $(MKDIR_P) $(am__depdir)
+endif %?FIRST%
 
 if %?NONLIBTOOL%
 ?GENERIC?%EXT%.o:
 ?!GENERIC?%OBJ%: %SOURCE%
 if %FASTDEP%
+       %SILENT%$(am__ensure_depdir)
 ## In fast-dep mode, we can always use -o.
+       %VERBOSE%%COMPILE% -MT $@ -MD -MP -MF $(am__depbase).Tpo %-c% -o $@ \
+?GENERIC?      %SOURCEFLAG%%SOURCE%
 ## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
-?!GENERIC?     %VERBOSE%%COMPILE% -MT %OBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% -o 
%OBJ% %SOURCEFLAG%`test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
-?!GENERIC?     %SILENT%$(am__mv) %DEPBASE%.Tpo %DEPBASE%.Po
-?GENERIC??!SUBDIROBJ?  %VERBOSE%%COMPILE% -MT %OBJ% -MD -MP -MF %DEPBASE%.Tpo 
%-c% -o %OBJ% %SOURCEFLAG%%SOURCE%
-?GENERIC??!SUBDIROBJ?  %SILENT%$(am__mv) %DEPBASE%.Tpo %DEPBASE%.Po
-?GENERIC??SUBDIROBJ?   %VERBOSE%depbase=`echo %OBJ% | sed 
's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
-?GENERIC??SUBDIROBJ?   %COMPILE% -MT %OBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% -o 
%OBJ% %SOURCEFLAG%%SOURCE% &&\
-?GENERIC??SUBDIROBJ?   $(am__mv) %DEPBASE%.Tpo %DEPBASE%.Po
+?!GENERIC?     %SOURCEFLAG%`test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
+       %SILENT%$(am__mv) $(am__depbase).Tpo $(am__depbase).Po
 else !%FASTDEP%
 if %AMDEP%
+       %SILENT%$(am__ensure_depdir)
        %VERBOSE%source='%SOURCE%' object='%OBJ%' libtool=no @AMDEPBACKSLASH@
        DEPDIR=$(DEPDIR) $(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@
 endif %AMDEP%
@@ -88,17 +73,19 @@ endif !%FASTDEP%
 ?GENERIC?%EXT%.obj:
 ?!GENERIC?%OBJOBJ%: %SOURCE%
 if %FASTDEP%
+       %SILENT%$(am__ensure_depdir)
 ## In fast-dep mode, we can always use -o.
+       %VERBOSE%%COMPILE% -MT $@ -MD -MP -MF $(am__depbase).Tpo %-c% -o $@ \
+?GENERIC?      %SOURCEFLAG%`$(CYGPATH_W) '%SOURCE%'`
 ## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
-?!GENERIC?     %VERBOSE%%COMPILE% -MT %OBJOBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% 
-o %OBJOBJ% %SOURCEFLAG%`if test -f '%SOURCE%'; then $(CYGPATH_W) '%SOURCE%'; 
else $(CYGPATH_W) '$(srcdir)/%SOURCE%'; fi`
-?!GENERIC?     %SILENT%$(am__mv) %DEPBASE%.Tpo %DEPBASE%.Po
-?GENERIC??!SUBDIROBJ?  %VERBOSE%%COMPILE% -MT %OBJOBJ% -MD -MP -MF 
%DEPBASE%.Tpo %-c% -o %OBJOBJ% %SOURCEFLAG%`$(CYGPATH_W) '%SOURCE%'`
-?GENERIC??!SUBDIROBJ?  %SILENT%$(am__mv) %DEPBASE%.Tpo %DEPBASE%.Po
-?GENERIC??SUBDIROBJ?   %VERBOSE%depbase=`echo %OBJ% | sed 
's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
-?GENERIC??SUBDIROBJ?   %COMPILE% -MT %OBJOBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% 
-o %OBJOBJ% %SOURCEFLAG%`$(CYGPATH_W) '%SOURCE%'` &&\
-?GENERIC??SUBDIROBJ?   $(am__mv) %DEPBASE%.Tpo %DEPBASE%.Po
+?!GENERIC?     %SOURCEFLAG%`if test -f '%SOURCE%';  \
+?!GENERIC?       then $(CYGPATH_W) '%SOURCE%'; \
+?!GENERIC?       else $(CYGPATH_W) '$(srcdir)/%SOURCE%'; \
+?!GENERIC?     fi`
+       %SILENT%$(am__mv) $(am__depbase).Tpo $(am__depbase).Po
 else !%FASTDEP%
 if %AMDEP%
+       %SILENT%$(am__ensure_depdir)
        %VERBOSE%source='%SOURCE%' object='%OBJOBJ%' libtool=no @AMDEPBACKSLASH@
        DEPDIR=$(DEPDIR) $(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@
 endif %AMDEP%
@@ -117,17 +104,16 @@ if %?LIBTOOL%
 ?GENERIC?%EXT%.lo:
 ?!GENERIC?%LTOBJ%: %SOURCE%
 if %FASTDEP%
+       %SILENT%$(am__ensure_depdir)
 ## In fast-dep mode, we can always use -o.
+       %VERBOSE%%LTCOMPILE% -MT $@ -MD -MP -MF $(am__depbase).Tpo %-c% -o $@ \
+?GENERIC?      %SOURCEFLAG%%SOURCE%
 ## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
-?!GENERIC?     %VERBOSE%%LTCOMPILE% -MT %LTOBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% 
-o %LTOBJ% %SOURCEFLAG%`test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
-?!GENERIC?     %SILENT%$(am__mv) %DEPBASE%.Tpo %DEPBASE%.Plo
-?GENERIC??!SUBDIROBJ?  %VERBOSE%%LTCOMPILE% -MT %LTOBJ% -MD -MP -MF 
%DEPBASE%.Tpo %-c% -o %LTOBJ% %SOURCEFLAG%%SOURCE%
-?GENERIC??!SUBDIROBJ?  %SILENT%$(am__mv) %DEPBASE%.Tpo %DEPBASE%.Plo
-?GENERIC??SUBDIROBJ?   %VERBOSE%depbase=`echo %OBJ% | sed 
's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
-?GENERIC??SUBDIROBJ?   %LTCOMPILE% -MT %LTOBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% 
-o %LTOBJ% %SOURCEFLAG%%SOURCE% &&\
-?GENERIC??SUBDIROBJ?   $(am__mv) %DEPBASE%.Tpo %DEPBASE%.Plo
+?!GENERIC?     %SOURCEFLAG%`test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
+       %SILENT%$(am__mv) $(am__depbase).Tpo $(am__depbase).Plo
 else !%FASTDEP%
 if %AMDEP%
+       %SILENT%$(am__ensure_depdir)
        %VERBOSE%source='%SOURCE%' object='%LTOBJ%' libtool=yes @AMDEPBACKSLASH@
        DEPDIR=$(DEPDIR) $(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@
 endif %AMDEP%
diff --git a/lib/am/install.am b/lib/am/install.am
index d556b87..68ce600 100644
--- a/lib/am/install.am
+++ b/lib/am/install.am
@@ -63,11 +63,7 @@ install-data: install-data-am
 uninstall: uninstall-am
 endif !%?SUBDIRS%
 
-if %?maybe_BUILT_SOURCES%
-.MAKE: install
-endif %?maybe_BUILT_SOURCES%
-
-.MAKE .PHONY: install-am
+.PHONY: install-am
 install-am: all-am
        @$(MAKE) install-exec-am install-data-am
 
@@ -81,7 +77,7 @@ install-am: all-am
 ## If you ever modify this, keep in mind that INSTALL_PROGRAM is used
 ## in subdirectories, so never set it to a value relative to the top
 ## directory.
-.MAKE .PHONY: install-strip
+.PHONY: install-strip
 install-strip:
 ## Beware that there are two variables used to install programs:
 ##   INSTALL_PROGRAM is used for ordinary *_PROGRAMS
diff --git a/lib/am/subdirs.am b/lib/am/subdirs.am
index 26d176b..5e6d578 100644
--- a/lib/am/subdirs.am
+++ b/lib/am/subdirs.am
@@ -24,7 +24,6 @@ AM_RECURSIVE_TARGETS += $(RECURSIVE_TARGETS:-recursive=) \
   $(RECURSIVE_CLEAN_TARGETS:-recursive=)
 
 .PHONY: $(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS)
-.MAKE: $(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS)
 
 # This directory's subdirectories are mostly independent; you can cd
 # into them and run `make' without going through this Makefile.
diff --git a/lib/ar-lib b/lib/ar-lib
index 85d028f..c0286a4 100755
--- a/lib/ar-lib
+++ b/lib/ar-lib
@@ -2,7 +2,7 @@
 # Wrapper for Microsoft lib.exe
 
 me=ar-lib
-scriptversion=2012-01-04.17; # UTC
+scriptversion=2012-01-30.22; # UTC
 
 # Copyright (C) 2010, 2012 Free Software Foundation, Inc.
 # Written by Peter Rosin <address@hidden>.
@@ -165,6 +165,7 @@ do
     r*) replace=yes ;;
     c*) create=yes  ;;
     u*)             ;; # TODO: don't ignore the update modifier
+    v*)             ;; # TODO: don't ignore the verbose modifier
     *)
       func_error "unknown action specified"
       ;;
diff --git a/m4/Makefile.am b/m4/Makefile.am
index 3c5df60..0e8788c 100644
--- a/m4/Makefile.am
+++ b/m4/Makefile.am
@@ -27,7 +27,6 @@ ccstdc.m4 \
 cond.m4 \
 cond-if.m4 \
 depend.m4 \
-depout.m4 \
 dmalloc.m4 \
 gcj.m4 \
 header.m4 \
@@ -67,7 +66,7 @@ EXTRA_DIST = acdir/.placeholder 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
+$(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' \
diff --git a/m4/depend.m4 b/m4/depend.m4
index be9c511..a5ca9be 100644
--- a/m4/depend.m4
+++ b/m4/depend.m4
@@ -27,7 +27,6 @@
 # just rely on AC_PROG_CC.
 AC_DEFUN([_AM_DEPENDENCIES],
 [AC_REQUIRE([AM_SET_DEPDIR])dnl
-AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
 AC_REQUIRE([AM_DEP_TRACK])dnl
 
 m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
diff --git a/m4/depout.m4 b/m4/depout.m4
deleted file mode 100644
index 81d8174..0000000
--- a/m4/depout.m4
+++ /dev/null
@@ -1,73 +0,0 @@
-# Generate code to set up dependency tracking.              -*- Autoconf -*-
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2012
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-#serial 6
-
-# _AM_OUTPUT_DEPENDENCY_COMMANDS
-# ------------------------------
-AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[{
-  # Autoconf 2.62 quotes --file arguments for eval, but not when files
-  # are listed without --file.  Let's play safe and only enable the eval
-  # if we detect the quoting.
-  case $CONFIG_FILES in
-  *\'*) eval set x "$CONFIG_FILES" ;;
-  *)   set x $CONFIG_FILES ;;
-  esac
-  shift
-  for mf
-  do
-    # Strip MF so we end up with the name of the file.
-    mf=`echo "$mf" | sed -e 's/:.*$//'`
-    # Check whether this is an Automake generated Makefile or not.
-    # We used to match only the files named `Makefile.in', but
-    # some people rename them; so instead we look at the file content.
-    # Grep'ing the first line is not enough: some people post-process
-    # each Makefile.in and add a new line on top of each file to say so.
-    # Grep'ing the whole file is not good either: AIX grep has a line
-    # limit of 2048, but all sed's we know have understand at least 4000.
-    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 
2>&1; then
-      dirpart=`AS_DIRNAME("$mf")`
-    else
-      continue
-    fi
-    # Extract the definition of DEPDIR from the Makefile without
-    # running `make'.
-    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-    test -z "$DEPDIR" && continue
-    # Find all dependency output files, they are included files with
-    # $(DEPDIR) in their names.  We invoke sed twice because it is the
-    # simplest approach to changing $(DEPDIR) to its actual value in the
-    # expansion.
-    for file in `sed -n 's/^include \(.*(DEPDIR).*\)$/\1/p' <"$mf" \
-                 | sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
-      # Make sure the directory exists.
-      test -f "$dirpart/$file" && continue
-      fdir=`AS_DIRNAME(["$file"])`
-      AS_MKDIR_P([$dirpart/$fdir])
-      # echo "creating $dirpart/$file"
-      echo '# dummy' > "$dirpart/$file"
-    done
-  done
-}
-])# _AM_OUTPUT_DEPENDENCY_COMMANDS
-
-
-# AM_OUTPUT_DEPENDENCY_COMMANDS
-# -----------------------------
-# This macro should only be invoked once -- use via AC_REQUIRE.
-#
-# This code is only required when automatic dependency tracking
-# is enabled.  FIXME.  This creates each `.P' file that we will
-# need in order to bootstrap the dependency handling code.
-AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
-[AC_CONFIG_COMMANDS([depfiles],
-     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
-     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
-])
diff --git a/syntax-checks.mk b/syntax-checks.mk
new file mode 100644
index 0000000..1b5e08c
--- /dev/null
+++ b/syntax-checks.mk
@@ -0,0 +1,656 @@
+# Maintainer checks for Automake.  Requires GNU make.
+
+# Copyright (C) 2012 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# We also have to take into account VPATH builds (where some generated
+# tests might be in `$(builddir)' rather than in `$(srcdir)'), TAP-based
+# tests script (which have a `.tap' extension) and helper scripts used
+# by other test cases (which have a `.sh' extension).
+xtests := $(shell \
+  if test $(srcdir) = .; then \
+     dirs=.; \
+   else \
+     dirs='$(srcdir) .'; \
+   fi; \
+   for d in $$dirs; do \
+     for s in test tap sh; do \
+       ls $$d/tests/*.$$s 2>/dev/null; \
+     done; \
+   done | sort)
+
+ams := $(shell find $(srcdir) -name '*.am')
+
+# Some simple checks, and then ordinary check.  These are only really
+# guaranteed to work on my machine.
+syntax_check_rules = \
+sc_test_names \
+sc_diff_automake_in_automake \
+sc_diff_aclocal_in_aclocal \
+sc_perl_syntax \
+sc_no_brace_variable_expansions \
+sc_rm_minus_f \
+sc_no_for_variable_in_macro \
+sc_mkinstalldirs \
+sc_pre_normal_post_install_uninstall \
+sc_perl_no_undef \
+sc_perl_no_split_regex_space \
+sc_cd_in_backquotes \
+sc_cd_relative_dir \
+sc_perl_at_uscore_in_scalar_context \
+sc_perl_local_no_parens \
+sc_perl_local \
+sc_AMDEP_TRUE_in_automake_in \
+sc_tests_no_gmake_requirement \
+sc_tests_no_gmake_checking \
+sc_tests_make_can_chain_suffix_rules \
+sc_no_dotmake_target \
+sc_no_am_makeflags \
+sc_tests_no_make_e \
+sc_docs_no_make_e \
+sc_make_simple_include \
+sc_tests_make_simple_include \
+sc_tests_obsolete_variables \
+sc_tests_plain_make \
+sc_tests_plain_autoconf \
+sc_tests_plain_autoupdate \
+sc_tests_plain_automake \
+sc_tests_plain_autom4te \
+sc_tests_plain_autoheader \
+sc_tests_plain_autoreconf \
+sc_tests_here_document_format \
+sc_tests_Exit_not_exit \
+sc_tests_automake_fails \
+sc_tests_plain_aclocal \
+sc_tests_plain_perl \
+sc_tests_required_after_defs \
+sc_tests_tap_plan \
+sc_tests_plain_sleep \
+sc_tests_plain_egrep_fgrep \
+sc_tests_PATH_SEPARATOR \
+sc_tests_logs_duplicate_prefixes \
+sc_tests_makefile_variable_order \
+sc_mkdir_p \
+sc_perl_at_substs \
+sc_unquoted_DESTDIR \
+sc_tabs_in_texi \
+sc_at_in_texi
+
+$(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:
+       $(MAKE) -C tests $@
+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
+## m4/m4sugar builtin or macro name).
+m4_builtins = \
+  __gnu__ \
+  __unix__ \
+  bpatsubst \
+  bregexp \
+  builtin \
+  changecom \
+  changequote \
+  changeword \
+  debugfile \
+  debugmode \
+  decr \
+  define \
+  defn \
+  divert \
+  divnum \
+  dnl \
+  dumpdef \
+  errprint \
+  esyscmd \
+  eval \
+  format \
+  ifdef \
+  ifelse \
+  include \
+  incr \
+  index \
+  indir \
+  len \
+  m4exit \
+  m4wrap \
+  maketemp \
+  mkstemp \
+  patsubst \
+  popdef \
+  pushdef \
+  regexp \
+  shift \
+  sinclude \
+  substr \
+  symbols \
+  syscmd \
+  sysval \
+  traceoff \
+  traceon \
+  translit \
+  undefine \
+  undivert
+sc_test_names:
+       @m4_builtin_rx=`echo $(m4_builtins) | sed 's/ /|/g'`; \
+        m4_macro_rx="\\<($$m4_builtin_rx)\\>|\\<_?(A[CUMHS]|m4)_"; \
+        if { \
+          for t in $(xtests); do echo $$t; done \
+            | LC_ALL=C grep -E "$$m4_macro_rx"; \
+        }; then \
+          echo "the names of the tests above can be problematic" 1>&2; \
+          echo "Avoid test names that contain names of m4 macros" 1>&2; \
+          exit 1; \
+        fi
+
+## These check avoids accidental configure substitutions in the source.
+## There are exactly 9 lines that should be modified from automake.in to
+## automake, and 10 lines that should be modified from aclocal.in to
+## aclocal; these wors out to 32 and 34 lines of diffs, respectively.
+sc_diff_automake_in_automake:
+       @if test `diff $(srcdir)/automake.in automake | wc -l` -ne 32; then \
+         echo "found too many diffs between automake.in and automake" 1>&2; \
+         diff -c $(srcdir)/automake.in automake; \
+         exit 1; \
+       fi
+sc_diff_aclocal_in_aclocal:
+       @if test `diff $(srcdir)/aclocal.in aclocal | wc -l` -ne 34; then \
+         echo "found too many diffs between aclocal.in and aclocal" 1>&2; \
+         diff -c $(srcdir)/aclocal.in aclocal; \
+         exit 1; \
+       fi
+
+## 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
+
+## expect no instances of '${...}'.  However, $${...} is ok, since that
+## is a shell construct, not a Makefile construct.
+sc_no_brace_variable_expansions:
+       @if grep -F '$${' $(ams) | grep -F -v '$$$$'; then \
+         echo "Found too many uses of '\$${' in the lines above." 1>&2; \
+         exit 1;                               \
+       else :; fi
+
+## Make sure `rm' is called with `-f'.
+sc_rm_minus_f:
+       @if grep -v '^#' $(ams) $(xtests) \
+          | grep -E '\<rm ([^-]|\-[^f ]*\>)'; \
+       then \
+         echo "Suspicious 'rm' invocation." 1>&2; \
+         exit 1;                               \
+       else :; fi
+
+## Never use something like `for file in $(FILES)', this doesn't work
+## if FILES is empty or if it contains shell meta characters (e.g. $ is
+## commonly used in Java filenames).
+sc_no_for_variable_in_macro:
+       @if grep 'for .* in \$$(' $(ams) | grep -v '/Makefile\.am:'; then \
+         echo 'Use "list=$$(mumble); for var in $$$$list".' 1>&2 ; \
+         exit 1; \
+       else :; fi
+
+## Make sure all invocations of mkinstalldirs are correct.
+sc_mkinstalldirs:
+       @if grep -n 'mkinstalldirs' $(ams) \
+             | grep -F -v '$$(mkinstalldirs)' \
+             | grep -v '^\./lib/Makefile.am:37:  *mkinstalldirs \\$$'; \
+       then \
+         echo "Found incorrect use of mkinstalldirs in the lines above" 1>&2; \
+         exit 1; \
+       else :; fi
+
+## Make sure all calls to PRE/NORMAL/POST_INSTALL/UNINSTALL
+sc_pre_normal_post_install_uninstall:
+       @if grep -E -n '\((PRE|NORMAL|POST)_(|UN)INSTALL\)' $(ams) | \
+             grep -v ':##' | grep -v ':        @\$$('; then \
+         echo "Found incorrect use of PRE/NORMAL/POST_INSTALL/UNINSTALL in the 
lines above" 1>&2; \
+         exit 1; \
+       else :; fi
+
+## We never want to use "undef", only "delete", but for $/.
+sc_perl_no_undef:
+       @if grep -n -w 'undef ' $(srcdir)/automake.in | \
+             grep -F -v 'undef $$/'; then \
+         echo "Found undef in automake.in; use delete instead" 1>&2; \
+         exit 1; \
+       fi
+
+## We never want split (/ /,...), only split (' ', ...).
+sc_perl_no_split_regex_space:
+       @if grep -n 'split (/ /' $(srcdir)/automake.in; then \
+         echo "Found bad split in the lines above." 1>&2; \
+         exit 1; \
+       fi
+
+## Look for cd within backquotes
+sc_cd_in_backquotes:
+       @if grep -n '^[^#]*` *cd ' $(srcdir)/automake.in $(ams); then \
+         echo "Consider using \$$(am__cd) in the lines above." 1>&2; \
+         exit 1; \
+       fi
+
+## Look for cd to a relative directory (may be influenced by CDPATH).
+## Skip some known directories that are OK.
+sc_cd_relative_dir:
+       @if grep -n '^[^#]*cd ' $(srcdir)/automake.in $(ams) | \
+             grep -v 'echo.*cd ' | \
+             grep -v 'am__cd =' | \
+             grep -v '^[^#]*cd [./]' | \
+             grep -v '^[^#]*cd \$$(top_builddir)' | \
+             grep -v '^[^#]*cd "\$$\$$am__cwd' | \
+             grep -v '^[^#]*cd \$$(abs' | \
+             grep -v '^[^#]*cd "\$$(DESTDIR)'; then \
+         echo "Consider using \$$(am__cd) in the lines above." 1>&2; \
+         exit 1; \
+       fi
+
+## Using @_ in a scalar context is most probably a programming error.
+sc_perl_at_uscore_in_scalar_context:
+       @if grep -Hn 'address@hidden) ] *= address@hidden' 
$(srcdir)/automake.in; then \
+         echo "Using @_ in a scalar context in the lines above." 1>&2; \
+         exit 1; \
+       fi
+
+## Forbid using parens with `local' to ease counting.
+sc_perl_local_no_parens:
+       @if grep '^[ \t]*local *(' $(srcdir)/automake.in; then \
+         echo "Don't use \`local' with parens: use several \`local' above." 
>&2; \
+         exit 1; \
+       fi
+
+## Allow only few variables to be localized in Automake.
+sc_perl_local:
+       @if egrep -v '^[ \t]*local \$$[_~]( *=|;)' $(srcdir)/automake.in | \
+               grep '^[ \t]*local [^*]'; then \
+         echo "Please avoid \`local'." 1>&2; \
+         exit 1; \
+       fi
+
+## Don't let AMDEP_TRUE substitution appear in automake.in.
+sc_AMDEP_TRUE_in_automake_in:
+       @if grep '@AMDEP''_TRUE@' $(srcdir)/automake.in; then \
+         echo "Don't put AMDEP_TRUE substitution in automake.in" 1>&2; \
+         exit 1; \
+       fi
+
+## Tests should never require GNU make explicitly: automake-ng assumes
+## it unconditionally.
+sc_tests_no_gmake_requirement:
+       @if grep -iE '^ *required=.*\b(gmake|gnumake)\b' \
+         $(xtests) $(srcdir)/tests/defs $(srcdir)/tests/defs-static.in \
+       ; then \
+         echo 'Tests should never require GNU make explicitly.' 1>&2; \
+         exit 1; \
+       fi
+
+## Tests should never check explicitly whether the make program being
+## used in the test suite is indeed GNU make: automake-ng assumes it
+## unconditionally.
+sc_tests_no_gmake_checking:
+       @if grep -E '\b(is|using)_g(nu)?make\b' \
+         $(xtests) $(srcdir)/tests/defs $(srcdir)/tests/defs-static.in \
+       ; then \
+         echo 'Tests should never explicitly check whether $$MAKE' \
+              'is GNU make.' 1>&2; \
+         exit 1; \
+       fi
+
+## GNU make can obviously chain suffix rules, so don't try to check
+## whether this is the case.
+sc_tests_make_can_chain_suffix_rules:
+       @if grep 'chain_suffix_rule' $(xtests); then \
+         echo 'GNU make can implicitly chain suffix rules; tests' \
+              'should just assume that without checking.' 1>&2; \
+         exit 1; \
+       fi
+## GNU make supports POSIX-style runtime include directives.
+sc_grep_for_bad_make_include = \
+  if grep -E 'AM_MAKE_INCLUDE|am__(include|quote)' $$files; then \
+    echo 'GNU make supports runtime "include" directive.' 1>&2; \
+    echo 'Neither am__{include,quote} nor AM_MAKE_INCLUDE' \
+         'should be used anymore.' 1>&2; \
+    exit 1; \
+  fi
+
+sc_tests_make_simple_include: sc_ensure_testsuite_has_run
+       @files=tests/*.log; $(sc_grep_for_bad_make_include)
+sc_make_simple_include:
+       @files=" \
+          $(xtests) \
+          $(ams) \
+          $(srcdir)/m4/*.m4 \
+          $(srcdir)/automake.in \
+          $(srcdir)/doc/*.texi \
+          aclocal.m4 \
+          configure \
+        "; \
+        $(sc_grep_for_bad_make_include)
+
+## The '.MAKE' special target is NetBSD-make specific, and not supported
+## by GNU make.  No point in using it.
+sc_no_dotmake_target:
+       @files="\
+         `find $(srcdir) -name '*.am'` \
+         $(srcdir)/automake.in \
+         $(srcdir)/doc/*.texi \
+        "; \
+       if grep '\.MAKE' $$files; then \
+         echo "Special target '.MAKE' not supported by GNU make." 1>&2; \
+         echo "Use the '+' recipe modifier instead, or put the" \
+              "'\$$(MAKE)' string somewhere in the recipe text." 1>&2; \
+         exit 1; \
+       fi
+
+## $(AM_MAKEFLAGS) is obsolete now that we assume GNU make, since it
+## is smart enough to correctly pass the values of macros redefined on
+## the command line to sub-make invocations.
+sc_no_am_makeflags:
+       @files="\
+         $(xtests) \
+         $(ams) \
+         $(srcdir)/automake.in \
+         $(srcdir)/doc/*.texi \
+        "; \
+       if grep '\bAM_MAKEFLAGS\b' $$files; then \
+         echo "\$$(AM_MAKEFLAGS) is obsolete, don't use it." 1>&2; \
+         exit 1; \
+       fi
+
+## "make -e" is brittle and unsafe, since it let *all* the environment
+## win over the macro definitions in the Makefiles.  We needed it when
+## we couldn't assume GNU make, but now that the tide has turned, it's
+## better to prohibit it altogether.
+sc_tests_no_make_e:
+       @if grep -E '\$$MAKE\b.* -[a-zA-Z0-9]*e' $(xtests); then \
+         echo "\"make -e\" is brittle, don't use it." 1>&2; \
+         exit 1; \
+       fi
+sc_docs_no_make_e:
+       @if grep '\bmake\b.* -[a-zA-Z0-9]*e' README tests/README; then \
+         echo "Don't advocate the use of \"make -e\" in the manual or" \
+              " in the README files." 1>&2; \
+         exit 1; \
+       fi
+
+## Look out for some obsolete variables.
+sc_tests_obsolete_variables:
+       @vars=" \
+         using_tap \
+         parallel_tests \
+         test_prefer_config_shell \
+         original_AUTOMAKE \
+         original_ACLOCAL \
+       "; \
+       seen=""; \
+       for v in $$vars; do \
+         if grep -E "\b$$v\b" \
+           $(xtests) $(srcdir)/tests/defs \
+           $(srcdir)/tests/defs-static.in \
+         ; then \
+           seen="$$seen $$v"; \
+         fi; \
+       done; \
+       if test -n "$$seen"; then \
+         for v in $$seen; do \
+           echo "Variable '$$v' is obsolete, use 'am_$$v' instead." 1>&2; \
+         done; \
+         exit 1; \
+       else :; fi
+
+## Tests should never call make directly.
+sc_tests_plain_make:
+       @if grep -v '^#' $(xtests) | $(EGREP) ':[       ]*make( |$$)'; then \
+         echo 'Do not run "make" in the above tests.  Use "$$MAKE" instead.' 
1>&2; \
+         exit 1; \
+       fi
+
+## Tests should never call autoconf directly.
+sc_tests_plain_autoconf:
+       @if grep -v '^#' $(xtests) | grep ':[   ]*autoconf\>'; then \
+         echo 'Do not run "autoconf" in the above tests.  Use "$$AUTOCONF" 
instead.' 1>&2; \
+         exit 1; \
+       fi
+
+## Tests should never call autoupdate directly.
+sc_tests_plain_autoupdate:
+       @if grep -v '^#' $(xtests) | grep ':[   ]*autoupdate\>'; then \
+         echo 'Do not run "autoupdate" in the above tests.  Use "$$AUTOUPDATE" 
instead.' 1>&2; \
+         exit 1; \
+       fi
+
+## Tests should never call automake directly.
+sc_tests_plain_automake:
+       @if grep -v '^#' $(xtests) | grep -E ':[        ]*automake\>([^:]|$$)'; 
then \
+         echo 'Do not run "automake" in the above tests.  Use "$$AUTOMAKE" 
instead.' 1>&2;  \
+         exit 1; \
+       fi
+
+## Tests should never call autoheader directly.
+sc_tests_plain_autoheader:
+       @if grep -v '^#' $(xtests) | grep ':[   ]*autoheader\>'; then \
+         echo 'Do not run "autoheader" in the above tests.  Use "$$AUTOHEADER" 
instead.' 1>&2;  \
+         exit 1; \
+       fi
+
+## Tests should never call autoreconf directly.
+sc_tests_plain_autoreconf:
+       @if grep -v '^#' $(xtests) | grep ':[   ]*autoreconf\>'; then \
+         echo 'Do not run "autoreconf" in the above tests.  Use "$$AUTORECONF" 
instead.' 1>&2;  \
+         exit 1; \
+       fi
+
+## Tests should never call autom4te directly.
+sc_tests_plain_autom4te:
+       @if grep -v '^#' $(xtests) | grep ':[   ]*autom4te\>'; then \
+         echo 'Do not run "autom4te" in the above tests.  Use "$$AUTOM4TE" 
instead.' 1>&2;  \
+         exit 1; \
+       fi
+
+## Tests should only use END and EOF for here documents
+## (so that the next test is effective).
+sc_tests_here_document_format:
+       @if grep '<<' $(xtests) | grep -v 'END' | grep -v 'EOF'; then \
+         echo 'Use here documents with "END" and "EOF" only, for 
greppability.' 1>&2; \
+         exit 1; \
+       fi
+
+## Tests should never call exit directly, but use Exit.
+## This is so that the exit status is transported correctly across the 0 trap.
+## Ignore comments, testsuite self tests, and one perl line in ext2.test.
+sc_tests_Exit_not_exit:
+       @found=false; for file in $(xtests); do \
+         case $$file in */self-check-*) continue;; esac; \
+         res=`sed -n -e '/^#/d; /^\$$PERL/d' -e '/<<.*END/,/^END/b' \
+                     -e '/<<.*EOF/,/^EOF/b' -e '/exit [$$0-9]/p' $$file`; \
+         if test -n "$$res"; then \
+           echo "$$file:$$res"; \
+           found=true; \
+         fi; \
+       done; \
+       if $$found; then \
+         echo 'Do not call plain "exit", use "Exit" instead, in above tests.' 
1>&2; \
+         exit 1; \
+       fi
+
+## Use AUTOMAKE_fails when appropriate
+sc_tests_automake_fails:
+       @if grep -v '^#' $(xtests) | grep '\$$AUTOMAKE.*&&.*[eE]xit'; then \
+         echo 'Use AUTOMAKE_fails + grep to catch automake failures in the 
above tests.' 1>&2;  \
+         exit 1; \
+       fi
+
+## Tests should never call aclocal directly.
+sc_tests_plain_aclocal:
+       @if grep -v '^#' $(xtests) | grep ':[   ]*aclocal\>'; then \
+         echo 'Do not run "aclocal" in the above tests.  Use "$$ACLOCAL" 
instead.' 1>&2;  \
+         exit 1; \
+       fi
+
+## Tests should never call perl directly.
+sc_tests_plain_perl:
+       @if grep -v '^#' $(xtests) | grep ':[   ]*perl\>'; then \
+         echo 'Do not run "perl" in the above tests.  Use "$$PERL" instead.' 
1>&2; \
+         exit 1; \
+       fi
+
+## Setting `required' after sourcing `./defs' is a bug.
+sc_tests_required_after_defs:
+       @for file in $(xtests); do \
+         if out=`sed -n '/defs/,$${/required=/p;}' $$file`; test -n "$$out"; 
then \
+           echo 'Do not set "required" after sourcing "defs" in '"$$file: 
$$out" 1>&2; \
+           exit 1; \
+         fi; \
+       done
+
+## TAP-based test scripts should not forget to declare a TAP plan.  In
+## case it is not known in advance how many tests will be run, a "lazy"
+## plan can be used; but its use should be deliberate, explicitly declared
+## with a "plan_ later" call, rather than the result of an oversight.
+## This check helps to ensure this is indeed the case.
+sc_tests_tap_plan:
+       @with_plan=`grep -l '^ *plan_ ' $(srcdir)/tests/*.tap`; \
+        with_plan=`echo $$with_plan`; \
+        ok=:; \
+        for t in $(srcdir)/tests/*.tap; do \
+          case " $$with_plan " in *" $$t "*) continue;; esac; \
+          case $$t in \
+            *-w.tap) \
+              : it is ok for an *auto-generated* test sourcing an \
+              : hand-written one not to declare a TAP plan: that will \
+              : be done by the sourced test; \
+              t2=`echo $$t | sed -e 's|.*/||' -e 's/-w\.tap$$/.tap/'` \
+                && grep -E "^ *\\.  *[^        ]*/$$t2\\b" $$t >/dev/null \
+                && continue || : ;; \
+          esac; \
+          ok=false; echo $$t; \
+        done; \
+        $$ok || { \
+         echo 'The tests above do not declare a TAP plan.' 1>&2; \
+         exit 1; \
+        }
+
+## Never use `sleep 1' to create files with different timestamps.
+## Use `$sleep' instead.  Some filesystems (e.g., Windows') have only
+## a 2sec resolution.
+sc_tests_plain_sleep:
+       @if grep -E '\bsleep +[12345]\b' $(xtests); then \
+         echo 'Do not use "sleep x" in the above tests.  Use "$$sleep" 
instead.' 1>&2; \
+         exit 1; \
+       fi
+
+## fgrep and egrep are not required by POSIX.
+sc_tests_plain_egrep_fgrep:
+       @if grep -E '\b[ef]grep\b' $(xtests) ; then \
+         echo 'Do not use egrep or fgrep in test cases.  Use $$FGREP or 
$$EGREP.' 1>&2; \
+         exit 1; \
+       fi
+       @if grep -E '\b[ef]grep\b' $(ams) $(srcdir)/m4/*.m4; then \
+         echo 'Do not use egrep or fgrep in the above files, they are not 
portable.' 1>&2; \
+         exit 1; \
+       fi
+
+## Rule to ensure that the testsuite has been run before.  We don't depend on 
`check'
+## here, because that would be very wasteful in the common case.  We could run
+## `make check RECHECK_LOGS=' and avoid toplevel races with 
AM_RECURSIVE_TARGETS.
+## Suggest keeping test directories around for greppability of the Makefile.in 
files.
+sc_ensure_testsuite_has_run:
+       @if test ! -f tests/test-suite.log; then \
+         echo "Run \`env keep_testdirs=yes make check' before 
\`maintainer-check'" >&2; \
+         exit 1; \
+       fi
+.PHONY: sc_ensure_testsuite_has_run
+
+## Ensure our warning and error messages do not contain duplicate 'warning:' 
prefixes.
+## This test actually depends on the testsuite having been run before.
+sc_tests_logs_duplicate_prefixes: sc_ensure_testsuite_has_run
+       @if grep -E '(warning|error):.*(warning|error):' tests/*.log; then \
+         echo 'Duplicate warning/error message prefixes seen in above tests.' 
>&2; \
+         exit 1; \
+       fi
+
+## Ensure variables are listed before rules in Makefile.in files we generate.
+sc_tests_makefile_variable_order: sc_ensure_testsuite_has_run
+       @st=0; \
+       for file in `find tests -name Makefile.in -print`; do \
+         latevars=`sed -n \
+           -e :x -e 's/#.*//' \
+           -e '/\\\\$$/{' -e N -e 'b x' -e '}' \
+           -e '# Literal TAB.' \
+           -e '1,/^    /d' \
+           -e '# Allow @ so we match conditionals.' \
+           -e '/^ address@hidden,\} *=/p' $$file`; \
+         if test -n "$$latevars"; then \
+           echo "Variables are expanded too late in $$file:" >&2; \
+           echo "$$latevars" | sed 's/^/  /' >&2; \
+           st=1; \
+         fi; \
+       done; \
+       test $$st -eq 0 || { \
+         echo 'Ensure variables are expanded before rules' >&2; \
+         exit 1; \
+       }
+
+## Using `:' as a PATH separator is not portable.
+sc_tests_PATH_SEPARATOR:
+       @if grep -E '\bPATH=.*:.*' $(xtests) ; then \
+         echo "Use \`\$$PATH_SEPARATOR', not \`:', in PATH definitions above." 
1>&2; \
+         exit 1; \
+       fi
+
+sc_mkdir_p:
+       @if grep 'mkdir_p' $(srcdir)/automake.in $(ams) $(xtests); then \
+         echo 'Do not use mkdir_p in the above files, use MKDIR_P.' 1>&2; \
+         exit 1; \
+       fi
+
+## Try to make sure all @...@ substitutions are covered by our
+## substitution rule.
+sc_perl_at_substs:
+       @if test `grep -E 'address@hidden@' aclocal | wc -l` -ne 0; then \
+         echo "Unresolved @...@ substitution in aclocal" 1>&2; \
+         exit 1; \
+       fi
+       @if test `grep -E 'address@hidden@' automake | wc -l` -ne 0; then \
+         echo "Unresolved @...@ substitution in automake" 1>&2; \
+         exit 1; \
+       fi
+
+sc_unquoted_DESTDIR:
+       @if grep -E "[^\'\"]\\\$$\(DESTDIR" $(ams); then \
+         echo 'Suspicious unquoted DESTDIR uses.' 1>&2 ; \
+         exit 1; \
+       fi
+
+sc_tabs_in_texi:
+       @if grep '      ' $(srcdir)/doc/automake.texi; then \
+         echo 'Do not use tabs in the manual.' 1>&2; \
+         exit 1; \
+       fi
+
+sc_at_in_texi:
+       @if grep -E '(address@hidden|^)@([       address@hidden|$$)' 
$(srcdir)/doc/automake.texi; \
+       then \
+         echo 'Unescaped @.' 1>&2; \
+         exit 1; \
+       fi
diff --git a/tests/CheckListOfTests.am b/tests/CheckListOfTests.am
index c71c7fc..3fa51d3 100644
--- a/tests/CheckListOfTests.am
+++ b/tests/CheckListOfTests.am
@@ -41,11 +41,12 @@ maintainer-check-list-of-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 \
+        test_extensions='$(TEST_EXTENSIONS)'; \
+        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); \
+              ($(am__cd) $(srcdir) && ls $$dir/*$$ext 2>/dev/null); \
             fi; \
           done; \
         done | sed 's,^\./,,' | sort | uniq >$(am__tfs); \
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 9381f26..f635d12 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -195,7 +195,7 @@ include $(srcdir)/CheckListOfTests.am
 
 # Run the testsuite with the installed aclocal and automake.
 installcheck-local:
-       am_running_installcheck=yes $(MAKE) $(AM_MAKEFLAGS) check
+       am_running_installcheck=yes $(MAKE) check
 
 clean-local: clean-local-check
 .PHONY: clean-local-check
diff --git a/tests/check8.test b/tests/check8.test
index 4576665..97ed250 100755
--- a/tests/check8.test
+++ b/tests/check8.test
@@ -87,13 +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..d1306be
--- /dev/null
+++ b/tests/conffile-leading-dot.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/>.
+
+# 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.
+
+. ./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/deleted-am.test b/tests/deleted-am.test
index fa7c6ab..74b3745 100755
--- a/tests/deleted-am.test
+++ b/tests/deleted-am.test
@@ -35,6 +35,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
@@ -42,12 +43,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/depcomp-recover.test b/tests/depcomp-recover.test
new file mode 100755
index 0000000..1529726
--- /dev/null
+++ b/tests/depcomp-recover.test
@@ -0,0 +1,112 @@
+#! /bin/sh
+# Copyright (C) 2012 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Dependency tracking:
+#  - we can recover if any .Po file in $(DEPDIR) gets removed;
+#  - in fact, we can recover if the whole $(DEPDIR) directory gets
+#    removed.
+
+required=cc
+. ./defs || Exit 1
+
+cat >> configure.in <<'END'
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+SUBDIRS = . sub
+noinst_PROGRAMS = foo
+foo_SOURCES = main.c foo.c foo.h
+get-depdir:
+       @echo '$(DEPDIR)'
+END
+
+cat > main.c <<'END'
+#include "foo.h"
+int main (void)
+{
+  return foo ();
+}
+END
+cat > foo.c <<'END'
+#include "foo.h"
+int foo (void)
+{
+  return 0;
+}
+END
+echo 'int foo (void);' > foo.h
+
+mkdir sub sub/src
+cat > sub/Makefile.am <<'END'
+AUTOMAKE_OPTIONS = subdir-objects
+noinst_PROGRAMS = foo
+foo_SOURCES = src/main.c src/foo.c src/foo.h
+END
+cp main.c foo.c foo.h sub/src
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+for vpath in : false; do
+
+  if $vpath; then
+    srcdir=..
+    mkdir build
+    cd build
+  else
+    srcdir=.
+  fi
+
+  $srcdir/configure --enable-dependency-tracking
+  $MAKE
+  depdir=`$MAKE -s --no-print-directory get-depdir` \
+    && test -n "$depdir" \
+    && test -d $depdir \
+    && test -d sub/src/$depdir \
+    || fatal_ "cannot find the depdir"
+
+  for remove_stuff in \
+    "rm -f $depdir/main.Po" \
+    "rm -f sub/src/$depdir/foo.Po" \
+    "rm -rf $depdir" \
+    "rm -rf $depdir sub/src/$depdir" \
+  ; do
+    $remove_stuff
+    # We can still use make and order a build, even if we have probably
+    # lost the dependency information registered in removed the .Po files.
+    # TODO: maybe we should detect such a situation and force a clean
+    # TODO: rebuild?
+    $MAKE
+    # But if we force a rebuild by hand by cleaning out the existing
+    # objects, everything works out as expected.
+    $MAKE clean
+    $MAKE
+    test -f $depdir/main.Po
+    test -f $depdir/foo.Po
+    test -f sub/src/$depdir/main.Po
+    test -f sub/src/$depdir/foo.Po
+  done
+
+  cd $srcdir
+
+done
+
+:
diff --git a/contrib/Makefile.am b/tests/depcomp-shuffle-sub-vpath.test
old mode 100644
new mode 100755
similarity index 72%
copy from contrib/Makefile.am
copy to tests/depcomp-shuffle-sub-vpath.test
index 91c1cab..06cdd3d
--- a/contrib/Makefile.am
+++ b/tests/depcomp-shuffle-sub-vpath.test
@@ -1,27 +1,23 @@
-## Process this file with automake to create Makefile.in
-
-## Makefile for Automake contrib.
-
+#! /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/>.
 
-EXTRA_DIST = \
-  check-html.am \
-  multilib/README \
-  multilib/config-ml.in \
-  multilib/symlink-tree \
-  multilib/multilib.am \
-  multilib/multi.m4 \
-  README
+# Dependency tracking in the face of added/removed/renamed files.
+#  - VPATH build
+#  - use of subdir-objects
+
+. ./defs-static || exit '99'
+xdir='sub' vpath='yes'
+. $testsrcdir/depcomp-shuffle.sh
diff --git a/contrib/Makefile.am b/tests/depcomp-shuffle-sub.test
old mode 100644
new mode 100755
similarity index 72%
copy from contrib/Makefile.am
copy to tests/depcomp-shuffle-sub.test
index 91c1cab..c04eb12
--- a/contrib/Makefile.am
+++ b/tests/depcomp-shuffle-sub.test
@@ -1,27 +1,23 @@
-## Process this file with automake to create Makefile.in
-
-## Makefile for Automake contrib.
-
+#! /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/>.
 
-EXTRA_DIST = \
-  check-html.am \
-  multilib/README \
-  multilib/config-ml.in \
-  multilib/symlink-tree \
-  multilib/multilib.am \
-  multilib/multi.m4 \
-  README
+# Dependency tracking in the face of added/removed/renamed files.
+#  - in-tree build
+#  - use of subdir-objects
+
+. ./defs-static || exit '99'
+xdir='sub' vpath='no'
+. $testsrcdir/depcomp-shuffle.sh
diff --git a/contrib/Makefile.am b/tests/depcomp-shuffle-vpath.test
old mode 100644
new mode 100755
similarity index 72%
copy from contrib/Makefile.am
copy to tests/depcomp-shuffle-vpath.test
index 91c1cab..78ccc19
--- a/contrib/Makefile.am
+++ b/tests/depcomp-shuffle-vpath.test
@@ -1,27 +1,23 @@
-## Process this file with automake to create Makefile.in
-
-## Makefile for Automake contrib.
-
+#! /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/>.
 
-EXTRA_DIST = \
-  check-html.am \
-  multilib/README \
-  multilib/config-ml.in \
-  multilib/symlink-tree \
-  multilib/multilib.am \
-  multilib/multi.m4 \
-  README
+# Dependency tracking in the face of added/removed/renamed files.
+#  - VPATH build
+#  - no use of subdir-objects
+
+. ./defs-static || exit '99'
+xdir='' vpath='yes'
+. $testsrcdir/depcomp-shuffle.sh
diff --git a/tests/depcomp-shuffle.sh b/tests/depcomp-shuffle.sh
new file mode 100755
index 0000000..23c0832
--- /dev/null
+++ b/tests/depcomp-shuffle.sh
@@ -0,0 +1,177 @@
+#! /bin/sh
+# Copyright (C) 2012 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Dependency tracking in the face of added/removed/renamed files.
+# This is meant to be sourced by other the tests, after they've
+# set the variables '$xdir' and '$vpath' appropriately.
+
+required=cc
+. ./defs || Exit 1
+
+test x${xdir+"set"} = x"set" || fatal_ "\$xdir is unset"
+test x${vpath+"set"} = x"set" || fatal_ "\$vpath is unset"
+
+if test $vpath = no; then
+  srcdir=.
+elif test $vpath = yes; then
+  srcdir=..
+else
+  fatal_ "invalid value for \$vpath: '$vpath'"
+fi
+
+if test -z "$xdir"; then
+  thedir=$srcdir
+else
+  thedir=$srcdir/$xdir
+  xdir=$xdir/
+fi
+
+
+finalize_edit ()
+{
+  diff "$1" t && Exit 1
+  mv -f t "$2"
+}
+
+func_subst ()
+{
+  subst=$1; shift
+  for file
+  do
+    sed "$subst" "$file" > t
+    finalize_edit "$subst" "$file"
+  done
+}
+
+prepend ()
+{
+  cat "$1" "$2" > t
+  finalize_edit "$@"
+}
+
+if cross_compiling; then
+  grep_prog_out () { :; }
+else
+  grep_prog_out () { ./prg && ./prg | grep "$1" || Exit 1; }
+fi
+
+echo AC_PROG_CC                         >> configure.in
+echo AM_PROG_AR                         >> configure.in
+echo AC_PROG_RANLIB                     >> configure.in
+test -z "$xdir" || echo AM_PROG_CC_C_O  >> configure.in
+echo AC_OUTPUT                          >> configure.in
+
+if test -n "$xdir"; then
+  echo AUTOMAKE_OPTIONS = subdir-objects > Makefile.am
+fi
+cat >> Makefile.am <<END
+noinst_PROGRAMS = prg
+noinst_LIBRARIES = liber.a
+prg_SOURCES = ${xdir}main.c
+liber_a_SOURCES = ${xdir}niam.c
+get-exeext:
+       @echo \$(EXEEXT)
+END
+
+cat configure.in # For debugging.
+cat Makefile.am  # Likewise.
+
+test -z "$xdir" || mkdir "$xdir"
+
+echo '#define THE_STRING "foofoofoo"' > ${xdir}foo.h
+
+cat > ${xdir}main.c << 'END'
+#include "foo.h"
+#include <stdio.h>
+int main (void)
+{
+   printf ("%s\n", THE_STRING);
+   return 0;
+}
+END
+
+sed 's/main/niam/' ${xdir}main.c > ${xdir}niam.c
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+test $vpath = no || { mkdir build && cd build; } || Exit 99
+
+$srcdir/configure --enable-dependency-tracking
+$MAKE
+grep_prog_out foofoofoo # Sanity check.
+
+EXEEXT=`$MAKE -s --no-print-directory get-exeext` \
+  || fatal_ "cannot get \$EXEEXT"
+
+# Modify an header file.
+$sleep
+echo '#define THE_STRING "oofoofoof"' > $thedir/foo.h
+$MAKE
+is_newest prg$EXEEXT $thedir/foo.h
+is_newest liber.a $thedir/foo.h
+grep_prog_out oofoofoof
+
+# Rename an header file.
+$sleep
+mv $thedir/foo.h $thedir/foo2.h
+func_subst 's|foo\.h|foo2.h|' $thedir/main.c $thedir/niam.c
+$MAKE
+is_newest prg$EXEEXT $thedir/main.c
+is_newest liber.a $thedir/niam.c
+grep_prog_out oofoofoof
+
+# Add an header file, modify another one.
+$sleep
+mv $thedir/foo2.h $thedir/bar.h
+echo '#include "bar.h"' > $thedir/foo2.h
+$MAKE
+grep_prog_out oofoofoof
+is_newest prg$EXEEXT $thedir/foo2.h
+is_newest liber.a $thedir/foo2.h
+
+# Remove an header file, modify another one.
+$sleep
+echo '#define THE_STRING "bazbazbaz"' > $thedir/foo2.h
+rm -f $thedir/bar.h
+$MAKE
+is_newest prg$EXEEXT $thedir/foo2.h
+is_newest liber.a $thedir/foo2.h
+grep_prog_out bazbazbaz
+
+# Add two header files, rename another file.
+$sleep
+echo '#define S_ONE "zar"' > $thedir/1.h
+echo '#define S_TWO "doz"' > $thedir/2.h
+cat > $thedir/baz.h <<'END'
+#include "1.h"
+#include "2.h"
+#define THE_STRING S_ONE S_TWO
+END
+func_subst 's|foo2\.h|baz.h|' $thedir/main.c $thedir/niam.c
+rm -f $thedir/foo2.h
+$MAKE
+is_newest prg$EXEEXT $thedir/*.[ch]
+is_newest liber.a $thedir/*.[ch]
+grep_prog_out zardoz
+
+# Check the distribution.
+$sleep
+echo prg_SOURCES += ${xdir}baz.h ${xdir}1.h ${xdir}2.h >> $srcdir/Makefile.am
+$MAKE distcheck
+
+:
diff --git a/contrib/Makefile.am b/tests/depcomp-shuffle.test
old mode 100644
new mode 100755
similarity index 72%
copy from contrib/Makefile.am
copy to tests/depcomp-shuffle.test
index 91c1cab..79c063c
--- a/contrib/Makefile.am
+++ b/tests/depcomp-shuffle.test
@@ -1,27 +1,23 @@
-## Process this file with automake to create Makefile.in
-
-## Makefile for Automake contrib.
-
+#! /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/>.
 
-EXTRA_DIST = \
-  check-html.am \
-  multilib/README \
-  multilib/config-ml.in \
-  multilib/symlink-tree \
-  multilib/multilib.am \
-  multilib/multi.m4 \
-  README
+# Dependency tracking in the face of added/removed/renamed files.
+#  - in-tree build
+#  - no use of subdir-objects
+
+. ./defs-static || exit '99'
+xdir='' vpath='no'
+. $testsrcdir/depcomp-shuffle.sh
diff --git a/tests/depend.test b/tests/depend.test
index 5a5e950..e77ab48 100755
--- a/tests/depend.test
+++ b/tests/depend.test
@@ -32,6 +32,6 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-test 1 = `grep 'address@hidden@include ' Makefile.in | wc -l`
+test 1 = `grep 'address@hidden@-include ' Makefile.in | wc -l`
 
 :
diff --git a/tests/depend4.test b/tests/depend4.test
index 535faf7..06cc325 100755
--- a/tests/depend4.test
+++ b/tests/depend4.test
@@ -31,7 +31,7 @@ for header in one.h two.h three.h four.h five.h six.h; do
     fred_SOURCES = fred1.c $headers
 END
   $AUTOMAKE
-  test 1 = `grep 'address@hidden@include ' Makefile.in | wc -l`
+  test 1 = `grep 'address@hidden@-include ' Makefile.in | wc -l`
 done
 
 :
diff --git a/tests/depend5.test b/tests/depend5.test
deleted file mode 100755
index 9d1bb41..0000000
--- a/tests/depend5.test
+++ /dev/null
@@ -1,77 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2008, 2009, 2011 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# 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_OUTPUT_DEPENDENCY_COMMANDS works with eval-style
-# quoting in $CONFIG_FILES, done by newer Autoconf.
-
-required=cc
-. ./defs || Exit 1
-
-cat >>configure.in << END
-AC_PROG_CC
-AC_OUTPUT
-END
-
-cat > Makefile.am << END
-bin_PROGRAMS = foo
-foo_SOURCES = foo.c foo.h
-END
-
-cat >foo.c << END
-#include "foo.h"
-END
-: >foo.h
-
-$ACLOCAL
-$AUTOMAKE
-$AUTOCONF
-./configure --enable-dependency-tracking
-if test -d .deps; then
-  depdir=.deps
-elif test -d _deps; then
-  depdir=_deps
-else
-  depdir=
-fi
-
-# For the fun of it, we should also cope with makefile
-# names that contain weird characters, with Autoconf 2.62
-# and newer.
-# Pick the first name that the file system will accept.
-for name in \
-  'weird  name with $ `#() &! characters"' \
-  'weird  name with $ `#()  characters"' \
-  'weird  name with  characters'
-do
-  cp Makefile.in "$name.in" && break || :
-done
-
-for arg in Makefile \
-  --file=Makefile \
-  "--file=$name"
-do
-  rm -rf .deps _deps
-  ./config.status "$arg" depfiles >stdout 2>stderr ||
-    { cat stdout; cat stderr >&2; Exit 1; }
-  cat stdout
-  cat stderr >&2
-  grep '[Nn]o such file' stderr && Exit 1
-
-  if test -n "$depdir"; then
-    test -d $depdir || Exit 1
-  fi
-done
-:
diff --git a/tests/depend6.test b/tests/depend6.test
deleted file mode 100755
index d75a4a6..0000000
--- a/tests/depend6.test
+++ /dev/null
@@ -1,45 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2008, 2009, 2011 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Check for _AM_OUTPUT_DEPENDENCY_COMMANDS grouping bug,
-# reported by Markus Duft.
-
-. ./defs || Exit 1
-
-cat >>configure.in << END
-AC_PROG_CC
-AC_OUTPUT
-END
-
-cat > Makefile.am << END
-bin_PROGRAMS = foo
-foo_SOURCES = foo.c foo.h
-END
-
-cat >foo.c << END
-#include "foo.h"
-END
-: >foo.h
-
-$ACLOCAL
-$AUTOMAKE
-$AUTOCONF
-./configure --disable-dependency-tracking 2>stderr || {
-  stat=$?; cat stderr >&2; Exit $stat;
-}
-cat stderr >&2
-grep shift stderr && Exit 1
-:
diff --git a/tests/exsource.test b/tests/exsource.test
index 194ce1f..8bb1eb0 100755
--- a/tests/exsource.test
+++ b/tests/exsource.test
@@ -35,6 +35,6 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-grep 'address@hidden@include .*/xtra\.P' Makefile.in
+grep 'address@hidden@-include .*/xtra\.P' Makefile.in
 
 :
diff --git a/tests/gen-testsuite-part b/tests/gen-testsuite-part
index 51b634f..b53b9f9 100755
--- a/tests/gen-testsuite-part
+++ b/tests/gen-testsuite-part
@@ -152,6 +152,11 @@ my %deps_extractor =
         line_matcher => qr/\btrivial-test-driver\b/,
         dist_prereqs => "trivial-test-driver",
       },
+    depcomp_shuffle =>
+      {
+        line_matcher => qr/\bdepcomp-shuffle\.sh\b/,
+        dist_prereqs => "depcomp-shuffle.sh",
+      },
     check_testsuite_summary =>
       {
         line_matcher => qr/\btestsuite-summary-checks\.sh\b/,
diff --git a/tests/gmake-vars.test b/tests/gmake-vars.test
index 7c5ca00..5c52df3 100755
--- a/tests/gmake-vars.test
+++ b/tests/gmake-vars.test
@@ -71,7 +71,8 @@ END
 echo AC_OUTPUT >> configure.in
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && test ! -s stderr || { cat stderr >&2; Exit 1; }
+AUTOMAKE_run
+test ! -s stderr
 
 : > foo.sh
 : > bar.sh
@@ -79,6 +80,6 @@ $AUTOMAKE 2>stderr && test ! -s stderr || { cat stderr >&2; 
Exit 1; }
 
 $AUTOCONF
 ./configure
-make 'do/test'
+$MAKE 'do/test'
 
 :
diff --git a/tests/libobj10.test b/tests/libobj10.test
index 306d370..d261018 100755
--- a/tests/libobj10.test
+++ b/tests/libobj10.test
@@ -1,6 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 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
@@ -39,7 +39,7 @@ foo.c:
        echo 'extern int dummy;' > $@
 END
 
-: > ar-lib
+cp "$am_scriptdir/ar-lib" . || fatal_ "fetching auxiliary script 'ar-lib'"
 
 $ACLOCAL
 $AUTOCONF
diff --git a/tests/libobj19.test b/tests/libobj19.test
index b3ce6ba..243401f 100755
--- a/tests/libobj19.test
+++ b/tests/libobj19.test
@@ -22,6 +22,7 @@ required=cc
 cat >> configure.in << 'END'
 AC_CONFIG_LIBOBJ_DIR([libobj-dir])
 AC_PROG_CC
+AM_PROG_CC_C_O
 AM_PROG_AR
 AC_PROG_RANLIB
 AC_LIBOBJ([foobar])
@@ -53,7 +54,8 @@ cat > libobj-dir/foobar.c << 'END'
 extern int dummy;
 END
 
-cp "$am_scriptdir/ar-lib" . || fatal_ "fetching auxiliary script \`ar-lib'"
+cp "$am_scriptdir/ar-lib" . || fatal_ "fetching auxiliary script 'ar-lib'"
+cp "$am_scriptdir/compile" . || fatal_ "fetching auxiliary script 'compile'"
 
 $ACLOCAL
 $AUTOCONF
diff --git a/tests/list-of-tests.mk b/tests/list-of-tests.mk
index ea04a10..d590868 100644
--- a/tests/list-of-tests.mk
+++ b/tests/list-of-tests.mk
@@ -270,6 +270,7 @@ configure.test \
 confdeps.test \
 conff.test \
 conff2.test \
+conffile-leading-dot.test \
 confh.test \
 confh4.test \
 confh5.test \
@@ -329,13 +330,16 @@ depcomp6.test \
 depcomp7.test \
 depcomp8a.test \
 depcomp8b.test \
+depcomp-recover.test \
+depcomp-shuffle.test \
+depcomp-shuffle-vpath.test \
+depcomp-shuffle-sub.test \
+depcomp-shuffle-sub-vpath.test \
 depdist.test \
 depend.test \
 depend2.test \
 depend3.test \
 depend4.test \
-depend5.test \
-depend6.test \
 deprecated-acinit.test \
 destdir.test \
 dirlist.test \
@@ -700,6 +704,7 @@ parallel-tests-log-compiler-2.test \
 parallel-tests-dry-run-1.test \
 parallel-tests-dry-run-2.test \
 parallel-tests-fd-redirect.test \
+parallel-tests-fd-redirect-exeext.test \
 parallel-tests-extra-programs.test \
 parallel-tests-unreadable.test \
 parallel-tests-subdir.test \
@@ -776,7 +781,6 @@ posixsubst-programs.test \
 posixsubst-scripts.test \
 posixsubst-sources.test \
 posixsubst-tests.test \
-postproc.test \
 ppf77.test \
 pr2.test \
 pr9.test \
@@ -787,8 +791,6 @@ pr211.test \
 pr220.test \
 pr224.test \
 pr229.test \
-pr243.test \
-pr266.test \
 pr279.test \
 pr279-2.test \
 pr287.test \
diff --git a/tests/parallel-tests-fd-redirect.test 
b/tests/parallel-tests-fd-redirect-exeext.test
similarity index 67%
copy from tests/parallel-tests-fd-redirect.test
copy to tests/parallel-tests-fd-redirect-exeext.test
index 8b16378..0f9d6da 100755
--- a/tests/parallel-tests-fd-redirect.test
+++ b/tests/parallel-tests-fd-redirect-exeext.test
@@ -15,11 +15,11 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # parallel-tests support: redirection of file descriptors with
-# AM_TESTS_FD_REDIRECT, even when using tests without suffix, or
-# which are binary executables.
+# AM_TESTS_FD_REDIRECT, for tests which are binary executables
 # We use some tricks to ensure that all code paths in `lib/am/check2.am'
 # are covered, even on platforms where $(EXEEXT) would be naturally empty.
-# See also the more generic test 'check-fd-redirect.test'.
+# See also the more generic test 'check-fd-redirect.test', and
+# sister test 'parallel-tests-fd-redirect.test'.
 
 required='cc native'
 am_parallel_tests=yes
@@ -27,6 +27,16 @@ am_parallel_tests=yes
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+# Calls like "write(9, ...)" are unlikely to work for MinGW-compiled
+# programs.  We must skip this test if this is the case.
+am__ok=no
+AC_LINK_IFELSE(
+    [AC_LANG_PROGRAM([[#include <unistd.h>]],
+                     [[write (9, "foobar\n", 7); return 0;]])],
+    [AM_RUN_LOG([./conftest$EXEEXT 9>&1]) \
+       && AM_RUN_LOG([(./conftest$EXEEXT 9>&1) | grep "^foobar"]) \
+       && am__ok=yes])
+test $am__ok = yes || AS_EXIT([63])
 AM_CONDITIONAL([real_EXEEXT], [test -n "$EXEEXT"])
 test -n "$EXEEXT" || EXEEXT=.bin
 AC_OUTPUT
@@ -34,8 +44,7 @@ END
 
 cat > Makefile.am << 'END'
 AM_TESTS_FD_REDIRECT = 9>&1
-TEST_EXTENSIONS = .test .sh
-TESTS = foo.sh bar $(check_PROGRAMS)
+TESTS = $(check_PROGRAMS)
 check_PROGRAMS = baz qux.test
 qux_test_SOURCES = zardoz.c
 
@@ -51,19 +60,6 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
-cat > foo.sh <<'END'
-#!/bin/sh
-echo " foofoofoo" >&9
-END
-chmod a+x foo.sh
-
-cat > bar <<'END'
-#!/bin/sh
-echo " barbarbar" >&9
-END
-
-chmod a+x foo.sh bar
-
 cat > baz.c <<'END'
 #include <stdio.h>
 #include <unistd.h>
@@ -88,28 +84,31 @@ int main (void)
 }
 END
 
-./configure
+st=0; ./configure || st=$?
+cat config.log # For debugging, as we do tricky checks in configure.
+if test $st -eq 63; then
+  skip_ "fd redirect in compiled program unsupported"
+elif test $st -eq 0; then
+  : Continue.
+else
+  fatal_ "unexpected error in ./configure"
+fi
 
 # Sanity checks.
 st=0
-grep '^bar\.log:.*bar' Makefile || st=1
 grep '^baz\.log:.*baz\$(EXEEXT)' Makefile || st=1
 grep '^\.test\$(EXEEXT)\.log:' Makefile || st=1
-$EGREP '^(foo|qux)\.log:' Makefile && st=1
+grep '^qux\.log:' Makefile && st=1
 test $st -eq 0 || fatal_ "doesn't cover expected code paths"
 
 st=0
 $MAKE check >stdout || st=1
 cat stdout
-cat foo.log
-cat bar.log
 cat baz.log
 cat qux.log
 test $st -eq 0
-grep "^ foofoofoo$" stdout
-grep "^ barbarbar$" stdout
 grep "^ bazbazbaz$" stdout
 grep "^ quxquxqux$" stdout
-$EGREP '(foofoofoo|barbarbar|bazbazbaz|quxquxqux)' *.log && Exit 1
+$EGREP '(bazbazbaz|quxquxqux)' *.log && Exit 1
 
 :
diff --git a/tests/parallel-tests-fd-redirect.test 
b/tests/parallel-tests-fd-redirect.test
index 8b16378..f22b31a 100755
--- a/tests/parallel-tests-fd-redirect.test
+++ b/tests/parallel-tests-fd-redirect.test
@@ -15,36 +15,22 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # parallel-tests support: redirection of file descriptors with
-# AM_TESTS_FD_REDIRECT, even when using tests without suffix, or
-# which are binary executables.
-# We use some tricks to ensure that all code paths in `lib/am/check2.am'
-# are covered, even on platforms where $(EXEEXT) would be naturally empty.
+# AM_TESTS_FD_REDIRECT, even when using tests without suffix.
+# The sister `parallel-tests-fd-redirect-exeext.test' do a similar
+# check for tests that are binary executables.
 # See also the more generic test 'check-fd-redirect.test'.
 
-required='cc native'
 am_parallel_tests=yes
 . ./defs || Exit 1
 
 cat >> configure.in << 'END'
-AC_PROG_CC
-AM_CONDITIONAL([real_EXEEXT], [test -n "$EXEEXT"])
-test -n "$EXEEXT" || EXEEXT=.bin
 AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
 AM_TESTS_FD_REDIRECT = 9>&1
 TEST_EXTENSIONS = .test .sh
-TESTS = foo.sh bar $(check_PROGRAMS)
-check_PROGRAMS = baz qux.test
-qux_test_SOURCES = zardoz.c
-
-## Sanity check.
-if !real_EXEEXT
-check-local:
-       test -f baz.bin
-       test -f qux.test.bin
-endif
+TESTS = foo.sh bar
 END
 
 $ACLOCAL
@@ -64,52 +50,21 @@ END
 
 chmod a+x foo.sh bar
 
-cat > baz.c <<'END'
-#include <stdio.h>
-#include <unistd.h>
-int main (void)
-{
-  ssize_t res = write (9, " bazbazbaz\n", 11);
-  if (res < 0)
-    perror("write failed");
-  return res != 11;
-}
-END
-
-cat > zardoz.c <<'END'
-#include <stdio.h>
-#include <unistd.h>
-int main (void)
-{
-  ssize_t res = write (9, " quxquxqux\n", 11);
-  if (res < 0)
-    perror("write failed");
-  return res != 11;
-}
-END
-
 ./configure
 
 # Sanity checks.
 st=0
 grep '^bar\.log:.*bar' Makefile || st=1
-grep '^baz\.log:.*baz\$(EXEEXT)' Makefile || st=1
-grep '^\.test\$(EXEEXT)\.log:' Makefile || st=1
-$EGREP '^(foo|qux)\.log:' Makefile && st=1
+grep '^foo\.log:' Makefile && st=1
 test $st -eq 0 || fatal_ "doesn't cover expected code paths"
 
-st=0
-$MAKE check >stdout || st=1
+st=0; $MAKE check >stdout || st=1
 cat stdout
 cat foo.log
 cat bar.log
-cat baz.log
-cat qux.log
 test $st -eq 0
 grep "^ foofoofoo$" stdout
 grep "^ barbarbar$" stdout
-grep "^ bazbazbaz$" stdout
-grep "^ quxquxqux$" stdout
-$EGREP '(foofoofoo|barbarbar|bazbazbaz|quxquxqux)' *.log && Exit 1
+$EGREP '(foofoofoo|barbarbar)' *.log && Exit 1
 
 :
diff --git a/tests/postproc.test b/tests/postproc.test
deleted file mode 100755
index 2208d66..0000000
--- a/tests/postproc.test
+++ /dev/null
@@ -1,49 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2002, 2004, 2009, 2010, 2011 Free Software Foundation,
-# Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Check to make sure we recognize a Makefile.in, even if post-processed
-# and renamed.
-
-required=cc
-. ./defs || Exit 1
-
-cat >configure.in <<END
-AC_INIT([$me], [1.0])
-AM_INIT_AUTOMAKE
-AC_PROG_CC
-AC_CONFIG_FILES([myMakefile])
-AC_OUTPUT
-END
-
-cat > myMakefile.am << 'END'
-bin_PROGRAMS = fred
-fred_SOURCES = fred.c
-END
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE -- myMakefile
-
-mv myMakefile.in myMakefile.old
-echo '# Post-processed by post-processor 3.14.' > myMakefile.in
-cat myMakefile.old >> myMakefile.in
-
-./configure
-
-test -f .deps/fred.Po || test -f _deps/fred.Po || Exit 1
-
-:
diff --git a/tests/pr243.test b/tests/pr243.test
deleted file mode 100755
index 2b11fb7..0000000
--- a/tests/pr243.test
+++ /dev/null
@@ -1,58 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2001, 2002, 2009, 2010, 2011 Free Software Foundation,
-# Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Test for PR 243.
-# AM_OUTPUT_DEPENDENCY_COMMANDS doesn't handle
-# `Makefile:Makefile.in:tail.mk' in AC_OUTPUT.
-#
-# == Report ==
-# If configure.in has something like:
-#       AC_OUTPUT(Makefile:Makefile.in:tail.mk)
-# then config.status cannot parse the Makefile to build the
-# dependency files in the .deps directory.  This is because
-# the AM_OUTPUT_DEPENDENCY_COMMANDS macro cannot cope with
-# the colon in the CONFIG_FILES variable.
-
-required=cc
-. ./defs || Exit 1
-
-cat > configure.in << END
-AC_INIT([$me], [1.0])
-AM_INIT_AUTOMAKE
-AC_PROG_CC
-AC_CONFIG_FILES([Makefile:Makefile.in:tail.mk])
-AC_OUTPUT
-END
-
-: > tail.mk
-
-cat > Makefile.am << 'END'
-include_HEADERS  = 3dfx.h linutil.h
-noinst_HEADERS   = fx64.h fxdll.h fximg.h fxglob.h \
-                   fxos.h fxver.h glob.h
-noinst_PROGRAMS = fxmisc
-fxmisc_SOURCES  = fx64.c fximg.c fxos.c linutil.c
-END
-
-$ACLOCAL
-$AUTOMAKE
-$AUTOCONF
-./configure
-
-test -f .deps/fx64.Po
-
-:
diff --git a/tests/pr266.test b/tests/pr266.test
deleted file mode 100755
index cff6bca..0000000
--- a/tests/pr266.test
+++ /dev/null
@@ -1,47 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2001, 2002, 2009, 2010, 2011 Free Software Foundation,
-# Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Test for PR 266.
-# Dependency tracking -vs- nonstandard Makefile names
-
-required=cc
-. ./defs || Exit 1
-
-cat > configure.in << END
-AC_INIT([$me], [1.0])
-AM_INIT_AUTOMAKE
-AC_PROG_CC
-AC_CONFIG_FILES([Maudefile])
-AC_OUTPUT
-END
-
-cat > Maudefile.am << 'END'
-include_HEADERS = 3dfx.h linutil.h
-noinst_HEADERS  = fx64.h fxdll.h fximg.h fxglob.h \
-                  fxos.h fxver.h glob.h
-noinst_PROGRAMS = fxmisc
-fxmisc_SOURCES  = fx64.c fximg.c fxos.c linutil.c
-END
-
-$ACLOCAL
-$AUTOMAKE
-$AUTOCONF
-./configure --enable-dependency-tracking
-
-test -f .deps/fx64.Po
-
-:
diff --git a/tests/specflg7.test b/tests/specflg7.test
index 60c1a9d..da062d9 100755
--- a/tests/specflg7.test
+++ b/tests/specflg7.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
@@ -57,7 +57,9 @@ $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 18527ed..99b9151 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
@@ -57,7 +57,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/subobj11a.test b/tests/subobj11a.test
index 6ec938e..a46d961 100755
--- a/tests/subobj11a.test
+++ b/tests/subobj11a.test
@@ -63,6 +63,7 @@ $AUTOMAKE -a
 
 ./configure --enable-dependency-tracking
 
+$MAKE
 depdir=`sed -n 's/^ *DEPDIR *= *//p' Makefile`
 if test x"$depdir" != x; then
   depdir=src/$depdir
diff --git a/tests/subobj11c.test b/tests/subobj11c.test
index d0f622b..a401e14 100755
--- a/tests/subobj11c.test
+++ b/tests/subobj11c.test
@@ -46,6 +46,6 @@ $AUTOMAKE -a
 #
 # FIXME: Are we sure this is the most sensible output in our situation?
 #
-grep 'address@hidden@include [^/]*//\$(DEPDIR)/zardoz\.[^/]*$' Makefile.in
+grep 'address@hidden@-include [^/]*//\$(DEPDIR)/zardoz\.[^/]*$' Makefile.in
 
 :
diff --git a/tests/substref.test b/tests/substref.test
index 8154496..7b30423 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
@@ -44,7 +44,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.tap b/tests/suffix8.tap
index ed6cd24..a4415a4 100755
--- a/tests/suffix8.tap
+++ b/tests/suffix8.tap
@@ -46,6 +46,8 @@ libfoo_la_SOURCES = bar.x_
        cp $< $@
 .y_.o:
        cp $< $@
+.y_.obj:
+       cp $< $@
 .y_.z_:
        cp $< $@
 .z_.lo:
diff --git a/tests/transform2.test b/tests/transform2.test
index 010ca40..a7dd9f9 100755
--- a/tests/transform2.test
+++ b/tests/transform2.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2003, 2004, 2007, 2008, 2011 Free Software
+# Copyright (C) 2002, 2003, 2004, 2007, 2008, 2011, 2012 Free Software
 # Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -74,9 +74,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
+
 :


hooks/post-receive
-- 
GNU Automake



reply via email to

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