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.12.2


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.12.2-863-gd8674c2
Date: Sat, 11 Aug 2012 17:32:36 +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=d8674c2d66ff1cf4ef7ca23316f6654c52c2e0db

The branch, ng/master has been updated
       via  d8674c2d66ff1cf4ef7ca23316f6654c52c2e0db (commit)
       via  640f419b9a43623b9157697e49ff9781505572fc (commit)
       via  cffcd8b4d22103f2b9f07a961ebd821e06ec5c33 (commit)
       via  62a04670b01130a8cbf71d837ec4944ad38dad05 (commit)
       via  cc2ae6e5d07709421ecc3459740c03ed45f47376 (commit)
       via  519bd98354a4b3dbaac89234420e35a094223300 (commit)
       via  f1ec84dfbf1cc2a24225ba7ed459cc5b75876e9d (commit)
       via  0ac4fa0e027a090e598a9106d5c4c5b10068c087 (commit)
       via  0d5c01345c418620c08d24e1bc87a5e3fe692be0 (commit)
       via  93db6407baed3590fcdcfb617a47db2a81a53cfb (commit)
       via  027bbc854f96db5b0301949b6e73e64c9b808322 (commit)
       via  f4b45dd4c6422cc612aab23b7b8c03153e22884e (commit)
       via  ade4d2c549683dcda993f8b6b07c713867ae6d81 (commit)
       via  b380e47c0c81de143cf49256f0cb159ee1216cde (commit)
       via  a413ebeb1f267ae527e17eea900453e99b114664 (commit)
       via  51d6292fac313fb570022d6b2f277acabc92abdb (commit)
       via  d90a35580f7de7e07ac7e6a6e6f2949ca00be193 (commit)
       via  8305243a89dfd229cb91850aea690d84053109ef (commit)
       via  1a3d5b7202148e31d672e5cecf5931e5225a4f29 (commit)
       via  e103124bde7d7ed05375b425fb80056b94b18550 (commit)
       via  488d56525c7e1146bf77b7693447399fef33f5e7 (commit)
       via  21bfd7ac1ea06b3597d9df3391b7512bae588489 (commit)
       via  784c2fe78300b7703a557bbe159fe860ac7c62c4 (commit)
       via  a91c15c3a71d8bfa0398a0dfcab570f66a9a846a (commit)
       via  91e56c08069ea37a113ba2d0f78c70c7d2705a00 (commit)
       via  a83b9ad64509c192b84a729e7340a2c055474488 (commit)
       via  9c9d1696d6f01aa7dcb921c4a1ab073c77d23a09 (commit)
       via  a0b4c880616c0a427e00231b0766c9fe6c2569ed (commit)
       via  60b6c2e4e5f95aabf7a652f68123305968d3e3c3 (commit)
       via  9c12e9b5a6ed5b004232f540443ca40f7731c70e (commit)
       via  675daed05f1d373855f578f0f9c3c0d025184eec (commit)
       via  301664e766be542ae9545d23705cdb61efff042f (commit)
      from  bcade0fd44698d63ef42dee21db86bbaf63c8247 (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 d8674c2d66ff1cf4ef7ca23316f6654c52c2e0db
Author: Stefano Lattarini <address@hidden>
Date:   Sat Aug 11 19:21:58 2012 +0200

    [ng] diagnostic: don't bother explicitly rejecting ansi2knr stuff
    
    That is, fail through the usual avenues ("possibly undefined macro
    'AM_C_PROTOTYPES', "option 'ansi2knr' not recognized") rather than
    giving a special error message "automatic de-ANSI-fication support
    has been removed".  Since the removal has taken place in Automake 1.12
    already, people will have got used to it once Automake-NG gets stable
    enough.
    
    * lib/Automake/Options.pm (_process_option_list): Remove special
    handling of 'ansi2knr' option.
    * m4/protos.m4: Remove.
    * Makefile.am (dist_automake_ac_DATA): Adjust.
    * t/ansi2knr-no-more.sh: Remove.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 640f419b9a43623b9157697e49ff9781505572fc
Author: Stefano Lattarini <address@hidden>
Date:   Sat Aug 11 18:59:35 2012 +0200

    [ng] subdirs: merge $(RECURSIVE_CLEAN_TARGETS) into $(RECURSIVE_TARGETS)
    
    * lib/am/subdirs.mk: Here.  They had once been separated for historical
    reasons, but such separation is not needed anymore today.
    * NG-NEWS: Update.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit cffcd8b4d22103f2b9f07a961ebd821e06ec5c33
Author: Stefano Lattarini <address@hidden>
Date:   Sat Aug 11 18:52:02 2012 +0200

    [ng] rename: am__recursive_targets -> am.recurs.all-targets
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 62a04670b01130a8cbf71d837ec4944ad38dad05
Author: Stefano Lattarini <address@hidden>
Date:   Sat Aug 11 18:18:18 2012 +0200

    [ng] subdirs: verbatim include of relevant makefile fragment
    
    * lib/am/subdirs.am: Rename ...
    * lib/am/subdirs.mk: ... like this.  Prefer '#' comments over
    '##' ones.
    * automake.in (handle_subdirs): Include it with the 'verbatim'
    function rather than with the 'file_contents' one.
    (generate_makefile): Move its call later.  This is actually required
    to avoid spurious failures.
    * Makefile.am (dist_am_DATA): Adjust.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit cc2ae6e5d07709421ecc3459740c03ed45f47376
Author: Stefano Lattarini <address@hidden>
Date:   Sat Aug 11 18:05:57 2012 +0200

    [ng] rename: am__extra_recursive_targets -> am.recurs.extra-targets
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 519bd98354a4b3dbaac89234420e35a094223300
Author: Stefano Lattarini <address@hidden>
Date:   Sat Aug 11 16:53:17 2012 +0200

    [ng] dist: cosmetics: improve output from "make dist"
    
    * lib/am/distdir.mk: Here, ensuring that the parts of the 'distdir'
    recipe that can be judged not to be needed are not even considered
    nor outputted.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit f1ec84dfbf1cc2a24225ba7ed459cc5b75876e9d
Author: Stefano Lattarini <address@hidden>
Date:   Sat Aug 11 16:45:42 2012 +0200

    [ng] dist: don't ignore errors in fixing permissions of distributed files
    
    * lib/am/distdir.mk (distdir): Here.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 0ac4fa0e027a090e598a9106d5c4c5b10068c087
Author: Stefano Lattarini <address@hidden>
Date:   Sat Aug 11 15:02:01 2012 +0200

    [ng] dist: cosmetic/clarity improvements
    
    * lib/am/distdir.mk: Here, using the fact that this file is now included
    verbatim and we can thus use GNU make constructs that would have confused
    the Automake parser.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 0d5c01345c418620c08d24e1bc87a5e3fe692be0
Author: Stefano Lattarini <address@hidden>
Date:   Sat Aug 11 15:52:15 2012 +0200

    [ng] dist: fixup: honour DIST_SUBDIRS rather than SUBDIRS in conditionals
    
    Regression introduced in recent patches, and revealed by a failure in
    test 't/subpkg2.sh'.
    
    * lib/am/distdir.mk: Here, throughout the file.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 93db6407baed3590fcdcfb617a47db2a81a53cfb
Author: Stefano Lattarini <address@hidden>
Date:   Sat Aug 11 15:18:34 2012 +0200

    [ng] tests: fix spurious testsuite failures introduced by recent changes
    
    * t/distcom2.sh: Remove as basically obsolete.
    * t/distcom3.sh: Use semantic checks rather than brittle grepping checks.
    * t/hdr-vars-defined-once.sh: Likewise.
    * t/location.sh: Remove some checks that would become too cumbersome to
    run.
    * t/targetclash.sh: Adjust to ensure the expected automake diagnostic is
    actually triggered.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 027bbc854f96db5b0301949b6e73e64c9b808322
Author: Stefano Lattarini <address@hidden>
Date:   Sat Aug 11 14:42:23 2012 +0200

    [ng] distdir: verbatim inclusion of relevant makefile fragment
    
    * lib/am/distdir.am: Rename ...
    * lib/am/distdir.mk: ... like here, with related adjustments.
    * automake.in (handle_dist): Include it using the 'verbatim'
    function, rather than the 'file_contents' one.
    * Makefile.am (dist_am_DATA): Adjust.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit f4b45dd4c6422cc612aab23b7b8c03153e22884e
Author: Stefano Lattarini <address@hidden>
Date:   Sat Aug 11 14:34:20 2012 +0200

    [ng] cleanup: remove a now-unused variable
    
    * automake.in (handle_dist): Here: '%transform'.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit ade4d2c549683dcda993f8b6b07c713867ae6d81
Author: Stefano Lattarini <address@hidden>
Date:   Sat Aug 11 14:14:32 2012 +0200

    [ng] dist: less use of transforms, prefer make variables (4)
    
    * automake.in (preprocess_file): Turn the '%CK-NEWS%' transform into ...
    (generate_makefile): ... the '$(am.conf.check-news)' internal variable.
    * lib/am/distdir.am (distdir): Adjust accordingly.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit b380e47c0c81de143cf49256f0cb159ee1216cde
Author: Stefano Lattarini <address@hidden>
Date:   Sat Aug 11 14:09:25 2012 +0200

    [ng] dist: less use of transforms, prefer make variables (3)
    
    * automake.in (handle_dist): Turn the '%DIST-COMMON%' transform
    into the 'am.dist.common-files.internal' internal variable.
    * lib/am/distdir.am (distdir): Adjust accordingly.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit a413ebeb1f267ae527e17eea900453e99b114664
Author: Stefano Lattarini <address@hidden>
Date:   Sat Aug 11 14:05:43 2012 +0200

    [ng] dist: less use of transforms, prefer make variables (2)
    
    * automake.in (handle_dist): Turn the '%DIST-TARGETS%' transform
    into the 'am.dist.extra-targets' internal variable.
    * lib/am/distdir.am (distdir): Adjust and simplify accordingly.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 51d6292fac313fb570022d6b2f277acabc92abdb
Author: Stefano Lattarini <address@hidden>
Date:   Sat Aug 11 13:52:54 2012 +0200

    [ng] dist: less use of transforms, prefer make variables (1)
    
    * automake.in (handle_dist): Turn the '%FILENAME_FILTER%' transform
    into the 'am.dist.filename-filter' internal variable.
    * lib/am/distdir.am (distdir): Adjust and simplify accordingly (and
    improve an error message while at it).  In particular, this removed
    the need for ...
    (am.dist.skip-length-check): ... this variable.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit d90a35580f7de7e07ac7e6a6e6f2949ca00be193
Author: Stefano Lattarini <address@hidden>
Date:   Sat Aug 11 13:51:21 2012 +0200

    [ng] tests: fix a spurious failure
    
    * t/output11.sh: Here: some grepping checks had been broken by the
    recent changes.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 8305243a89dfd229cb91850aea690d84053109ef
Author: Stefano Lattarini <address@hidden>
Date:   Sat Aug 11 13:36:43 2012 +0200

    [ng] dist: enhance comments; prefer '#' over '##' where possible
    
    * lib/am/distdir.am: Here, throughout the file, to make the output
    makefile more comprehensible.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 1a3d5b7202148e31d672e5cecf5931e5225a4f29
Author: Stefano Lattarini <address@hidden>
Date:   Sat Aug 11 13:07:29 2012 +0200

    [ng] rename: am__skip_mode_fix -> am.dist.skip-mode-fix
    
    * lib/am/distdir.am: Here.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit e103124bde7d7ed05375b425fb80056b94b18550
Author: Stefano Lattarini <address@hidden>
Date:   Sat Aug 11 13:05:48 2012 +0200

    [ng] rename: am__skip_length_check -> am.dist.skip-length-check
    
    * lib/am/distdir.am: Here.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 488d56525c7e1146bf77b7693447399fef33f5e7
Author: Stefano Lattarini <address@hidden>
Date:   Sat Aug 11 12:21:41 2012 +0200

    [ng] dist: avoid few extra forks when descending in $(SUBDIRS)
    
    * lib/am/distdir.am (distdir) [%?SUBDIRS%]: Here, by using
    "make -C subdir distdir" rather than "(cd subdir && make distdir)".
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 21bfd7ac1ea06b3597d9df3391b7512bae588489
Author: Stefano Lattarini <address@hidden>
Date:   Sat Aug 11 11:56:35 2012 +0200

    [ng] dist: cosmetic fix of "make dist" output
    
    * lib/am/distdir.am (distdir) [%?SUBDIRS%]: Here, by removing details
    no one is (or should) actually be interested to see.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 784c2fe78300b7703a557bbe159fe860ac7c62c4
Author: Stefano Lattarini <address@hidden>
Date:   Sat Aug 11 11:53:05 2012 +0200

    [ng] dist: fixup: remove stray references to obsolete archive formats
    
    * automake.in (handle_dist): Here, to 'shar' and 'tarZ'.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit a91c15c3a71d8bfa0398a0dfcab570f66a9a846a
Author: Stefano Lattarini <address@hidden>
Date:   Sat Aug 11 11:45:57 2012 +0200

    [ng] dist: fixup: run slower compressors first
    
    For better parallelism in "make dist".  This was already the case
    for mainline Automake, but our recent changes to the dist-related
    code in Automake-NG had broken that invariant.
    
    * automake.in (handle_dist): Here, use 'unshift' rather than
    'push' on '@archive_formats'.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 91e56c08069ea37a113ba2d0f78c70c7d2705a00
Author: Stefano Lattarini <address@hidden>
Date:   Sat Aug 11 11:40:41 2012 +0200

    [ng] dist: move a comment to a more proper place
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit a83b9ad64509c192b84a729e7340a2c055474488
Author: Stefano Lattarini <address@hidden>
Date:   Sat Aug 11 11:37:27 2012 +0200

    [ng] dist: more verbatim inclusion of relevant makefile fragments
    
    * lib/am/distdir.am: Move most of the '%?TOPDIR_P%'-protected, verbatim
    stuff (i.e., containing no Automake-time transforms) from here ...
    * lib/am/distcheck.mk: ... to here, with related adjustments.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 9c9d1696d6f01aa7dcb921c4a1ab073c77d23a09
Author: Stefano Lattarini <address@hidden>
Date:   Sat Aug 11 11:24:49 2012 +0200

    [ng] rename: am__post_remove_distdir -> am.dist.post-remove-distdir
    
    * lib/am/distdir.am: Here.
    * lib/am/distcheck.mk: And here.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit a0b4c880616c0a427e00231b0766c9fe6c2569ed
Author: Stefano Lattarini <address@hidden>
Date:   Sat Aug 11 11:22:12 2012 +0200

    [ng] rename: am__remove_distdir -> am.dist.remove-distdir
    
    * lib/am/distdir.am: Here.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 60b6c2e4e5f95aabf7a652f68123305968d3e3c3
Author: Stefano Lattarini <address@hidden>
Date:   Sat Aug 11 10:59:32 2012 +0200

    [ng] dist: remove obsolete distribution formats
    
    Those formats being the 'shar' archive and the tar archive compressed
    with 'compress'.  Support for them is kept in mainline Automake for
    the sake of backward compatibility only, and modern software releases
    should not use those formats anyway, so it's better if we just remove
    them.
    
    * NG-NEWS, doc/automake-ng.texi: Update.
    * lib/Automake/Options.pm (_is_valid_easy_option): Remove 'dist-shar'
    and 'dist-tarZ'.
    (_process_option_list): Give a fatal error if one of those two options
    is seen.
    * lib/am/distdir.am (am.dist.ext.tarZ, am.dist.ext.shar): Remove these
    variables.
    (dist-tarZ, dist-shar): And these targets.
    * lib/am/distcheck.mk (distcheck): Do not try to decompress '.shar.gz'
    or '.tar.Z' archives: they won't be there anyway.
    * t/dist-formats.tap: Adjust and simplify.
    * t/dist-obsolete.sh: New test.
    * t/lzma.sh: Remove, subsumed by it.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 9c12e9b5a6ed5b004232f540443ca40f7731c70e
Author: Stefano Lattarini <address@hidden>
Date:   Sat Aug 11 01:41:26 2012 +0200

    [ng] dist: refactor handling of dist formats a little
    
    * automake.in (handle_dist): Define list of default dist formats in the
    new internal make variable 'am.dist.formats'.  Related adjustments.
    (preprocess_file): Drop the following now-unused transforms: XZ, LZMA,
    LZIP, BZIP2, COMPRESS, GZIP, SHAR, ZIP.
    * lib/am/distdir.am: Drop any use of the removed transforms, throughout.
    (DIST_TARGETS): Redefine in function of '$(am.dist.formats)'.
    (.PHONY): Update in function of '$(am.dist.formats)'.
    (am.dist.ext.gzip, am.dist.ext.bzip2, am.dist.ext.xz, am.dist.ext.lzip,
    am.dist.ext.tarZ, am.dist.ext.shar, am.dist.ext.zip): New internal
    variables.
    (DIST_ARCHIVES): Redefine in function of them and of '$(am.dist.formats)'.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 675daed05f1d373855f578f0f9c3c0d025184eec
Author: Stefano Lattarini <address@hidden>
Date:   Fri Aug 10 19:47:37 2012 +0200

    [ng] rename: am.write-list-of-distfiles -> am.dist.write-filelist
    
    * lib/am/distdir.am: Here.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 301664e766be542ae9545d23705cdb61efff042f
Author: Stefano Lattarini <address@hidden>
Date:   Fri Aug 10 19:46:24 2012 +0200

    [ng] rename: am.mkdir-for-dist -> am.dist.xmkdir
    
    * lib/am/distdir.am: Here.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

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

Summary of changes:
 Makefile.am                       |    5 +-
 NG-NEWS                           |    9 +
 automake.in                       |   67 ++++----
 doc/automake-ng.texi              |   26 +---
 lib/Automake/Options.pm           |   18 ++-
 lib/am/distcheck.mk               |   69 ++++++++-
 lib/am/{distdir.am => distdir.mk} |  314 +++++++++++++------------------------
 lib/am/{subdirs.am => subdirs.mk} |   27 ++--
 m4/protos.m4                      |   13 --
 t/ansi2knr-no-more.sh             |   56 -------
 t/dist-formats.tap                |   17 +--
 t/{lzma.sh => dist-obsolete.sh}   |   22 ++--
 t/distcom2.sh                     |   69 --------
 t/distcom3.sh                     |   22 ++--
 t/hdr-vars-defined-once.sh        |   23 ++--
 t/location.sh                     |   11 +-
 t/output11.sh                     |   22 ++--
 t/targetclash.sh                  |    5 +-
 18 files changed, 302 insertions(+), 493 deletions(-)
 rename lib/am/{distdir.am => distdir.mk} (51%)
 rename lib/am/{subdirs.am => subdirs.mk} (80%)
 delete mode 100644 m4/protos.m4
 delete mode 100755 t/ansi2knr-no-more.sh
 rename t/{lzma.sh => dist-obsolete.sh} (73%)
 mode change 100755 => 100644
 delete mode 100755 t/distcom2.sh

diff --git a/Makefile.am b/Makefile.am
index 24b75d0..5b3d6ab 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -196,11 +196,12 @@ dist_am_DATA = \
   lib/am/tags.mk \
   lib/am/dejagnu.mk \
   lib/am/distcheck.mk \
+  lib/am/distdir.mk \
+  lib/am/subdirs.mk \
   lib/am/compile.am \
   lib/am/configure.am \
   lib/am/data.am \
   lib/am/depend2.am \
-  lib/am/distdir.am \
   lib/am/footer.am \
   lib/am/header.am \
   lib/am/java.am \
@@ -218,7 +219,6 @@ dist_am_DATA = \
   lib/am/python.am \
   lib/am/remake-hdr.am \
   lib/am/scripts.am \
-  lib/am/subdirs.am \
   lib/am/texi-vers.am \
   lib/am/texi-spec.am \
   lib/am/texinfos.am \
@@ -248,7 +248,6 @@ dist_automake_ac_DATA = \
   m4/minuso.m4 \
   m4/missing.m4 \
   m4/options.m4 \
-  m4/protos.m4 \
   m4/python.m4 \
   m4/runlog.m4 \
   m4/sanity.m4 \
diff --git a/NG-NEWS b/NG-NEWS
index 1d15d39..7d3bc75 100644
--- a/NG-NEWS
+++ b/NG-NEWS
@@ -223,6 +223,11 @@ Distribution
 
   Do not use any of these variables in your Makefiles!
 
+* Support for distribution archived in the '.shar.gz' and '.tar.Z' formats
+  have been removed.  Accordingly, the targets 'dist-shar' and 'dist-tarZ'
+  are no more present in the generated Makefiles, and the use of the
+  Automake options 'dist-shar' and 'dist-tarZ' will elicit a fatal error.
+
 
 Obsolete Features Removed
 =========================
@@ -290,6 +295,10 @@ Obsolete Features Removed
   missing the relevant maintainer-specific tools (or having too old
   versions thereof).
 
+* The $(RECURSIVE_CLEAN_TARGETS) variable (never documented, and
+  always intended to be an internal detail) has been removed, its
+  content merged into the $(RECURSIVE_TARGETS) variable.
+
 
 Source Files with Unknown Extensions
 ====================================
diff --git a/automake.in b/automake.in
index c1806ab..7361945 100644
--- a/automake.in
+++ b/automake.in
@@ -3172,9 +3172,6 @@ sub user_phony_rule ($)
 # Handle 'dist' target.
 sub handle_dist ()
 {
-  # Substitutions for distdir.am
-  my %transform;
-
   # Define DIST_SUBDIRS.  This must always be done, regardless of the
   # no-dist setting: target like 'distclean' or 'maintainer-clean' use it.
   my $subdirs = var ('SUBDIRS');
@@ -3210,16 +3207,25 @@ sub handle_dist ()
   # The remaining definitions are only required when a dist target is used.
   return if option 'no-dist';
 
-  # At least one of the archive formats must be enabled.
+  # The list of tarball formats we must support.
+  my @archive_formats;
   if ($relative_dir eq '.')
     {
-      my $archive_defined = option 'no-dist-gzip' ? 0 : 1;
-      $archive_defined ||=
-       grep { option "dist-$_" } qw(shar zip tarZ bzip2 lzip lzma xz);
-      error (option 'no-dist-gzip',
-            "no-dist-gzip specified but no dist-* specified,\n"
-            . "at least one archive format must be enabled")
-       unless $archive_defined;
+      # We order @archive_formats by expected duration of the
+      # compressors, slowest first, for better parallelism in
+      # "make dist".
+      unshift @archive_formats, 'gzip' unless option 'no-dist-gzip';
+      foreach my $fmt (qw/zip bzip2 lzip xz/)
+        {
+          unshift @archive_formats, $fmt if option "dist-$fmt";
+        }
+      # At least one of the archive formats must be enabled.
+      if (@archive_formats == 0)
+        {
+          error (option 'no-dist-gzip',
+                 "no-dist-gzip specified but no dist-* specified,\n"
+                 . "at least one archive format must be enabled");
+        }
     }
 
   # Look for common files that should be included in distribution.
@@ -3281,22 +3287,21 @@ sub handle_dist ()
                    rule ('distcheck-hook') ? 'yes' : '');
   define_variable ('am.dist.handle-gettext', INTERNAL,
                    $seen_gettext && !$seen_gettext_external ? 'yes' : '');
+  define_variable ('am.dist.formats', INTERNAL, @archive_formats);
+
+  my $flm = option 'filename-length-max';
+  define_variable ('am.dist.filename-filter', INTERNAL,
+                   $flm ? ('.' x $flm->[1]) : '');
 
   # If the target 'dist-hook' exists, make sure it is run.  This
   # allows users to do random weird things to the distribution
   # before it is packaged up.
   push (@dist_targets, 'dist-hook')
     if user_phony_rule 'dist-hook';
-  $transform{'DIST-TARGETS'} = join (' ', @dist_targets);
+  define_variable ('am.dist.extra-targets', INTERNAL, @dist_targets);
+  define_variable ('am.dist.common-files.internal', INTERNAL, @dist_common);
 
-  my $flm = option ('filename-length-max');
-  my $filename_filter = $flm ? '.' x $flm->[1] : '';
-
-  $output_rules .= &file_contents ('distdir',
-                                  new Automake::Location,
-                                  %transform,
-                                  FILENAME_FILTER => $filename_filter,
-                                   'DIST-COMMON' => "@dist_common");
+  verbatim ('distdir');
   verbatim ('distcheck') if $relative_dir eq '.';
 }
 
@@ -3352,7 +3357,7 @@ sub handle_subdirs ()
   check_directories_in_var $dsubdirs
     if $dsubdirs;
 
-  $output_rules .= &file_contents ('subdirs', new Automake::Location);
+  verbatim ('subdirs');
 }
 
 
@@ -3814,7 +3819,7 @@ sub handle_user_recursion ()
 {
   return unless @extra_recursive_targets;
 
-  define_variable ('am__extra_recursive_targets', INTERNAL,
+  define_variable ('am.recurs.extra-targets', INTERNAL,
                    map { "$_-recursive" } @extra_recursive_targets);
   my $aux = var ('SUBDIRS') ? 'recursive' : 'am';
   foreach my $target (@extra_recursive_targets)
@@ -5666,19 +5671,9 @@ sub preprocess_file ($%)
 
   # Complete %transform with global options.
   # Note that %transform goes last, so it overrides global options.
-  %transform = ( 'XZ'          => !! option 'dist-xz',
-                'LZMA'        => !! option 'dist-lzma',
-                'LZIP'        => !! option 'dist-lzip',
-                'BZIP2'       => !! option 'dist-bzip2',
-                'COMPRESS'    => !! option 'dist-tarZ',
-                'GZIP'        =>  ! option 'no-dist-gzip',
-                'SHAR'        => !! option 'dist-shar',
-                'ZIP'         => !! option 'dist-zip',
-
-                'INSTALL-INFO' =>  ! option 'no-installinfo',
+  %transform = ( 'INSTALL-INFO' =>  ! option 'no-installinfo',
                 'INSTALL-MAN'  =>  ! option 'no-installman',
                 'HAVE-MANS'    => !! var ('MANS'),
-                'CK-NEWS'      => !! option 'check-news',
 
                 'SUBDIRS'      => !! var ('SUBDIRS'),
                 'TOPDIR_P'     => $relative_dir eq '.',
@@ -6684,6 +6679,8 @@ sub generate_makefile ($$)
   define_variable ('subdir', INTERNAL, $relative_dir);
   define_variable ('am.conf.is-topdir', INTERNAL,
                    $relative_dir eq '.' ? "yes" : "");
+  define_variable ('am.conf.check-news', INTERNAL,
+                   option 'check-news' ? "yes" : "");
   define_variable ('am.conf.aux-dir', INTERNAL, $am_config_aux_dir);
   define_variable ('am.relpath.makefile', INTERNAL, basename ($makefile));
   define_variable ('am.relpath.makefile.am', INTERNAL,
@@ -6739,7 +6736,6 @@ sub generate_makefile ($$)
   handle_data;
   handle_headers;
   verbatim ('tags');
-  handle_subdirs;
   handle_user_recursion;
   handle_minor_options;
 
@@ -6765,6 +6761,9 @@ sub generate_makefile ($$)
   verbatim ('common-targets');
 
   handle_clean ();
+  # This must really come late.
+  handle_subdirs;
+
   handle_factored_dependencies;
 
   # Comes last, because all the above procedures may have
diff --git a/doc/automake-ng.texi b/doc/automake-ng.texi
index 8bee89e..1470f63 100644
--- a/doc/automake-ng.texi
+++ b/doc/automake-ng.texi
@@ -8569,10 +8569,6 @@ Generate an @samp{lzip} tar archive of the distribution. 
 @command{lzip}
 archives are frequently smaller than @command{bzip2}-compressed archives.
 @trindex dist-lzip
 
address@hidden @code{dist-shar}
-Generate a shar archive of the distribution.
address@hidden dist-shar
-
 @vindex XZ_OPT
 @item @code{dist-xz}
 Generate an @samp{xz} tar archive of the distribution.  @command{xz}
@@ -8588,10 +8584,6 @@ default compression ratio, but with a progress indicator:
 Generate a zip archive of the distribution.
 @trindex dist-zip
 
address@hidden @code{dist-tarZ}
-Generate a compressed tar archive of
-the distribution.
address@hidden dist-tarZ
 @end table
 
 The rule @code{dist} (and its historical synonym @code{dist-all}) will
@@ -9929,24 +9921,12 @@ Hook @code{dist-bzip2} to @code{dist}.
 Hook @code{dist-lzip} to @code{dist}.
 @trindex dist-lzip
 
address@hidden @option{dist-shar}
address@hidden Option, @option{dist-shar}
address@hidden dist-shar
-Hook @code{dist-shar} to @code{dist}.
address@hidden dist-shar
-
 @item @option{dist-zip}
 @cindex Option, @option{dist-zip}
 @opindex dist-zip
 Hook @code{dist-zip} to @code{dist}.
 @trindex dist-zip
 
address@hidden @option{dist-tarZ}
address@hidden Option, @option{dist-tarZ}
address@hidden dist-tarZ
-Hook @code{dist-tarZ} to @code{dist}.
address@hidden dist-tarZ
-
 @item @option{filename-length-max=99}
 @cindex Option, @option{filename-length-max=99}
 @opindex filename-length-max=99
@@ -10112,7 +10092,7 @@ These three mutually exclusive options select the tar 
format to use
 when generating tarballs with @samp{make dist}.  (The tar file created
 is then compressed according to the set of @option{no-dist-gzip},
 @option{dist-bzip2}, @option{dist-lzip}, @option{dist-xz} and
address@hidden options in use.)
address@hidden options in use.)
 
 These options must be passed as arguments to @code{AM_INIT_AUTOMAKE}
 (@pxref{Macros}) because they can require additional configure checks.
@@ -12843,11 +12823,11 @@ suite failures, please attach the 
@file{test-suite.log} file.
 @c  LocalWords:  installinfo vers MAKEINFO makeinfo MAKEINFOFLAGS noinstall rf
 @c  LocalWords:  mandir thesame alsothesame installman myexecbin DESTDIR Pinard
 @c  LocalWords:  uninstall installdirs uninstalls MOSTLYCLEANFILES mostlyclean
address@hidden  LocalWords:  DISTCLEANFILES MAINTAINERCLEANFILES GZIP gzip shar 
exp
address@hidden  LocalWords:  DISTCLEANFILES MAINTAINERCLEANFILES GZIP gzip exp
 @c  LocalWords:  distdir distcheck distcleancheck listfiles distuninstallcheck
 @c  LocalWords:  VPATH tarfile stdout XFAIL DejaGnu dejagnu DEJATOOL runtest ln
 @c  LocalWords:  RUNTESTDEFAULTFLAGS toolchain RUNTESTFLAGS asis readme DVIPS
address@hidden  LocalWords:  installcheck gzipped tarZ std utils etags mkid cd
address@hidden  LocalWords:  installcheck gzipped std utils etags mkid cd
 @c  LocalWords:  ARGS taggable ETAGSFLAGS lang ctags CTAGSFLAGS GTAGS gtags idl
 @c  LocalWords:  foocc doit idlC multilibs ABIs cmindex defmac ARG enableval FC
 @c  LocalWords:  MSG xtrue DBG pathchk CYGWIN afile proglink versioned CVS's TE
diff --git a/lib/Automake/Options.pm b/lib/Automake/Options.pm
index df84423..bdb3db9 100644
--- a/lib/Automake/Options.pm
+++ b/lib/Automake/Options.pm
@@ -272,8 +272,6 @@ sub _is_valid_easy_option ($)
     dejagnu
     dist-bzip2
     dist-lzip
-    dist-shar
-    dist-tarZ
     dist-xz
     dist-zip
     ng
@@ -316,12 +314,6 @@ sub _process_option_list (\%@)
         {
           set_strictness ($_);
         }
-      elsif (/^(.*\/)?ansi2knr$/)
-        {
-          # Obsolete (and now removed) de-ANSI-fication support.
-          error ($where,
-                 "automatic de-ANSI-fication support has been removed");
-        }
       elsif ($_ eq 'cygnus')
         {
           error $where, "support for Cygnus-style trees has been removed";
@@ -331,6 +323,16 @@ sub _process_option_list (\%@)
           error ($where, "support for lzma-compressed distribution " .
                          "archives has been removed");
         }
+      elsif ($_ eq 'dist-tarZ')
+        {
+          error ($where, "distribution archives compressed with legacy " .
+                         "'compress' program are no more supported");
+        }
+      elsif ($_ eq 'dist-shar')
+        {
+          error ($where, "support for shar distribution archives has " .
+                         "been removed");
+        }
       elsif (/^filename-length-max=(\d+)$/)
         {
           delete $options->{$_};
diff --git a/lib/am/distcheck.mk b/lib/am/distcheck.mk
index b358997..6569387 100644
--- a/lib/am/distcheck.mk
+++ b/lib/am/distcheck.mk
@@ -11,6 +11,69 @@
 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ## GNU General Public License for more details.
 
+
+# ---------------------------------------- #
+#  Building various distribution flavors.  #
+# ---------------------------------------- #
+
+# Note that we don't use GNU tar's '-z' option.  One reason (but
+# not the only reason) is that some versions of tar (e.g., OSF1)
+# interpret '-z' differently.
+#
+# The -o option of GNU tar used to exclude empty directories.  This
+# behavior was fixed in tar 1.12 (released on 1997-04-25).  But older
+# versions of tar are still used (for instance NetBSD 1.6.1 ships
+# with tar 1.11.2).  We do not do anything specific w.r.t. this
+# incompatibility since packages where empty directories need to be
+# present in the archive are really unusual.
+
+am.dist.ext.gzip  = tar.gz
+am.dist.ext.bzip2 = tar.bz2
+am.dist.ext.xz    = tar.xz
+am.dist.ext.lzip  = tar.lz
+am.dist.ext.zip   = zip
+
+DIST_TARGETS  = $(foreach x,$(am.dist.formats),dist-$x)
+DIST_ARCHIVES = $(foreach x,$(am.dist.formats),$(distdir).$(am.dist.ext.$x))
+.PHONY: $(foreach x,$(am.dist.formats),dist-$x)
+
+GZIP_ENV = --best
+dist-gzip: distdir
+       tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c 
>$(distdir).tar.gz
+       $(am.dist.post-remove-distdir)
+
+dist-bzip2: distdir
+       tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c 
>$(distdir).tar.bz2
+       $(am.dist.post-remove-distdir)
+
+dist-lzip: distdir
+       tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} 
>$(distdir).tar.lz
+       $(am.dist.post-remove-distdir)
+
+dist-xz: distdir
+       tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c 
>$(distdir).tar.xz
+       $(am.dist.post-remove-distdir)
+
+dist-zip: distdir
+       rm -f $(distdir).zip
+       zip -rq $(distdir).zip $(distdir)
+       $(am.dist.post-remove-distdir)
+
+
+# -------------------------------------------------- #
+#  Building all the requested distribution flavors.  #
+# -------------------------------------------------- #
+
+ifdef
+AM_RECURSIVE_TARGETS += dist dist-all
+endif
+
+.PHONY: dist dist-all
+dist dist-all:
+       $(MAKE) $(DIST_TARGETS) am.dist.post-remove-distdir='@:'
+       $(am.dist.post-remove-distdir)
+
+
 # ---------------------------- #
 #  Checking the distribution.  #
 # ---------------------------- #
@@ -33,10 +96,6 @@ distcheck: dist
          lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
        *.tar.xz*) \
          xz -dc $(distdir).tar.xz | $(am__untar) ;;\
-       *.tar.Z*) \
-         uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
-       *.shar.gz*) \
-         GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
        *.zip*) \
          unzip $(distdir).zip ;;\
        esac
@@ -103,7 +162,7 @@ distcheck: dist
 ## Make sure to remove the dists we created in the test build directory.
          && rm -rf $(DIST_ARCHIVES) \
          && $(MAKE) distcleancheck
-       $(am__post_remove_distdir)
+       $(am.dist.post-remove-distdir)
        @(echo "$(distdir) archives ready for distribution: "; \
          list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
          sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
diff --git a/lib/am/distdir.am b/lib/am/distdir.mk
similarity index 51%
rename from lib/am/distdir.am
rename to lib/am/distdir.mk
index 2a08ad9..42fea54 100644
--- a/lib/am/distdir.am
+++ b/lib/am/distdir.mk
@@ -14,97 +14,115 @@
 ## You should have received a copy of the GNU General Public License
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-am.dist.common-files += %DIST-COMMON%
+am.dist.common-files += $(am.dist.common-files.internal)
 
-## Makefile fragments used internally by automake-generated Makefiles.
+# Makefile fragments used internally by automake-generated Makefiles.
 am.dist.mk-files = $(wildcard $(am.conf.aux-dir)/am-ng/*)
 
-## Use 'sort', not 'am.util.uniq', for performance reasons.  Luckily, we
-## don't care in which order the distributed files are.
+# Use 'sort', not 'am.util.uniq', for performance reasons.  Luckily, we
+# don't care in which order the distributed files are.
 am.dist.all-files = $(call am.memoize,am.dist.all-files,$(strip $(sort \
   $(am.dist.common-files) $(am.dist.sources) $(am.dist.mk-files) \
   $(TEXINFOS) $(EXTRA_DIST))))
 
-## Try to avoid repeated slashes in the entries, to make the filtering
-## in the 'am.dist.files-tmp2' definition below more reliable.
-## This idiom should compress up to four consecutive '/' characters
-## in each $(am.dist.all-files) entry.
+# Try to avoid repeated slashes in the entries, to make the filtering
+# in the 'am.dist.files-tmp2' definition below more reliable.
+# This idiom should compress up to four consecutive '/' characters
+# in each $(am.dist.all-files) entry.
 am.dist.files-tmp1 = $(call am.memoize,am.dist.files-tmp1, \
   $(subst //,/,$(subst //,/,$(am.dist.all-files))))
 
+# Files filtered out here require an ad-hoc "munging".
+#
+# 1. In the first $(patsubst), we strip leading $(srcdir) (which might
+#    appears in EXTRA_DIST, especially if one want to use the $(wildcard)
+#    built-in in there), so that in our 'distdir' recipe below we can loop
+#    on the list of distributed files and copy them in the distribution
+#    directory with a simple "cp $file $(distdir)/$file" -- which would
+#    break if $file contained a leading $(srcdir) component.  However,
+#    it should be noted that this filtering has the quite undesirable
+#    side effect of triggering a VPATH search also for files specified
+#    *explicitly* with a $(srcdir) prefix; but this limitation is also
+#    present in mainline Automake, and concerns only such corner-case
+#    situations that it's probably not worth worrying about.
+#
+# 2. In the second $(patsubst), we also rewrite $(top_srcdir) -- which
+#    can sometimes appear in $(am.dist.common-files), and can be an
+#    absolute path -- by $(top_builddir) (which is always relative).
+#    If needed, $(srcdir) will be prepended later by our VPATH-aware
+#    rules.  The same caveats reported above apply.
+#
 am.dist.files-tmp2 = $(call am.memoize,am.dist.files-tmp2, \
-## Files filtered out here require an ad-hoc "munging"; see the two
-## following 'patsubst's.
   $(filter-out $(srcdir)/% $(top_srcdir)/%, $(am.dist.files-tmp1)) \
-## Let's strip leading $(srcdir) (which might appears in EXTRA_DIST,
-## especially if one want to use the $(wildcard) built-in in there),
-## so that in our 'distdir' recipe below we can loop on the list of
-## distributed files and copy them in the distribution directory with
-## a simple "cp $file $(distdir)/$file" -- which would break if $file
-## contained a leading $(srcdir) component.
-## However, it should be noted that this filtering has the undesirable
-## side effect of triggering a VPATH search also for files specified
-## *explicitly* with a $(srcdir) prefix; but this limitation is also
-## present in mainstream Automake, and concerns only such corner-case
-## situations that it's probably not worth worrying about.
   $(patsubst $(srcdir)/%, %, \
              $(filter $(srcdir)/%, $(am.dist.files-tmp1))) \
-## Also rewrite $(top_srcdir) -- which can sometimes appear in
-## $(am.dist.common-files), and can be absolute -- by $(top_builddir)
-## (which is always relative).  If needed, $(srcdir) will be
-## prepended later by our VPATH-aware rules.
-## The same caveats reported above apply.
   $(patsubst $(top_srcdir)/%, $(top_builddir)/%, \
              $(filter $(top_srcdir)/%, $(am.dist.files-tmp1))))
 
-## Strip extra whitespaces, for more safety.
+# Strip extra whitespaces, for more safety.
 am.dist.files-cooked = \
   $(call am.memoize,am.dist.files-cooked,$(strip $(am.dist.files-tmp2)))
 
-## Given the pre-processing done above to the list of distributed files,
-## this definition ensures that we won't try to create the wrong
-## directories when $(top_srcdir) or $(srcdir) appears in some entry of
-## the list of all distributed files.
-## For example, with EXTRA_DIST containing "$(srcdir)/subdir/file", this
-## will allow our rules to correctly create "$(distdir)/subdir", and not
-## "$(distdir)/$(srcdir)/subdir" -- which, in a VPATH build where
-## "$(subdir) = ..", would be the build directory!
+# Given the pre-processing done above to the list of distributed files,
+# this definition ensures that we won't try to create the wrong
+# directories when $(top_srcdir) or $(srcdir) appears in some entry of
+# the list of all distributed files.
+# For example, with EXTRA_DIST containing "$(srcdir)/subdir/file", this
+# will allow our rules to correctly create "$(distdir)/subdir", and not
+# "$(distdir)/$(srcdir)/subdir" -- which, in a VPATH build where
+# "$(subdir) = ..", would be the build directory!
 am.dist.parent-dirs = \
   $(call am.memoize,am.dist.parent-dirs,$(strip $(sort \
     $(filter-out ., $(patsubst ./%,%,$(dir $(am.dist.files-cooked)))))))
 
-am.mkdir-for-dist = \
+# These two variables are used in the 'distdir' rule below to avoid
+# potetial problems with overly long command lines (the infamous
+# "Argument list too long" error).
+am.dist.xmkdir = \
   @$(MKDIR_P) $(patsubst %,"$(distdir)"/%,$1)$(am.chars.newline)
-am.write-list-of-distfiles = \
+am.dist.write-filelist = \
   @lst='$1'; for x in $$lst; do echo $$x; done \
     >> $(am.dir)/address@hidden(am.chars.newline)
 
-if %?TOPDIR_P%
+ifdef am.conf.is-topdir
+
+# This is user-overridable.
+ifeq ($(call am.vars.is-undef,distdir),yes)
 distdir = $(PACKAGE)-$(VERSION)
+endif
+
+# This is not, but must be public to be avaialable in the "dist-hook"
+# rules (this is also documented in the Automake manual).
 top_distdir = $(distdir)
 
-am__remove_distdir = \
-  if test -d "$(distdir)"; then \
+# A failed "make distcheck" might leace some parts of the $(distdir)
+# readonly, so we need these hoops to ensure it is removed correctly.
+# On MSYS (1.0.17, at least) it is not possible to remove a directory
+# that is in use; so, if the first rm fails, we sleep some seconds and
+# retry, to give pending processes some time to exit and "release" the
+# directory before we remove it.  The value of "some seconds" is 5 for
+# the moment, which is mostly an arbitrary value, but seems high enough
+# in practice.  See automake bug#10470.
+am.dist.remove-distdir = \
     find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
       && rm -rf "$(distdir)" \
-## On MSYS (1.0.17) it is not possible to remove a directory that is in
-## use; so, if the first rm fails, we sleep some seconds and retry, to
-## give pending processes some time to exit and "release" the directory
-## before we remove it.  The value of "some seconds" is 5 for the moment,
-## which is mostly an arbitrary value, but seems high enough in practice.
-## See automake bug#10470.
-      || { sleep 5 && rm -rf "$(distdir)"; }; \
-  else :; fi
-am__post_remove_distdir = $(am__remove_distdir)
-endif %?TOPDIR_P%
-
-if %?SUBDIRS%
-## computes a relative pathname RELDIR such that DIR1/RELDIR = DIR2.
-## Input:
-## - DIR1            relative pathname, relative to the current directory
-## - DIR2            relative pathname, relative to the current directory
-## Output:
-## - reldir          relative pathname of DIR2, relative to DIR1
+      || { sleep 5 && rm -rf "$(distdir)"; }
+
+# Define this separately, so that if can be overridden by the recursive
+# make invocation in 'dist-all'.  That is needed to support concurrent
+# creation of different tarball formats.
+am.dist.post-remove-distdir = \
+  test ! -d "$(distdir)" || { $(am.dist.remove-distdir); }
+
+endif # am.conf.is-topdir
+
+ifdef DIST_SUBDIRS
+# Computes a relative pathname RELDIR such that DIR1/RELDIR = DIR2.
+# Input:
+#   - dir1      relative pathname, relative to the current directory.
+#   - dir2      relative pathname, relative to the current directory.
+# Output:
+#   - reldir    relative pathname of dir2, relative to dir1.
 am.dist.relativize-path = \
   dir0=`pwd`; \
   sed_first='s,^\([^/]*\)/.*$$,\1,'; \
@@ -130,38 +148,32 @@ am.dist.relativize-path = \
     dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
   done; \
   reldir="$$dir2"
-endif %?SUBDIRS%
+endif # DIST_SUBDIRS
 
 .PHONY: distdir
-if %?SUBDIRS%
+ifdef DIST_SUBDIRS
 AM_RECURSIVE_TARGETS += distdir
-endif %?SUBDIRS%
+endif
 
 distdir: $(am.dist.all-files) | $(am.dir)
 ##
 ## For Gnits users, this is pretty handy.  Look at 15 lines
 ## in case some explanatory text is desirable.
 ##
-if %?TOPDIR_P%
-if  %?CK-NEWS%
+ifdef am.conf.is-topdir
+ifdef am.conf.check-news
        @case `sed 15q $(srcdir)/NEWS` in \
-       *"$(VERSION)"*) : ;; \
-       *) \
-         echo "NEWS not updated; not releasing" 1>&2; \
-         exit 1;; \
+         *'$(VERSION)'*) : ;; \
+         *) echo "NEWS not updated; not releasing" 1>&2; exit 1;; \
        esac
-endif  %?CK-NEWS%
-endif %?TOPDIR_P%
-##
-## Only for the top dir.
-##
-if %?TOPDIR_P%
-       $(am__remove_distdir)
+endif # am.conf.is-topdir
+## Avoid this command if there is no directory to clean.
+       $(if $(wildcard $(distdir)/),$(am.dist.remove-distdir))
        test -d "$(distdir)" || mkdir "$(distdir)"
-endif %?TOPDIR_P%
+endif # am.conf.check-news
 ## Make the subdirectories for the files, avoiding to exceed command
 ## line length limitations.
-       $(call am.xargs-map,am.mkdir-for-dist,$(am.dist.parent-dirs))
+       $(call am.xargs-map,am.dist.xmkdir,$(am.dist.parent-dirs))
 ## Install the files and directories, applying a "VPATH rewrite"
 ## by hand where needed.
 ## To get the files in the distribution directory, use 'cp', not 'ln'.
@@ -169,7 +181,7 @@ endif %?TOPDIR_P%
 ## distribute could actually be a cross-filesystem symlink -- this can
 ## easily happen if "gettextize" was run on the distribution.
        @rm -f $(am.dir)/address@hidden
-       $(call am.xargs-map,am.write-list-of-distfiles, \
+       $(call am.xargs-map,am.dist.write-filelist, \
               $(am.dist.files-cooked))
        @while read file; do \
 ## Always look for the file or directory to distribute in the build
@@ -213,7 +225,7 @@ endif %?TOPDIR_P%
 ## at the top level do the right thing.  If we're in the topmost
 ## directory, then we use 'distdir' instead of 'top_distdir'; this lets
 ## us work correctly with an enclosing package.
-if %?SUBDIRS%
+ifdef DIST_SUBDIRS
        @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
          if test "$$subdir" = .; then :; else \
            $(am.make.dry-run) \
@@ -226,35 +238,31 @@ if %?SUBDIRS%
            dir1=$$subdir; dir2="$(top_distdir)"; \
            $(am.dist.relativize-path); \
            new_top_distdir=$$reldir; \
-           echo " (cd $$subdir && $(MAKE) top_distdir="$$new_top_distdir" 
distdir="$$new_distdir" \\"; \
-           echo "     am__remove_distdir=: am__skip_length_check=: 
am__skip_mode_fix=: distdir)"; \
-           (cd $$subdir && \
-             $(MAKE) \
+           echo " $(MAKE) -C $$subdir distdir top_distdir=$$new_top_distdir 
distdir=$$new_distdir"; \
+           $(MAKE) -C $$subdir distdir \
                top_distdir="$$new_top_distdir" \
                distdir="$$new_distdir" \
-## Disable am__remove_distdir so that sub-packages do not clear a
+## Disable am.dist.remove-distdir so that sub-packages do not clear a
 ## directory we have already cleared and might even have populated
 ## (e.g. shared AUX dir in the sub-package).
-               am__remove_distdir=: \
+               am.dist.remove-distdir='' \
 ## Disable filename length check:
-               am__skip_length_check=: \
+               am.dist.filename-filter='' \
 ## No need to fix modes more than once:
-               am__skip_mode_fix=: \
-               distdir) \
+               am.dist.skip-mode-fix=yes \
              || exit 1; \
          fi; \
        done
-endif %?SUBDIRS%
+endif # DIST_SUBDIRS
 ##
 ## We might have to perform some last second updates, such as updating
 ## info files.
 ## We must explicitly set distdir and top_distdir for these sub-makes.
 ##
-if %?DIST-TARGETS%
-       $(MAKE) \
-         top_distdir="$(top_distdir)" distdir="$(distdir)" \
-         %DIST-TARGETS%
-endif %?DIST-TARGETS%
+ifdef am.dist.extra-targets
+       $(MAKE) $(am.dist.extra-targets) $(if $(am.conf.is-topdir),, \
+         top_distdir="$(top_distdir)" distdir="$(distdir)")
+endif
 ##
 ## This complex find command will try to avoid changing the modes of
 ## links into the source tree, in case they're hard-linked.
@@ -273,118 +281,20 @@ endif %?DIST-TARGETS%
 ## the whole subtree again.  This is a complexity reduction for a deep
 ## hierarchy of subpackages.
 ##
-if %?TOPDIR_P%
-       -test -n "$(am__skip_mode_fix)" \
-       || find "$(distdir)" -type d ! -perm -755 \
-               -exec chmod u+rwx,go+rx {} \; -o \
+ifdef am.conf.is-topdir
+ifndef am.dist.skip-mode-fix
+       find "$(distdir)" \
+         -type d ! -perm -755 -exec chmod u+rwx,go+rx {} \; -o \
          ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
          ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
          ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
        || chmod -R a+r "$(distdir)"
-if %?FILENAME_FILTER%
-       @if test -z "$(am__skip_length_check)" && find "$(distdir)" -type f 
-print | \
-         grep '^%FILENAME_FILTER%' 1>&2; then \
-         echo 'error: the above filenames are too long' 1>&2; \
+endif # !am.dist.skip-mode-fix
+ifdef am.dist.filename-filter
+       @if find "$(distdir)" -type f -print \
+           | grep '^$(am.dist.filename-filter)' 1>&2; then \
+         echo '$@: error: the above filenames are too long' 1>&2; \
          exit 1; \
        else :; fi
-endif %?FILENAME_FILTER%
-endif %?TOPDIR_P%
-
-
-
-## --------------------------------------- ##
-## Building various distribution flavors.  ##
-## --------------------------------------- ##
-
-## Note that we don't use GNU tar's '-z' option.  One reason (but not
-## the only reason) is that some versions of tar (e.g., OSF1)
-## interpret '-z' differently.
-##
-## The -o option of GNU tar used to exclude empty directories.  This
-## behavior was fixed in tar 1.12 (released on 1997-04-25).  But older
-## versions of tar are still used (for instance NetBSD 1.6.1 ships
-## with tar 1.11.2).  We do not do anything specific w.r.t. this
-## incompatibility since packages where empty directories need to be
-## present in the archive are really unusual.
-##
-## We order DIST_TARGETS by expected duration of the compressors,
-## slowest first, for better parallelism in "make dist".  Do not
-## reorder DIST_ARCHIVES, users may expect gzip to be first.
-
-if %?TOPDIR_P%
-
-?GZIP?DIST_ARCHIVES += $(distdir).tar.gz
-GZIP_ENV = --best
-.PHONY: dist-gzip
-dist-gzip: distdir
-       tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c 
>$(distdir).tar.gz
-       $(am__post_remove_distdir)
-
-?BZIP2?DIST_ARCHIVES += $(distdir).tar.bz2
-.PHONY: dist-bzip2
-dist-bzip2: distdir
-       tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c 
>$(distdir).tar.bz2
-       $(am__post_remove_distdir)
-
-?LZIP?DIST_ARCHIVES += $(distdir).tar.lz
-.PHONY: dist-lzip
-dist-lzip: distdir
-       tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} 
>$(distdir).tar.lz
-       $(am__post_remove_distdir)
-
-?XZ?DIST_ARCHIVES += $(distdir).tar.xz
-.PHONY: dist-xz
-dist-xz: distdir
-       tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c 
>$(distdir).tar.xz
-       $(am__post_remove_distdir)
-
-?COMPRESS?DIST_ARCHIVES += $(distdir).tar.Z
-.PHONY: dist-tarZ
-dist-tarZ: distdir
-       tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
-       $(am__post_remove_distdir)
-
-?SHAR?DIST_ARCHIVES += $(distdir).shar.gz
-.PHONY: dist-shar
-dist-shar: distdir
-       shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
-       $(am__post_remove_distdir)
-
-?ZIP?DIST_ARCHIVES += $(distdir).zip
-.PHONY: dist-zip
-dist-zip: distdir
-       rm -f $(distdir).zip
-       zip -rq $(distdir).zip $(distdir)
-       $(am__post_remove_distdir)
-
-?LZIP?DIST_TARGETS += dist-lzip
-?XZ?DIST_TARGETS += dist-xz
-?SHAR?DIST_TARGETS += dist-shar
-?BZIP2?DIST_TARGETS += dist-bzip2
-?GZIP?DIST_TARGETS += dist-gzip
-?ZIP?DIST_TARGETS += dist-zip
-?COMPRESS?DIST_TARGETS += dist-tarZ
-
-endif %?TOPDIR_P%
-
-
-
-## ------------------------------------------------- ##
-## Building all the requested distribution flavors.  ##
-## ------------------------------------------------- ##
-
-## Currently we cannot use if/endif inside a rule.  The file_contents
-## parser needs work.
-
-if %?TOPDIR_P%
-
-.PHONY: dist dist-all
-if %?SUBDIRS%
-AM_RECURSIVE_TARGETS += dist dist-all
-endif %?SUBDIRS%
-
-dist dist-all:
-       $(MAKE) $(DIST_TARGETS) am__post_remove_distdir='@:'
-       $(am__post_remove_distdir)
-
-endif %?TOPDIR_P%
+endif # am.dist.filename-filter
+endif # am.conf.is-topdir
diff --git a/lib/am/subdirs.am b/lib/am/subdirs.mk
similarity index 80%
rename from lib/am/subdirs.am
rename to lib/am/subdirs.mk
index 5040f55..9e70000 100644
--- a/lib/am/subdirs.am
+++ b/lib/am/subdirs.mk
@@ -14,20 +14,24 @@
 ## You should have received a copy of the GNU General Public License
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-RECURSIVE_TARGETS += all-recursive check-recursive installcheck-recursive
-RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive        \
-  distclean-recursive maintainer-clean-recursive
+RECURSIVE_TARGETS += \
+  all-recursive \
+  check-recursive \
+  installcheck-recursive \
+  mostlyclean-recursive \
+  clean-recursive \
+  distclean-recursive \
+  maintainer-clean-recursive
 
-am__recursive_targets = \
+am.recurs.all-targets = \
   $(RECURSIVE_TARGETS) \
-  $(RECURSIVE_CLEAN_TARGETS) \
-  $(am__extra_recursive_targets)
+  $(am.recurs.extra-targets)
 
-## All documented targets which invoke 'make' recursively, or depend
-## on targets that do so.  GNUmakefile from gnulib depends on this.
-AM_RECURSIVE_TARGETS += $(am__recursive_targets:-recursive=)
+# All documented targets which invoke 'make' recursively, or depend
+# on targets that do so.  GNUmakefile from gnulib depends on this.
+AM_RECURSIVE_TARGETS += $(am.recurs.all-targets:-recursive=)
 
-.PHONY: $(am__recursive_targets)
+.PHONY: $(am.recurs.all-targets)
 
 # This directory's subdirectories are mostly independent; you can cd
 # into them and run 'make' without going through this Makefile.
@@ -36,7 +40,7 @@ AM_RECURSIVE_TARGETS += $(am__recursive_targets:-recursive=)
 #     (which will cause the Makefiles to be regenerated when you run 'make');
 # (2) otherwise, pass the desired values on the 'make' command line.
 
-$(am__recursive_targets): %-recursive:
+$(am.recurs.all-targets): %-recursive:
 ## Using $failcom allows "-k" to keep its natural meaning when running a
 ## recursive rule.
        @fail= failcom='exit 1'; \
@@ -72,4 +76,3 @@ mostlyclean: mostlyclean-recursive
 clean: clean-recursive
 distclean: distclean-recursive
 maintainer-clean: maintainer-clean-recursive
-
diff --git a/m4/protos.m4 b/m4/protos.m4
deleted file mode 100644
index c8c7adc..0000000
--- a/m4/protos.m4
+++ /dev/null
@@ -1,13 +0,0 @@
-#  -*- Autoconf -*-
-# Obsolete (and now removed) automatic de-ANSI-fiction support.
-#
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([AM_C_PROTOTYPES],
-         [AC_FATAL([automatic de-ANSI-fication support has been removed])])
-
-AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])
diff --git a/t/ansi2knr-no-more.sh b/t/ansi2knr-no-more.sh
deleted file mode 100755
index 5387d20..0000000
--- a/t/ansi2knr-no-more.sh
+++ /dev/null
@@ -1,56 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Check that any attempt to use the obsolete de-ANSI-fication support
-# is diagnosed.
-
-. ./defs || exit 1
-
-warn_rx='automatic de-ANSI-fication.*removed'
-
-echo AC_PROG_CC >> configure.ac
-$ACLOCAL
-mv aclocal.m4 aclocal.sav
-cp configure.ac configure.sav
-
-echo AM_C_PROTOTYPES >> configure.ac
-
-$ACLOCAL -Wnone 2>stderr && { cat stderr >&2; exit 1; }
-cat stderr >&2
-grep "^configure\\.ac:5:.*$warn_rx" stderr
-
-cat aclocal.sav "$am_automake_acdir"/protos.m4 > aclocal.m4
-$AUTOCONF -Wnone 2>stderr && { cat stderr >&2; exit 1; }
-cat stderr >&2
-grep "^configure\\.ac:5:.*$warn_rx" stderr
-
-for opt in ansi2knr lib/ansi2knr; do
-  # ansi2knr option in Makefile.am
-  cp configure.sav configure.ac
-  echo "AUTOMAKE_OPTIONS = $opt" > Makefile.am
-  rm -rf autom4te*.cache
-  AUTOMAKE_fails -Wnone
-  grep "^Makefile\.am:1:.*$warn_rx" stderr
-  # ansi2knr option in configure.ac
-  : > Makefile.am
-  sed "s|^\\(AM_INIT_AUTOMAKE\\).*|\1([$opt])|" configure.sav >configure.ac
-  cat configure.ac # For debugging.
-  rm -rf autom4te*.cache
-  AUTOMAKE_fails -Wnone
-  grep "^configure\\.ac:2:.*$warn_rx" stderr
-done
-
-:
diff --git a/t/dist-formats.tap b/t/dist-formats.tap
index 880fcae..842ecf1 100755
--- a/t/dist-formats.tap
+++ b/t/dist-formats.tap
@@ -20,7 +20,7 @@
 am_create_testdir=empty
 . ./defs || exit 1
 
-plan_ 70
+plan_ 59
 
 # ---------------------------------------------------- #
 #  Common and/or auxiliary subroutines and variables.  #
@@ -46,12 +46,10 @@ setup_vars_for_compression_format ()
   suffix=NONE compressor=NONE
   case $1 in
     gzip) suffix=tar.gz  compressor=gzip     ;;
-    tarZ) suffix=tar.Z   compressor=compress ;;
     lzip) suffix=tar.lz  compressor=lzip     ;;
       xz) suffix=tar.xz  compressor=xz       ;;
    bzip2) suffix=tar.bz2 compressor=bzip2    ;;
      zip) suffix=zip     compressor=zip      ;;
-    shar) suffix=shar.gz compressor=shar     ;;
        *) fatal_ "invalid compression format '$1'";;
   esac
 }
@@ -103,7 +101,7 @@ have_compressor ()
   fatal_ "have_compressor(): dead code reached"
 }
 
-all_compression_formats='gzip tarZ lzip xz bzip2 zip shar'
+all_compression_formats='gzip lzip xz bzip2 zip'
 
 all_compressors=$(
   for x in $all_compression_formats; do
@@ -293,9 +291,8 @@ END
 
 #      $1 $2  $3   $4     $5  $6
 nogzip in am  and  bzip2  in  am
-nogzip in ac  and  xz     in  am
-nogzip in am  and  lzip   in  ac
-nogzip in ac  and  tarZ   in  ac
+nogzip in ac  and  xz     in  ac
+nogzip in am  and  lzip   in  am
 
 
 # ----------------------------------------------------------- #
@@ -318,9 +315,9 @@ end_subtest
 # since there are the most likely to be all found on the great majority
 # of systems.
 
-start_subtest parallel-compression ac_opts=dist-bzip2 am_opts=dist-tarZ
+start_subtest parallel-compression ac_opts=dist-bzip2 am_opts=dist-xz
 
-desc=gzip+bzip2+tarZ
+desc=gzip+bzip2+xz
 tarname=parallel-compression-1.0
 
 check_tarball ()
@@ -356,7 +353,7 @@ else
   ls -l # For debugging.
   command_ok_ "$desc [check .tar.gz tarball]"  check_tarball gzip
   command_ok_ "$desc [check .tar.bz2 tarball]" check_tarball bzip2
-  command_ok_ "$desc [check .tar.Z tarball]"   check_tarball tarZ
+  command_ok_ "$desc [check .tar.Z tarball]"   check_tarball xz
 fi
 
 unset tarname desc skip_reason
diff --git a/t/lzma.sh b/t/dist-obsolete.sh
old mode 100755
new mode 100644
similarity index 73%
rename from t/lzma.sh
rename to t/dist-obsolete.sh
index da38c31..a7b68d0
--- a/t/lzma.sh
+++ b/t/dist-obsolete.sh
@@ -14,28 +14,28 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Check support for no-dist-gzip with lzma.
+# Obsolete archive formats.
 
 . ./defs || exit 1
 
-errmsg='support for lzma.*removed'
+$ACLOCAL
 
-echo AUTOMAKE_OPTIONS = dist-lzma > Makefile.am
-$ACLOCAL --force
-AUTOMAKE_fails -Wnone -Wno-error
-grep "^Makefile\\.am:1:.*$errmsg" stderr
+for fmt in lzma shar; do
+  echo AUTOMAKE_OPTIONS = dist-$fmt > Makefile.am
+  AUTOMAKE_fails -Wnone -Wno-error
+  grep "^Makefile\\.am:1:.*support for $fmt.*removed" stderr
+done
+
+rm -rf autom4te*.cache
 
 cat > configure.ac << 'END'
 AC_INIT([lzma], [1.0])
-AM_INIT_AUTOMAKE([no-dist-gzip dist-lzma])
+AM_INIT_AUTOMAKE([dist-tarZ])
 AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
 END
 : > Makefile.am
-
-rm -rf autom4te*.cache
 $ACLOCAL
 AUTOMAKE_fails -Wnone -Wno-error
-grep "^configure\\.ac:2:.*$errmsg" stderr
+grep "^configure\\.ac:2:.*legacy 'compress' program.* no more supported" stderr
 
 :
diff --git a/t/distcom2.sh b/t/distcom2.sh
deleted file mode 100755
index 794d2ff..0000000
--- a/t/distcom2.sh
+++ /dev/null
@@ -1,69 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Test to make sure that depcomp and compile are added to am.dist.common-files.
-# Report from Pavel Roskin.  Report of problems with '--no-force' from
-# Scott James Remnant (Debian #206299)
-
-. ./defs || exit 1
-
-cat >> configure.ac << 'END'
-AC_PROG_CC
-AM_PROG_CC_C_O
-AC_CONFIG_FILES([subdir/Makefile])
-AC_OUTPUT
-END
-
-cat > Makefile.am << 'END'
-SUBDIRS = subdir
-END
-
-mkdir subdir
-: > subdir/foo.c
-
-cat > subdir/Makefile.am << 'END'
-noinst_PROGRAMS = foo
-foo_SOURCES = foo.c
-foo_CFLAGS = -DBAR
-END
-
-$ACLOCAL
-
-for opt in '' --no-force; do
-
-  $AUTOMAKE $opt --add-missing
-
-  test -f compile
-  test -f depcomp
-
-  for dir in . subdir; do
-    sed -n 's/^am.dist.common-files = *\(.*\)$/ \1 /p' \
-      <$dir/Makefile.in >$dir/dc.txt
-  done
-
-  cat dc.txt # For debugging.
-  cat subdir/dc.txt # Likewise.
-
-  $FGREP ' $(am.conf.aux-dir)/depcomp ' subdir/dc.txt
-  # The 'compile' script will be listed in the am.dist.common-files of
-  # the top-level Makefile because it's required in configure.ac
-  # (by AM_PROG_CC_C_O).
-  $FGREP ' $(am.conf.aux-dir)/compile ' dc.txt \
-    || $FGREP ' compile ' dc.txt
-
-done
-
-:
diff --git a/t/distcom3.sh b/t/distcom3.sh
index 98446c1..b1fcd8b 100755
--- a/t/distcom3.sh
+++ b/t/distcom3.sh
@@ -19,9 +19,13 @@
 
 . ./defs || exit 1
 
+echo AC_OUTPUT >> configure.ac
+
 cat > Makefile.am << 'END'
 README:
        echo 'I bet you are reading me.' > README
+test-distcommon:
+       echo ' ' $(am.dist.common-files) ' ' | grep ' README '
 END
 
 # Files required by '--gnu'.
@@ -36,20 +40,14 @@ $AUTOMAKE --add-missing --gnu >output 2>&1 || { cat output; 
exit 1; }
 cat output
 grep README output && exit 1
 
-sed -n -e '/^am.dist.common-files =.*\\$/ {
-   :loop
-   p
-   n
-   t clear
-   :clear
-   s/\\$/\\/
-   t loop
-   p
-   n
-   }' -e '/^am.dist.common-files =/ p' Makefile.in | grep README
-
+$AUTOCONF
+./configure
+$MAKE test-distcommon
+$MAKE distdir
+test -f $distdir/README
 
 # Should warn about missing README.
+rm -f README
 : > Makefile.am
 AUTOMAKE_fails --add-missing --gnu
 grep 'required file.*README.*not found' stderr
diff --git a/t/hdr-vars-defined-once.sh b/t/hdr-vars-defined-once.sh
index 5101755..54e2cb9 100755
--- a/t/hdr-vars-defined-once.sh
+++ b/t/hdr-vars-defined-once.sh
@@ -25,25 +25,22 @@ END
 
 cat > Makefile.am << 'END'
 include Will_Be_Included_In_Makefile
+test-distcommon:
+       echo ' ' $(am.dist.common-files) ' ' \
+          | grep '[ /]Will_Be_Included_In_Makefile '
 END
 
-: > Will_Be_Included_In_Makefile
+id=0c35bbde7c95b569a
+echo "# $id" > Will_Be_Included_In_Makefile
 
 $ACLOCAL
 $AUTOMAKE
 test $(grep -c '^srcdir' Makefile.in) -eq 1
 
-# Also make sure include file is distributed.
-sed -n -e '/^am.dist.common-files =.*\\$/ {
-   :loop
-   p
-   n
-   t clear
-   :clear
-   s/\\$/\\/
-   t loop
-   p
-   n
-   }' -e '/^am.dist.common-files =/ p' Makefile.in | grep 
Will_Be_Included_In_Makefile
+$AUTOCONF
+./configure
+$MAKE test-distcommon
+$MAKE distdir
+grep "$id" $distdir/Will_Be_Included_In_Makefile
 
 :
diff --git a/t/location.sh b/t/location.sh
index 424904b..d8921c8 100755
--- a/t/location.sh
+++ b/t/location.sh
@@ -19,7 +19,6 @@
 . ./defs || exit 1
 
 cat >> configure.ac << 'END'
-AM_CONDITIONAL([COND1], [true])
 AM_CONDITIONAL([COND2], [true])
 AC_PROG_CC
 AM_PROG_AR
@@ -31,9 +30,6 @@ bin_PROGRAMS = libfoo.a
 if COND2
   lib_LIBRARIES = libfoo.a
 endif
-if COND1
-  bin_PROGRAMS += distdir
-endif
 VAR = 1 \
       2 \
       3
@@ -62,8 +58,8 @@ smash_useless_diffs stderr >observed
 # Apparently useless use of sed here required to avoid spuriously
 # triggering some maintainer-checks failures.
 sed 's/^> //' > expected << 'END'
-> Makefile.am:12: warning: VAR multiply defined in condition TRUE ...
-> Makefile.am:8: ... 'VAR' previously defined here
+> Makefile.am:9: warning: VAR multiply defined in condition TRUE ...
+> Makefile.am:5: ... 'VAR' previously defined here
 > automake: error: libfoo_a_OBJECTS should not be defined
 > Makefile.am:3:   while processing library 'libfoo.a'
 > automake: error: use 'libfoo_a_LDADD', not 'libfoo_a_LIBADD'
@@ -77,9 +73,6 @@ sed 's/^> //' > expected << 'END'
 > Makefile.am:1:   while processing program 'libfoo.a'
 > library.am: ... 'libfoo.a' previously defined here
 > Makefile.am:3:   while processing library 'libfoo.a'
-> distdir.am: warning: redefinition of 'distdir' ...
-> program.am: ... 'distdir$(EXEEXT)' previously defined here
-> Makefile.am:6:   while processing program 'distdir'
 END
 
 cat expected
diff --git a/t/output11.sh b/t/output11.sh
index 7dbd835..b2da86b 100755
--- a/t/output11.sh
+++ b/t/output11.sh
@@ -20,16 +20,16 @@
 
 cat >> configure.ac << \END
 AC_SUBST([FOO], [foo])
-file1=this.in
-echo @FOO@ >$file1
-file2=that
-file3=mumble
-file4=foo
-AC_CONFIG_FILES([this:$file1],, [file1=$file1])
-AC_CONFIG_FILES([sub/this:$file1])
-AC_CONFIG_FILES([${file2}:this],, [file2=$file2])
-AC_CONFIG_FILES([$file3],, [file3=$file3])
-AC_CONFIG_FILES([$file4:foo.in],, [file4=$file4])
+xfile1=this.in
+echo @FOO@ >$xfile1
+xfile2=that
+xfile3=mumble
+xfile4=foo
+AC_CONFIG_FILES([this:$xfile1],, [xfile1=$xfile1])
+AC_CONFIG_FILES([sub/this:$xfile1])
+AC_CONFIG_FILES([${xfile2}:this],, [xfile2=$xfile2])
+AC_CONFIG_FILES([$xfile3],, [xfile3=$xfile3])
+AC_CONFIG_FILES([$xfile4:foo.in],, [xfile4=$xfile4])
 AC_CONFIG_FILES([sub/Makefile])
 AC_OUTPUT
 END
@@ -53,7 +53,7 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
 
-$FGREP ' $file' Makefile.in sub/Makefile.in && exit 1
+$FGREP ' $xfile' Makefile.in sub/Makefile.in && exit 1
 
 ./configure
 $MAKE distcheck
diff --git a/t/targetclash.sh b/t/targetclash.sh
index 9c71007..fccb29d 100755
--- a/t/targetclash.sh
+++ b/t/targetclash.sh
@@ -23,11 +23,12 @@ AC_PROG_CC
 END
 
 cat > Makefile.am << 'END'
-bin_PROGRAMS = distdir
+data_DATA =
+bin_PROGRAMS = uninstall-dataDATA
 END
 
 $ACLOCAL
 AUTOMAKE_fails -a
-grep 'redefinition.*distdir' stderr
+grep 'redefinition.*uninstall-dataDATA' stderr
 
 :


hooks/post-receive
-- 
GNU Automake



reply via email to

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