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-756-gec3b8de
Date: Wed, 01 Aug 2012 08:10:25 +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=ec3b8de0746f4a2beeb1196e44a18b60ab76bc75

The branch, ng/master has been updated
       via  ec3b8de0746f4a2beeb1196e44a18b60ab76bc75 (commit)
       via  38c1d6faa3bb4257ae6e17ab648054bd8a515967 (commit)
       via  77688699a254bcbde61d4a13b6df89102288ff6d (commit)
       via  c3084f09e65074518152421d777672276e3429cb (commit)
       via  8b4e018564adc80eb1597a08b0f71d33ee08a668 (commit)
       via  5cd47293bb33b793f36a288a9bb90091b906850f (commit)
       via  2843300261c2467a7f2d17d32956cd18e76123a1 (commit)
       via  8b1619dbfd872096fdf45e5bb654229d3a11203f (commit)
       via  e678b9dfbaae48a6ce416da0024064034126ec69 (commit)
       via  6f5c5041a98595ebdfb4f9dadfd37838feea22ae (commit)
       via  c830105112b8b0ae29f66dc9cd20c02e07bcafa1 (commit)
       via  a7fd4faf638f429edfc038be51fac7fbb2560c30 (commit)
       via  cd0f1fb2dc966bb3dfd3ea763d45212333d25d56 (commit)
       via  323cd7e3e85082bc7ece1d3756e2a522955ebe14 (commit)
       via  c0012b0230754ce6d1d42c2e85d9787bf5bd9e30 (commit)
       via  53b5d112dcdad674b5ea4a85b9ce2401b1023291 (commit)
       via  a7f24ebbc55f2596cdbeec3d080143a5ce5f801e (commit)
       via  bf2a8b03a21e46177b4368a52b8434c7f1944238 (commit)
       via  d0dd19a0d764b250a13ee18fb7142af72f521513 (commit)
       via  507135156159115771309a9b29324f7faedf823c (commit)
       via  fef05346c13a085e96edb3c63ebafedddf7764ec (commit)
       via  270cc97b9d8ee978434a6b392727525a5be56cc3 (commit)
       via  9c907a303d2f3844ee8b41346f7e3272572a54a4 (commit)
       via  91a4ff8fd4eb3925d824147b06604f5bef68c43b (commit)
       via  09dcf0c5ff160b837cd7cade1df5252760695168 (commit)
      from  f0b62740e84c6682f5300a6ca5cf696b66d794a2 (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 ec3b8de0746f4a2beeb1196e44a18b60ab76bc75
Author: Stefano Lattarini <address@hidden>
Date:   Wed Aug 1 10:00:47 2012 +0200

    [ng] cosmetics: add comments about few internal variables
    
    * lib/am/header-vars.mk (am.hack.rm-f, am.hack.rm-rf,am.clean-cmd.f,
    am.clean-cmd.d): These.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 38c1d6faa3bb4257ae6e17ab648054bd8a515967
Author: Stefano Lattarini <address@hidden>
Date:   Tue Jul 31 19:56:21 2012 +0200

    [ng] rename: am.rm-f -> am.hack.rm-f, am.rm-rf -> am.hack.rm-rf
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 77688699a254bcbde61d4a13b6df89102288ff6d
Author: Stefano Lattarini <address@hidden>
Date:   Tue Jul 31 19:24:05 2012 +0200

    [ng] rename: am__ensure_target_dir_exists -> am.cmd.ensure-target-dir-exists
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit c3084f09e65074518152421d777672276e3429cb
Author: Stefano Lattarini <address@hidden>
Date:   Tue Jul 31 19:22:25 2012 +0200

    [ng] rename: am__ensure_dir_exists -> am.cmd.ensure-dir-exists
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 8b4e018564adc80eb1597a08b0f71d33ee08a668
Author: Stefano Lattarini <address@hidden>
Date:   Tue Jul 31 19:10:27 2012 +0200

    [ng] typofix: in comments in lib/am/header-vars.mk
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 5cd47293bb33b793f36a288a9bb90091b906850f
Author: Stefano Lattarini <address@hidden>
Date:   Tue Jul 31 19:03:57 2012 +0200

    [ng] header vars: remove function $(am__mkdir)
    
    That function expanded unconditionally to:
    
        test -d $1 || $(MKDIR_P) $1
    
    This formulation was supposed to help avoiding extra forks (due to the
    leading "test -d" check), but it didn't actually do so.  In fact, in the
    situations '$(am__mkdir)' was most used (typically indirectly, through
    other private variables like '$(am__ensure_target_dir_exists)') the
    Makefile had already determined by other means (e.g., tricky uses of the
    '$(wildcard)' built-in) that the relevant directory didn't exist and
    thus *had* to be created, so the fork of $(MKDIR_P) has to happen anyway.
    
    In fact, the use of '$(am__mkdir)' often ended up causing *more forks*,
    because it eventually expanded to recipes like:
    
        target: recipe
                test -d non-existent || $(MKDIR_P) non-existent
                ... rest of the recipe ...
    
    forcing make to spawn a shell to execute the first line of the recipe --
    which, containing the shell metacharacters "||", couldn't be spawned
    directly -- shell which in turn had to spawn $(MKDIR_P).
    Whereas with a simpler
    
        target: recipe
                $(MKDIR_P) non-existent
                ... rest of the recipe ...
    
    make would span $(MKDIR_P) directly itself, thus saving a shell execution
    -- and speeding up the recipe.
    
    * lib/am/header-vars.mk (am__mkdir): Remove.
    (am__ensure_dir_exists): Simply use $(MKDIR_P) directly.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 2843300261c2467a7f2d17d32956cd18e76123a1
Author: Stefano Lattarini <address@hidden>
Date:   Tue Jul 31 18:07:32 2012 +0200

    [ng] cleanup: unused function '&almost_verbatim' removed
    
    Superseded in all its current uses by '&verbatim'.
    
    * automake.in (almost_verbatim): Delete.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 8b1619dbfd872096fdf45e5bb654229d3a11203f
Author: Stefano Lattarini <address@hidden>
Date:   Tue Jul 31 17:28:36 2012 +0200

    [ng] rename: verbatim makefile fragments: *.am -> *.mk
    
    Makes clear and manifest the fact that they are not parsed like the
    other '*.am' files are (for variable and rule definitions, processing
    of Automake conditionals, etc.), rather included almost verbatim (the
    "almost" being the stripping of '##'-comments).
    
    * automake.in (verbatim): Expect a suffix of '.mk', not '.am'.
    * lib/am/texibuild.am: Rename ...
    * lib/am/texibuild.mk: ... like this.
    * lib/am/clean.am: Rename ...
    * lib/am/clean.mk: ... like this.
    * lib/am/check-typos.am: Rename ...
    * lib/am/check-typos.mk: ... like this.
    * lib/am/color-tests.am: Rename ...
    * lib/am/color-tests.mk: ... like this.
    * lib/am/parallel-tests.am: Rename ...
    * lib/am/parallel-tests.mk: ... like this.
    * lib/am/serial-tests.am: Rename ...
    * lib/am/serial-tests.mk: ... like this.
    * lib/am/header-vars.am: Rename ...
    * lib/am/header-vars.mk: ... like this.
    * lib/am/am-dir.am: Rename ...
    * lib/am/am-dir.mk: ... like this.
    * lib/am/common-targets.am: Rename ...
    * lib/am/common-targets.mk: ... like this.
    * Makefile.am (dist_am_DATA): Adjust.
    * t/am-xargs-map.sh: Likewise.
    * t/ensure-dir-exists.sh: Likewise.
    * t/internals.tap: Likewise.
    * t/memoize.tap: Likewise.
    * t/verbatim.sh: Likewise.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit e678b9dfbaae48a6ce416da0024064034126ec69
Author: Stefano Lattarini <address@hidden>
Date:   Tue Jul 31 17:37:22 2012 +0200

    [ng] refactor: check-typos.am: include verbatim
    
    It no longer contains automake-time %TRANSFORM% so that's the
    right thing to do.
    
    * automake.in (generate_makefile): Here.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 6f5c5041a98595ebdfb4f9dadfd37838feea22ae
Author: Stefano Lattarini <address@hidden>
Date:   Tue Jul 31 00:26:20 2012 +0200

    [ng] refactor: read in 'clean.am' with '&verbatim'
    
    * automake.in (handle_clean): Here.
    * lib/am/clean.am: Related changes ans simplifications.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit c830105112b8b0ae29f66dc9cd20c02e07bcafa1
Author: Stefano Lattarini <address@hidden>
Date:   Mon Jul 30 23:23:14 2012 +0200

    [ng] automake: drop unused argument in '&handle_clean'
    
    * automake.in (handle_clean): Here, the argument '$makefile'.  And remove
    the now-redundant description of the function.
    (generate_makefile): Adjust.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit a7fd4faf638f429edfc038be51fac7fbb2560c30
Author: Stefano Lattarini <address@hidden>
Date:   Mon Jul 30 23:20:54 2012 +0200

    [ng] clean: prefer internal variables over automake-time %TRANSFORMS%
    
    This will be especially useful in the next change.
    
    * automake.in (handle_clean): Define several new private make variables
    'am.clean.*.f.auto' and 'am.clean.*.d.auto'.  Drop the %TRANSFORMS% when
    processing ...
    (lib/am/clean.am): ... this file, which now uses the new internal vars.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit cd0f1fb2dc966bb3dfd3ea763d45212333d25d56
Author: Stefano Lattarini <address@hidden>
Date:   Mon Jul 30 21:57:47 2012 +0200

    [ng] rename: am__*clean_* -> am.clean.*.*
    
    More precisely, do these renames:
    
      am__mostlyclean_files  ->  am.clean.mostly.f
      am__clean_files        ->  am.clean.normal.f
      am__distclean_files    ->  am.clean.dist.f
      am__maintclean_files   ->  am.clean.maint.f
    
      am__mostlyclean_dirs   ->  am.clean.mostly.d
      am__clean_dirs         ->  am.clean.normal.d
      am__distclean_dirs     ->  am.clean.dist.d
      am__maintclean_dirs    ->  am.clean.maint.d
    
    throughout the codebase.  Also ...
    
    * syntax-checks.mk (typos-for-clean, sc_variable_typos_rules): Delete.
    The new names make it both more difficult to have typos and more difficult
    to detect them automatically, so keeping these maintainer checks is no
    more worth the hassle.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 323cd7e3e85082bc7ece1d3756e2a522955ebe14
Author: Stefano Lattarini <address@hidden>
Date:   Mon Jul 30 21:33:06 2012 +0200

    [ng] clean: simplify code for removal of '.am' dir
    
    * lib/am/am-dir.am (am--distclean-amdir): Delete this phony rule and
    the 'distclean-am' dependency on it ...
    (am__distclean_dirs): ... simply append $(am.dir) to this instead.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit c0012b0230754ce6d1d42c2e85d9787bf5bd9e30
Author: Stefano Lattarini <address@hidden>
Date:   Thu Jul 26 22:14:59 2012 +0200

    [ng] automake: remove support for threaded execution
    
    Why are we removing such a nice feature, especially in a world where
    multicore systems are becoming the norm?
    
    First, that feature adds a lot of complexity to the Automake script,
    which might get in the way of future refactorings.  And the Automake-NG
    fork is about refactorings and cleanups at least as much as about new
    features and better GNU make integration.
    
    Also, the performance enhancements offered by threaded Automake seem
    to be fairly limited:
    <http://lists.gnu.org/archive/html/automake/2009-11/msg00004.html>
    albeit admittedly not excessively so:
    <http://www.open-mpi.org/community/lists/devel/2010/09/8524.php>
    
    In addition, we should really be pushing peoples towards non-recursive
    build systems -- refer to Peter Miller's article "Recursive Make
    Considered Harmful" <http://miller.emu.id.au/pmiller/books/rmch/>.
    In such a non-recursive setup, there is just just one 'Makefile.am',
    and thus little point in trying to launch a thread for each
    'Makefile.am'.
    
    In the end, however, the consideration that tipped the balance in favor
    of this change is that we want to reach a point, during the yet-to-come
    maturity of Automake-NG, where the 'automake' script will be just a thin
    layer around the provided helper scripts and makefile fragments (with
    maybe a *small* smattering of preprocessing), as well as around autom4te
    (for the proper parsing of configure.ac).  At such a point, a threaded
    execution would bring no real benefit.
    
    * NG-NEWS: Update.
    * doc/automake-ng.texi, NG-NEWS: Likewise.
    * configure.ac: Don't check for 'ithreads' support in perl.
    Drop AC_SUBST 'PERL_THREADS'.
    * bootstrap.sh (PERL_THREADS): Don't define.
    (dosubst): Don't substitute it.
    * lib/Automake/Config.in ($perl_threads): Define no more.
    (@EXPORT): Drop it.
    * aclocal.in ($perl_threads): Remove, no more needed.
    * automake.in (BEGIN) [$perl_threads]: Don't require nor import
    the 'threads' and 'Thread::Queue' modules.
    (QUEUE_MESSAGE, QUEUE_CONF_FILE, QUEUE_LOCATION, QUEUE_STRING):
    Delete constants.
    ($required_conf_file_queue): Delete variable.
    ($nthreads): Likewise, and thus ...
    (get_number_of_threads): ... delete this function, whose only
    purpose was to initialize that variable.
    (handle_makefiles_serial): Delete, its body inlined in the main
    code.
    (require_file_internal): Don't take the '$QUEUE' argument, nor
    handle threading/serialization calling back ...
    (queue_required_file_check_or_copy): ... this function, which
    has thus been removed.
    (require_libsource_with_macro): Adjust 'require_file_internal'
    call to new signature.
    (require_conf_file): Likewise, in the process dropping any
    handling of threading/serialization.
    (handle_makefiles_threaded): This is no more called anywhere,
    so delete it, together with ...
    (require_queued_file_check_or_copy): ... this, which has in
    that its only caller.
    * lib/Automake/Location.pm (serialize, deserialize): Delete
    as unused.
    * lib/Automake/Channels.pm (setup_channel_queue,
    pop_channel_queue): Likewise.
    (@EXPORT): Adjust.
    (BEGIN) [$perl_threads]: Don't require nor import 'threads'.
    (%_default_options): Remove 'ordered', 'queue' and 'queue_key'
    keys, that were only required for serialization during threaded
    Automake.
    (_merge_options, _print_message): No need to handle those
    options.
    Adjust creation of channels 'automake', 'verb' and 'fatal'.
    (_enqueue, _dequeue): Delete as unused.
    (msg): Adjust a comment.
    (verb): Don't try to display informations about the current
    thread.
    * lib/Automake/DisjConditions.pm (CLONE): Delete, no more
    needed.
    * t/ax/am-test-lib.sh (require_tool): Drop handing of
    requirement 'perl-threads'; it is not used by any test now.
    * t/parallel-am.sh: Remove as obsolete.
    * t/parallel-am2.sh: Likewise.
    * t/parallel-am3.sh: Likewise.
    * t/pm/Condition-t.pl: Likewise.
    * t/pm/DisjConditions-t.pl: Likewise.
    * t/werror3.sh: Don't test with AUTOMAKE_JOBS=2.
    * Makefile.am (check-coverage-run, recheck-coverage-run): Don't
    export 'WANT_NO_THREADS' to "yes", nor unset 'AUTOMAKE_JOBS'.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 53b5d112dcdad674b5ea4a85b9ce2401b1023291
Author: Stefano Lattarini <address@hidden>
Date:   Mon Jul 30 21:02:59 2012 +0200

    [ng] cleanup: remove on almost-unused global vars: am_relative_dir
    
    * automake.in ($am_relative_dir): Delete, it was only used once ...
    (generate_makefile): ... in here, so it's simpler to inline its
    expansion.
    (initialize_per_input): Don't reset the deleted variable.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit a7f24ebbc55f2596cdbeec3d080143a5ce5f801e
Author: Stefano Lattarini <address@hidden>
Date:   Mon Jul 30 20:34:12 2012 +0200

    [ng] cleanup: remove on almost-unused global vars: topsrcdir
    
    * automake.in ($topsrcdir): Delete, it was only used once ...
    (handle_LIBOBJS_or_ALLOCA): ... in here, so it's simpler to inline
    its expansion.  Improve formatting of immediately surrounding code
    a little while we are at it.
    (initialize_per_input): Don't reset the deleted variable.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit bf2a8b03a21e46177b4368a52b8434c7f1944238
Author: Stefano Lattarini <address@hidden>
Date:   Mon Jul 30 20:30:23 2012 +0200

    [ng] cleanup: remove two almost-unused global vars: {am,in}_file_name
    
    * automake.in ($am_file_name, $in_file_name): Delete these, which were
    used only in the 'read_main_am_file' subroutine; instead ...
    (read_main_am_file): ... modify it to only work from the '$makefile_am'
    argument (which it was already receiving), and the new '$makefile_in'
    argument, which is now passed to it ...
    (generate_makefile): ... from here.
    (initialize_per_input): Don't reset the two deleted variables anymore.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit d0dd19a0d764b250a13ee18fb7142af72f521513
Author: Stefano Lattarini <address@hidden>
Date:   Mon Jul 30 19:39:12 2012 +0200

    [ng] general: new internal vars to hold path of current Makefile{,.in,.am}
    
    This is preferable to having to use the '%MAKEFILE%', '%MAKEFILE-IN%'
    and '%MAKEFILE-AM%' transforms in several places, and will enable us
    to do more sweeping refactorings in the future.
    
    * automake.in (generate_makefile): Define new private make variables:
      - am.relpath.makefile.am
      - am.relpath.makefile.in
      - am.relpath.makefile
    * automake.in (handle_configure, handle_clean, generate_makefile),
    lib/am/configure.am, lib/am/check-typos.am, lib/am/clean.am: Adjust
    throughout to use them instead of the corresponding transforms.
    * t/remake.sh: Adjust and extend grepping checks.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 507135156159115771309a9b29324f7faedf823c
Author: Stefano Lattarini <address@hidden>
Date:   Mon Jul 30 19:07:26 2012 +0200

    [ng] clean: prefer '#' comments over '##' ones
    
    * lib/am/clean.am: Here.  So that they will be visible also in
    the generated Makefiles.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit fef05346c13a085e96edb3c63ebafedddf7764ec
Author: Stefano Lattarini <address@hidden>
Date:   Mon Jul 30 18:56:28 2012 +0200

    [ng] cosmetics: improve few comments
    
    * automake.in (slurp_makefile_fragment): Here.
    * lib/am/texibuild.am (am__texibuild_dvi_or_pdf): And here.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 270cc97b9d8ee978434a6b392727525a5be56cc3
Author: Stefano Lattarini <address@hidden>
Date:   Mon Jul 30 18:51:16 2012 +0200

    [ng] refactor: read in 'header-vars.am' with '&verbatim'
    
    * automake.in (define_standard_variables): Here.  We can do so easily
    now that we've made the 'verbatim' function polymorphic.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 9c907a303d2f3844ee8b41346f7e3272572a54a4
Author: Stefano Lattarini <address@hidden>
Date:   Mon Jul 30 18:36:18 2012 +0200

    [ng] refactor: make '&verbatim' polymorphic in its return value
    
    * automake.in (verbatim): If used in empty context, continue to act
    as before, and append the read makefile fragment to '$output_verbatim'.
    But if used in scalar or list context, return it instead.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 91a4ff8fd4eb3925d824147b06604f5bef68c43b
Author: Stefano Lattarini <address@hidden>
Date:   Mon Jul 30 18:27:08 2012 +0200

    [ng] automake: can copy makefile fragments really verbatim
    
    This will allow us to actually put such fragments in distributed
    files, and then include them *at make runtime*, instead of copying
    their contents in every single makefile (as is done now, a legacy
    from mainline Automake).
    
    * automake.in (verbatim): New function, will copy the given file
    "verbatim" (excluding removal of '##' comments) in the output
    Makefile.
    (handle_tests): Use 'verbatim', not 'almost_verbatim', to include
    files 'color-tests.am', 'serial-tests.am' and 'parallel-tests.am'.
    (handle_texinfo): Likewise, for 'texibuild.am'.
    (generate_makefile): Likewise, for 'common-targets.am' and
    'am-dir.am'.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 09dcf0c5ff160b837cd7cade1df5252760695168
Author: Stefano Lattarini <address@hidden>
Date:   Mon Jul 30 17:54:40 2012 +0200

    [ng] automake: new function 'slurp_makefile_fragment'
    
    This is a pure refactoring, with no semantic change intended.
    It will be required by future changes.
    
    * automake.in (slurp_makefile_fragment): New.
    (preprocess_file): Use it.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

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

Summary of changes:
 Makefile.am                                     |   19 +-
 NG-NEWS                                         |    4 +
 aclocal.in                                      |    3 -
 automake.in                                     |  417 ++++++---------------
 bootstrap.sh                                    |    2 -
 configure.ac                                    |   26 --
 doc/automake-ng.texi                            |    6 -
 lib/Automake/ChannelDefs.pm                     |   17 +-
 lib/Automake/Channels.pm                        |  119 +------
 lib/Automake/Config.in                          |    3 +-
 lib/Automake/DisjConditions.pm                  |   20 -
 lib/Automake/Location.pm                        |   47 ---
 lib/am/{am-dir.am => am-dir.mk}                 |    5 +-
 lib/am/{check-typos.am => check-typos.mk}       |    2 +-
 lib/am/clean.am                                 |   77 ----
 lib/am/clean.mk                                 |   78 ++++
 lib/am/{color-tests.am => color-tests.mk}       |    0
 lib/am/{common-targets.am => common-targets.mk} |    2 +-
 lib/am/configure.am                             |   15 +-
 lib/am/dejagnu.am                               |    6 +-
 lib/am/depend2.am                               |    6 +-
 lib/am/{header-vars.am => header-vars.mk}       |   35 ++-
 lib/am/java.am                                  |    4 +-
 lib/am/lex.am                                   |    2 +-
 lib/am/library.am                               |    2 +-
 lib/am/libs.am                                  |    2 +-
 lib/am/lisp.am                                  |    2 +-
 lib/am/ltlib.am                                 |    4 +-
 lib/am/ltlibrary.am                             |    2 +-
 lib/am/{parallel-tests.am => parallel-tests.mk} |    4 +-
 lib/am/program.am                               |    2 +-
 lib/am/progs.am                                 |    4 +-
 lib/am/{serial-tests.am => serial-tests.mk}     |    0
 lib/am/tags.am                                  |    4 +-
 lib/am/texi-vers.am                             |    6 +-
 lib/am/{texibuild.am => texibuild.mk}           |   10 +-
 lib/am/texinfos.am                              |    8 +-
 lib/am/yacc.am                                  |    2 +-
 syntax-checks.mk                                |   39 --
 t/am-xargs-map.sh                               |    2 +-
 t/ax/am-test-lib.sh                             |    6 -
 t/ensure-dir-exists.sh                          |   12 +-
 t/internals.tap                                 |    2 +-
 t/memoize.tap                                   |    2 +-
 t/parallel-am.sh                                |  103 -----
 t/parallel-am2.sh                               |   75 ----
 t/parallel-am3.sh                               |   74 ----
 t/pm/Condition-t.pl                             |  327 ----------------
 t/pm/DisjConditions-t.pl                        |  461 -----------------------
 t/remake.sh                                     |    5 +-
 t/verbatim.sh                                   |    1 +
 t/werror3.sh                                    |    8 -
 52 files changed, 291 insertions(+), 1793 deletions(-)
 rename lib/am/{am-dir.am => am-dir.mk} (93%)
 rename lib/am/{check-typos.am => check-typos.mk} (98%)
 delete mode 100644 lib/am/clean.am
 create mode 100644 lib/am/clean.mk
 rename lib/am/{color-tests.am => color-tests.mk} (100%)
 rename lib/am/{common-targets.am => common-targets.mk} (99%)
 rename lib/am/{header-vars.am => header-vars.mk} (92%)
 rename lib/am/{parallel-tests.am => parallel-tests.mk} (99%)
 rename lib/am/{serial-tests.am => serial-tests.mk} (100%)
 rename lib/am/{texibuild.am => texibuild.mk} (94%)
 delete mode 100755 t/parallel-am.sh
 delete mode 100755 t/parallel-am2.sh
 delete mode 100755 t/parallel-am3.sh
 delete mode 100644 t/pm/Condition-t.pl
 delete mode 100644 t/pm/DisjConditions-t.pl

diff --git a/Makefile.am b/Makefile.am
index 58ff9e6..eab05c3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -185,13 +185,15 @@ EXTRA_DIST += lib/Automake/Config.in
 ## --------------------- ##
 
 dist_am_DATA = \
-  lib/am/am-dir.am \
-  lib/am/common-targets.am \
-  lib/am/serial-tests.am \
-  lib/am/parallel-tests.am \
-  lib/am/check-typos.am \
-  lib/am/color-tests.am \
-  lib/am/clean.am \
+  lib/am/am-dir.mk \
+  lib/am/texibuild.mk \
+  lib/am/common-targets.mk \
+  lib/am/color-tests.mk \
+  lib/am/serial-tests.mk \
+  lib/am/parallel-tests.mk \
+  lib/am/check-typos.mk \
+  lib/am/clean.mk \
+  lib/am/header-vars.mk \
   lib/am/compile.am \
   lib/am/configure.am \
   lib/am/data.am \
@@ -199,7 +201,6 @@ dist_am_DATA = \
   lib/am/depend2.am \
   lib/am/distdir.am \
   lib/am/footer.am \
-  lib/am/header-vars.am \
   lib/am/header.am \
   lib/am/inst-vars.am \
   lib/am/java.am \
@@ -221,7 +222,6 @@ dist_am_DATA = \
   lib/am/tags.am \
   lib/am/texi-vers.am \
   lib/am/texi-spec.am \
-  lib/am/texibuild.am \
   lib/am/texinfos.am \
   lib/am/vala.am \
   lib/am/yacc.am
@@ -673,7 +673,6 @@ PERL_COVER = cover
 check-coverage-run recheck-coverage-run: all
        $(MKDIR_P) $(PERL_COVERAGE_DB)
        PERL5OPT="$$PERL5OPT $(PERL_COVERAGE_FLAGS)"; export PERL5OPT; \
-       WANT_NO_THREADS=yes; export WANT_NO_THREADS; unset AUTOMAKE_JOBS; \
        $(MAKE) `echo $@ | sed 's/-coverage-run//'`
 
 check-coverage-report:
diff --git a/NG-NEWS b/NG-NEWS
index 78a6524..54e3819 100644
--- a/NG-NEWS
+++ b/NG-NEWS
@@ -279,6 +279,10 @@ Obsolete Features Removed
   $(target), $(host) and $(build), have been removed.  Simply use this
   latter variables.
 
+* Threaded automake execution (as triggered by $AUTOMAKE_JOBS) has been
+  removed altogether.  Exporting AUTOMAKE_JOBS to in the environment of
+  Automake will now have no effect.
+
 
 Source Files with Unknown Extensions
 ====================================
diff --git a/aclocal.in b/aclocal.in
index 6e43097..cb50e42 100644
--- a/aclocal.in
+++ b/aclocal.in
@@ -44,9 +44,6 @@ use File::Path ();
 
 # Some globals.
 
-# We do not operate in threaded mode.
-$perl_threads = 0;
-
 # Include paths for searching macros.  We search macros in this order:
 # user-supplied directories first, then the directory containing the
 # automake macros, and finally the system-wide directories for
diff --git a/automake.in b/automake.in
index e3e96a7..596b529 100644
--- a/automake.in
+++ b/automake.in
@@ -121,16 +121,6 @@ package Automake;
 
 use strict;
 use Automake::Config;
-BEGIN
-{
-  if ($perl_threads)
-    {
-      require threads;
-      import threads;
-      require Thread::Queue;
-      import Thread::Queue;
-    }
-}
 use Automake::General;
 use Automake::XFile;
 use Automake::Channels;
@@ -290,11 +280,6 @@ use constant COMPILE_ORDINARY => 2;
 # when it's defined by Automake.  We use INTERNAL in this case.
 use constant INTERNAL => new Automake::Location;
 
-# Serialization keys for message queues.
-use constant QUEUE_MESSAGE   => "msg";
-use constant QUEUE_CONF_FILE => "conf file";
-use constant QUEUE_LOCATION  => "location";
-use constant QUEUE_STRING    => "string";
 
 ## ---------------------------------- ##
 ## Variables related to the options.  ##
@@ -484,9 +469,6 @@ my %required_targets =
    'install-man'     => 1,
   );
 
-# Queue to push require_conf_file requirements to.
-my $required_conf_file_queue;
-
 # The name of the Makefile currently being processed.
 my $am_file = 'BUG';
 
@@ -496,17 +478,9 @@ my $am_file = 'BUG';
 ## Variables reset by &initialize_per_input.  ##
 ## ------------------------------------------ ##
 
-# Basename and relative dir of the input file.
-my $am_file_name;
-my $am_relative_dir;
-
-# Same but wrt Makefile.in.
-my $in_file_name;
+# Relative dir of the output makefile.
 my $relative_dir;
 
-# Relative path to the top directory.
-my $topsrcdir;
-
 # Greatest timestamp of the output's dependencies (excluding
 # configure's dependencies).
 my $output_deps_greatest_timestamp;
@@ -620,12 +594,7 @@ sub initialize_per_input ()
 {
     reset_local_duplicates ();
 
-    $am_file_name = undef;
-    $am_relative_dir = undef;
-
-    $in_file_name = undef;
     $relative_dir = undef;
-    $topsrcdir = undef;
 
     $output_deps_greatest_timestamp = 0;
 
@@ -2110,8 +2079,10 @@ sub handle_LIBOBJS_or_ALLOCA ($)
       # we are already there, and since the targets are built without
       # a $(top_builddir), it helps BSD Make to match them with
       # dependencies.
-      $dir = "$config_libobj_dir/" if $config_libobj_dir ne '.';
-      $dir = "$topsrcdir/$dir" if $relative_dir ne '.';
+      $dir = "$config_libobj_dir/"
+        if $config_libobj_dir ne '.';
+      $dir = backname ($relative_dir) . "/$dir"
+        if $relative_dir ne '.';
       define_variable ('LIBOBJDIR', INTERNAL, $dir);
     }
   $clean_files{'$(LIBOBJDIR)*.$(OBJEXT)'} = MOSTLY_CLEAN;
@@ -3013,7 +2984,7 @@ sub handle_texinfo ()
   if ($info_texinfos)
     {
       define_verbose_texinfo;
-      almost_verbatim ('texibuild');
+      verbatim ('texibuild');
       ($mostlyclean, $clean, $maintclean) = handle_texinfo_helper 
($info_texinfos);
       chomp $mostlyclean;
       chomp $clean;
@@ -3570,21 +3541,17 @@ sub handle_config_headers ()
                    qw/$(am.config-hdr.local) $(am.config-hdr.non-local)/);
 }
 
-# &handle_configure ($MAKEFILE_AM, $MAKEFILE_IN, $MAKEFILE, @INPUTS)
-# ------------------------------------------------------------------
+# &handle_configure ($MAKEFILE, @INPUTS)
+# --------------------------------------
 # Handle remaking and configure stuff.
 # We need the name of the input file, to do proper remaking rules.
-sub handle_configure ($$$@)
+sub handle_configure ($@)
 {
-  my ($makefile_am, $makefile_in, $makefile, @inputs) = @_;
+  my ($makefile, @inputs) = @_;
 
   prog_error 'empty @inputs'
     unless @inputs;
 
-  my ($rel_makefile_am, $rel_makefile_in) = prepend_srcdir ($makefile_am,
-                                                           $makefile_in);
-  my $rel_makefile = basename $makefile;
-
   my $colon_infile = ':' . join (':', @inputs);
   $colon_infile = '' if $colon_infile eq ":$makefile.in";
   my @rewritten = rewrite_inputs_into_dependencies ($makefile, @inputs);
@@ -3602,13 +3569,10 @@ sub handle_configure ($$$@)
   $output_rules .= file_contents
     ('configure',
      new Automake::Location,
-     MAKEFILE              => $rel_makefile,
      'MAKEFILE-DEPS'       => "@rewritten",
      'CONFIG-MAKEFILE'     => ($relative_dir eq '.') ? '$@' : '$(subdir)/$@',
-     'MAKEFILE-IN'         => $rel_makefile_in,
      'HAVE-MAKEFILE-IN-DEPS' => (@include_stack > 0),
      'MAKEFILE-IN-DEPS'    => "@include_stack",
-     'MAKEFILE-AM'         => $rel_makefile_am,
      'AUTOMAKE-OPTIONS'    => $automake_options,
      'MAKEFILE-AM-SOURCES' => "$makefile$colon_infile",
      'REGEN-ACLOCAL-M4'    => $regen_aclocal_m4,
@@ -3910,37 +3874,29 @@ sub handle_user_recursion ()
     }
 }
 
-# handle_clean ($MAKEFILE)
-# ------------------------
-# Handle all 'clean' targets.
-sub handle_clean ($)
+sub handle_clean ()
 {
-  my ($makefile) = @_;
+  my (%f, %d);
 
   my @fkeys = keys %clean_files;
-  my @fmostly = grep { $clean_files{$_} == MOSTLY_CLEAN     } @fkeys;
-  my @fplain  = grep { $clean_files{$_} == CLEAN            } @fkeys;
-  my @fdist   = grep { $clean_files{$_} == DIST_CLEAN       } @fkeys;
-  my @fmaint  = grep { $clean_files{$_} == MAINTAINER_CLEAN } @fkeys;
+  $f{mostly} = [ grep { $clean_files{$_} == MOSTLY_CLEAN     } @fkeys ];
+  $f{normal} = [ grep { $clean_files{$_} == CLEAN            } @fkeys ];
+  $f{dist}   = [ grep { $clean_files{$_} == DIST_CLEAN       } @fkeys ];
+  $f{maint}  = [ grep { $clean_files{$_} == MAINTAINER_CLEAN } @fkeys ];
 
   my @dkeys = keys %clean_dirs;
-  my @dmostly = grep { $clean_dirs{$_} == MOSTLY_CLEAN     } @dkeys;
-  my @dplain  = grep { $clean_dirs{$_} == CLEAN            } @dkeys;
-  my @ddist   = grep { $clean_dirs{$_} == DIST_CLEAN       } @dkeys;
-  my @dmaint  = grep { $clean_dirs{$_} == MAINTAINER_CLEAN } @dkeys;
+  $d{mostly} = [ grep { $clean_dirs{$_} == MOSTLY_CLEAN     } @dkeys ];
+  $d{normal} = [ grep { $clean_dirs{$_} == CLEAN            } @dkeys ];
+  $d{dist}   = [ grep { $clean_dirs{$_} == DIST_CLEAN       } @dkeys ];
+  $d{maint}  = [ grep { $clean_dirs{$_} == MAINTAINER_CLEAN } @dkeys ];
 
-  $output_rules .= &file_contents
-    ('clean',
-     new Automake::Location,
-     'MOSTLYCLEAN-FILES'     => "@fmostly",
-     'CLEAN-FILES'           => "@fplain",
-     'DISTCLEAN-FILES'       => "@fdist",
-     'MAINTAINERCLEAN-FILES' => "@fmaint",
-     'MOSTLYCLEAN-DIRS'      => "@dmostly",
-     'CLEAN-DIRS'            => "@dplain",
-     'DISTCLEAN-DIRS'        => "@ddist",
-     'MAINTAINERCLEAN-DIRS'  => "@dmaint",
-     'MAKEFILE'              => basename $makefile);
+  foreach my $kind (qw/mostly normal dist maint/)
+    {
+      define_variable ("am.clean.$kind.f.auto", INTERNAL, @{$f{$kind}});
+      define_variable ("am.clean.$kind.d.auto", INTERNAL, @{$d{$kind}});
+    }
+
+  verbatim ('clean');
 }
 
 
@@ -4065,15 +4021,15 @@ sub handle_tests
 
   if (var ('TESTS'))
     {
-      almost_verbatim ('color-tests');
+      verbatim ('color-tests');
       if (option 'serial-tests')
         {
-          almost_verbatim ('serial-tests');
+          verbatim ('serial-tests');
         }
       else
         {
           require_conf_file ("parallel-tests", FOREIGN, 'test-driver');
-          almost_verbatim ('parallel-tests');
+          verbatim ('parallel-tests');
        }
     }
 }
@@ -5627,13 +5583,13 @@ sub define_standard_variables
     {
       &define_configure_variable ($var);
     }
-  $output_vars .= preprocess_file ("$libdir/am/header-vars.am");
+  $output_vars .= verbatim ('header-vars');
 }
 
 # Read main am file.
-sub read_main_am_file
+sub read_main_am_file ($$)
 {
-    my ($amfile) = @_;
+    my ($amfile, $infile) = @_;
 
     # This supports the strange variable tricks we are about to play.
     prog_error ("variable defined before read_main_am_file\n" . variables_dump 
())
@@ -5641,8 +5597,8 @@ sub read_main_am_file
 
     # Generate copyright header for generated Makefile.in.
     # We do discard the output of predefined variables, handled below.
-    $output_vars = ("# $in_file_name generated by automake "
-                  . $VERSION . " from $am_file_name.\n");
+    $output_vars = ("# " . basename ($infile) . " generated by automake "
+                  . $VERSION . " from " . basename ($amfile) . ".\n");
     $output_vars .= '# ' . subst ('configure_input') . "\n";
     $output_vars .= $gen_copyright;
 
@@ -5724,6 +5680,35 @@ sub transform ($$)
 }
 
 # $TEXT
+# slurp_makefile_fragment ($MAKEFILE)
+# -----------------------------------
+# Load a $MAKEFILE, strip '##'-style comments, and return the result.
+# No extra parsing or post-processing is done (e.g., '%TRANSFORM%'
+# substitutions, recognition of rules declaration or of make variables
+# definitions).
+sub slurp_makefile_fragment ($)
+{
+  my $file = shift;
+  local $_;
+  if (not defined ($_ = $am_file_cache{$file}))
+    {
+      verb "reading $file";
+      # Swallow the whole file.
+      my $fc_file = new Automake::XFile "< $file";
+      my $saved_dollar_slash = $/;
+      undef $/;
+      $_ = $fc_file->getline;
+      $/ = $saved_dollar_slash;
+      $fc_file->close;
+      # Remove ##-comments.
+      s/$IGNORE_PATTERN//gom;
+      # Remember the contents of the just-read file.
+      $am_file_cache{$file} = $_;
+    }
+  return $_;
+}
+
+# $TEXT
 # preprocess_file ($MAKEFILE, [%TRANSFORM])
 # -----------------------------------------
 # Load a $MAKEFILE, apply the %TRANSFORM, and return the result.
@@ -5764,23 +5749,10 @@ sub preprocess_file ($%)
                 'SILENT'       => silent_flag (),
                %transform);
 
-  if (! defined ($_ = $am_file_cache{$file}))
-    {
-      verb "reading $file";
-      # Swallow the whole file.
-      my $fc_file = new Automake::XFile "< $file";
-      my $saved_dollar_slash = $/;
-      undef $/;
-      $_ = $fc_file->getline;
-      $/ = $saved_dollar_slash;
-      $fc_file->close;
-      # Remove ##-comments.
-      # Besides we don't need more than two consecutive new-lines.
-      s/(?:$IGNORE_PATTERN|(?<=\n\n)\n+)//gom;
-      # Remember the contents of the just-read file.
-      $am_file_cache{$file} = $_;
-    }
+  local $_ = slurp_makefile_fragment ($file);
 
+  # We don't need more than two consecutive new-lines.
+  s/(?<=\n\n)\n+//gm;
   # Substitute Automake template tokens.
   s/(?: % \?? [\w\-]+ %
       | \? !? [\w\-]+ \?
@@ -5793,16 +5765,29 @@ sub preprocess_file ($%)
   return $_;
 }
 
-# almost_verbatim ($NAME, [%TRANSFORM])
-# -------------------------------------
-# Load a "$libdir/am/$NAME.am", apply the %TRANSFORM, and append the
-# result to the '$output_verbatim'.  No extra parsing or post-processing
-# is done (i.e., recognition of rules declaration or of make variables
-# definitions).
-sub almost_verbatim ($%)
+# verbatim ($NAME)
+# ----------------
+# Load a "$libdir/am/$NAME.mk", stripping any '##'-style comment.  No
+# extra parsing or post-processing is done (i.e., recognition of rules
+# declaration or of make variables definitions).
+# If used in scalar or list context, return the read makefile fragment.
+# While if used in void context, append it to the '$output_verbatim'
+# variable.
+sub verbatim ($)
 {
   my $name = shift;
-  $output_verbatim .= preprocess_file ("$libdir/am/$name.am", @_);
+  my $text .= slurp_makefile_fragment ("$libdir/am/$name.mk");
+  if (defined wantarray)
+    {
+      # Scalar or list context.
+      return $text;
+    }
+  else
+    {
+      # Void context
+      $output_verbatim .= $text;
+      return;
+    }
 }
 
 # @PARAGRAPHS
@@ -6613,15 +6598,13 @@ sub required_file_check_or_copy ($$$)
 }
 
 
-# &require_file_internal ($WHERE, $MYSTRICT, $DIRECTORY, $QUEUE, @FILES)
-# ----------------------------------------------------------------------
+# &require_file_internal ($WHERE, $MYSTRICT, $DIRECTORY, @FILES)
+# --------------------------------------------------------------
 # Verify that the file must exist in $DIRECTORY, or install it.
 # $MYSTRICT is the strictness level at which this file becomes required.
-# Worker threads may queue up the action to be serialized by the master,
-# if $QUEUE is true
 sub require_file_internal ($$$@)
 {
-  my ($where, $mystrict, $dir, $queue, @files) = @_;
+  my ($where, $mystrict, $dir, @files) = @_;
 
   return
     unless $strictness >= $mystrict;
@@ -6629,16 +6612,7 @@ sub require_file_internal ($$$@)
   foreach my $file (@files)
     {
       push_required_file ($dir, $file, "$dir/$file");
-      if ($queue)
-        {
-          queue_required_file_check_or_copy ($required_conf_file_queue,
-                                             QUEUE_CONF_FILE, $relative_dir,
-                                             $where, $mystrict, @files);
-        }
-      else
-        {
-          required_file_check_or_copy ($where, $dir, $file);
-        }
+      required_file_check_or_copy ($where, $dir, $file);
     }
 }
 
@@ -6647,7 +6621,7 @@ sub require_file_internal ($$$@)
 sub require_file ($$@)
 {
     my ($where, $mystrict, @files) = @_;
-    require_file_internal ($where, $mystrict, $relative_dir, 0, @files);
+    require_file_internal ($where, $mystrict, $relative_dir, @files);
 }
 
 # &require_file_with_macro ($COND, $MACRO, $MYSTRICT, @FILES)
@@ -6670,7 +6644,7 @@ sub require_libsource_with_macro ($$$@)
     if ($config_libobj_dir)
       {
        require_file_internal ($macro->rdef ($cond)->location, $mystrict,
-                              $config_libobj_dir, 0, @files);
+                              $config_libobj_dir, @files);
       }
     else
       {
@@ -6678,66 +6652,13 @@ sub require_libsource_with_macro ($$$@)
       }
 }
 
-# &queue_required_file_check_or_copy ($QUEUE, $KEY, $DIR, $WHERE,
-#                                     $MYSTRICT, @FILES)
-# ---------------------------------------------------------------
-sub queue_required_file_check_or_copy ($$$$@)
-{
-    my ($queue, $key, $dir, $where, $mystrict, @files) = @_;
-    my @serial_loc;
-    if (ref $where)
-      {
-        @serial_loc = (QUEUE_LOCATION, $where->serialize ());
-      }
-    else
-      {
-        @serial_loc = (QUEUE_STRING, $where);
-      }
-    $queue->enqueue ($key, $dir, @serial_loc, $mystrict, 0 + @files, @files);
-}
-
-# &require_queued_file_check_or_copy ($QUEUE)
-# -------------------------------------------
-sub require_queued_file_check_or_copy ($)
-{
-    my ($queue) = @_;
-    my $where;
-    my $dir = $queue->dequeue ();
-    my $loc_key = $queue->dequeue ();
-    if ($loc_key eq QUEUE_LOCATION)
-      {
-       $where = Automake::Location::deserialize ($queue);
-      }
-    elsif ($loc_key eq QUEUE_STRING)
-      {
-       $where = $queue->dequeue ();
-      }
-    else
-      {
-       prog_error "unexpected key $loc_key";
-      }
-    my $mystrict = $queue->dequeue ();
-    my $nfiles = $queue->dequeue ();
-    my @files;
-    push @files, $queue->dequeue ()
-      foreach (1 .. $nfiles);
-    return
-      unless $strictness >= $mystrict;
-    foreach my $file (@files)
-      {
-        required_file_check_or_copy ($where, $config_aux_dir, $file);
-      }
-}
-
 # &require_conf_file ($WHERE, $MYSTRICT, @FILES)
 # ----------------------------------------------
 # Looks in configuration path, as specified by AC_CONFIG_AUX_DIR.
 sub require_conf_file ($$@)
 {
     my ($where, $mystrict, @files) = @_;
-    my $queue = defined $required_conf_file_queue ? 1 : 0;
-    require_file_internal ($where, $mystrict, $config_aux_dir,
-                           $queue, @files);
+    require_file_internal ($where, $mystrict, $config_aux_dir, @files);
 }
 
 
@@ -6778,11 +6699,6 @@ sub generate_makefile ($$)
   # we have processed AUTOMAKE_OPTIONS.
   buffer_messages ('warning');
 
-  # Name of input file ("Makefile.am") and output file
-  # ("Makefile.in").  These have no directory components.
-  $am_file_name = basename ($makefile_am);
-  $in_file_name = basename ($makefile_in);
-
   # $OUTPUT is encoded.  If it contains a ":" then the first element
   # is the real output file, and all remaining elements are input
   # files.  We don't scan or otherwise deal with these input files,
@@ -6791,10 +6707,8 @@ sub generate_makefile ($$)
   my ($makefile, @inputs) = split (/:/, $output_files{$makefile_in});
 
   $relative_dir = dirname ($makefile);
-  $am_relative_dir = dirname ($makefile_am);
-  $topsrcdir = backname ($relative_dir);
 
-  read_main_am_file ($makefile_am);
+  read_main_am_file ($makefile_am, $makefile_in);
   if (handle_options)
     {
       # Process buffered warnings.
@@ -6822,6 +6736,11 @@ sub generate_makefile ($$)
   # Must do this after reading .am file.
   define_variable ('subdir', INTERNAL, $relative_dir);
   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,
+                   prepend_srcdir ($makefile_am));
+  define_variable ('am.relpath.makefile.in', INTERNAL,
+                   prepend_srcdir ($makefile_in));
 
   # If DIST_SUBDIRS is defined, make sure SUBDIRS is, so that
   # recursive rules are enabled.
@@ -6832,10 +6751,10 @@ sub generate_makefile ($$)
   check_gnu_standards;
   check_gnits_standards;
 
-  almost_verbatim ('am-dir');
+  verbatim ('am-dir');
 
   handle_config_headers;
-  handle_configure ($makefile_am, $makefile_in, $makefile, @inputs);
+  handle_configure ($makefile, @inputs);
   handle_gettext;
   handle_libraries;
   handle_ltlibraries;
@@ -6887,9 +6806,9 @@ sub generate_makefile ($$)
   handle_footer;
   # Special targets 'all', 'check' and 'install', handling of
   # $(BUILT_SOURCES), and related stuff.
-  almost_verbatim ('common-targets');
+  verbatim ('common-targets');
 
-  handle_clean ($makefile);
+  handle_clean ();
   handle_factored_dependencies;
 
   # Comes last, because all the above procedures may have
@@ -6898,8 +6817,7 @@ sub generate_makefile ($$)
 
   my $output_checks = '';
   # See if any _SOURCES (or _LIBADD, or ...) variable were misspelled.
-  $output_checks .= preprocess_file ("$libdir/am/check-typos.am",
-                                     MAKEFILE => basename ($makefile));
+  $output_checks .= verbatim ('check-typos');
   # Bail out if we have encountered errors at make runtime.  The
   # relevant diagnostic should have already been reported by any
   # call to the function '$(am.error)', so we just print a generic
@@ -6914,6 +6832,7 @@ sub generate_makefile ($$)
       return;
     }
 
+  my $am_relative_dir = dirname ($makefile_am);
   mkdir ($am_relative_dir, 0755) if ! -d $am_relative_dir;
 
   # We make sure that 'all:' is the first target.
@@ -7169,118 +7088,6 @@ sub handle_makefile ($)
     }
 }
 
-# handle_makefiles_serial ()
-# --------------------------
-# Deal with all makefiles, without threads.
-sub handle_makefiles_serial ()
-{
-  foreach my $file (@input_files)
-    {
-      handle_makefile ($file);
-    }
-}
-
-# get_number_of_threads ()
-# ------------------------
-# Logic for deciding how many worker threads to use.
-sub get_number_of_threads
-{
-  my $nthreads = $ENV{'AUTOMAKE_JOBS'} || 0;
-
-  $nthreads = 0
-    unless $nthreads =~ /^[0-9]+$/;
-
-  # It doesn't make sense to use more threads than makefiles,
-  my $max_threads = @input_files;
-
-  if ($nthreads > $max_threads)
-    {
-      $nthreads = $max_threads;
-    }
-  return $nthreads;
-}
-
-# handle_makefiles_threaded ($NTHREADS)
-# -------------------------------------
-# Deal with all makefiles, using threads.  The general strategy is to
-# spawn NTHREADS worker threads, dispatch makefiles to them, and let the
-# worker threads push back everything that needs serialization:
-# * warning and (normal) error messages, for stable stderr output
-#   order and content (avoiding duplicates, for example),
-# * races when installing aux files (and respective messages),
-# * races when collecting aux files for distribution.
-#
-# The latter requires that the makefile that deals with the aux dir
-# files be handled last, done by the master thread.
-sub handle_makefiles_threaded ($)
-{
-  my ($nthreads) = @_;
-
-  # The file queue distributes all makefiles, the message queues
-  # collect all serializations needed for respective files.
-  my $file_queue = Thread::Queue->new;
-  my %msg_queues;
-  foreach my $file (@input_files)
-    {
-      $msg_queues{$file} = Thread::Queue->new;
-    }
-
-  verb "spawning $nthreads worker threads";
-  my @threads = (1 .. $nthreads);
-  foreach my $t (@threads)
-    {
-      $t = threads->new (sub
-       {
-         while (my $file = $file_queue->dequeue)
-           {
-             verb "handling $file";
-             my $queue = $msg_queues{$file};
-             setup_channel_queue ($queue, QUEUE_MESSAGE);
-             $required_conf_file_queue = $queue;
-             handle_makefile ($file);
-             $queue->enqueue (undef);
-             setup_channel_queue (undef, undef);
-             $required_conf_file_queue = undef;
-           }
-         return $exit_code;
-       });
-    }
-
-  # Queue all makefiles.
-  verb "queuing " . @input_files . " input files";
-  $file_queue->enqueue (@input_files, (undef) x @threads);
-
-  # Collect and process serializations.
-  foreach my $file (@input_files)
-    {
-      verb "dequeuing messages for " . $file;
-      reset_local_duplicates ();
-      my $queue = $msg_queues{$file};
-      while (my $key = $queue->dequeue)
-       {
-         if ($key eq QUEUE_MESSAGE)
-           {
-             pop_channel_queue ($queue);
-           }
-         elsif ($key eq QUEUE_CONF_FILE)
-           {
-             require_queued_file_check_or_copy ($queue);
-           }
-         else
-           {
-             prog_error "unexpected key $key";
-           }
-       }
-    }
-
-  foreach my $t (@threads)
-    {
-      my @exit_thread = $t->join;
-      $exit_code = $exit_thread[0]
-       if ($exit_thread[0] > $exit_code);
-    }
-}
-
 ################################################################
 
 # Parse the WARNINGS environment variable.
@@ -7302,15 +7109,9 @@ if (! @input_files)
     fatal ("no 'Makefile.am' found for any configure output$msg");
   }
 
-my $nthreads = get_number_of_threads ();
-
-if ($perl_threads && $nthreads >= 1)
-  {
-    handle_makefiles_threaded ($nthreads);
-  }
-else
+foreach my $file (@input_files)
   {
-    handle_makefiles_serial ();
+    handle_makefile ($file);
   }
 
 exit $exit_code;
diff --git a/bootstrap.sh b/bootstrap.sh
index 278d118..359eaf1 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -37,7 +37,6 @@ BOOTSTRAP_SHELL=${BOOTSTRAP_SHELL-/bin/sh}
 VERSION=`sed -ne '/AC_INIT/s/^[^[]*\[[^[]*\[\([^]]*\)\].*$/\1/p' configure.ac`
 PACKAGE=automake
 datadir=.
-PERL_THREADS=0
 # This should be automatically updated by the 'update-copyright'
 # rule of our Makefile.
 RELEASE_YEAR=2012
@@ -76,7 +75,6 @@ dosubst ()
   sed -e "address@hidden@%$APIVERSION%g" \
       -e "address@hidden@%$PACKAGE%g" \
       -e "address@hidden@%$PERL%g" \
-      -e "address@hidden@%$PERL_THREADS%g" \
       -e "address@hidden@%$BOOTSTRAP_SHELL%g" \
       -e "address@hidden@%$VERSION%g" \
       -e "address@hidden@%$datadir%g" \
diff --git a/configure.ac b/configure.ac
index 775eae3..50176d8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -88,32 +88,6 @@ installed, select the one Automake-NG should use using
   ./configure PERL=/path/to/perl])
 }
 
-# We require ithreads support, and version 5.7.2 for CLONE.
-AC_CACHE_CHECK([whether $PERL supports ithreads], [am_cv_prog_PERL_ithreads],
-[if $PERL -e '
-    require 5.007_002;
-    use Config;
-    if ($Config{useithreads})
-      {
-       require threads;
-       import threads;
-       require Thread::Queue;
-       import Thread::Queue;
-       exit 0;
-      }
-    exit 1;' >&AS_MESSAGE_LOG_FD 2>&1
-then
-  am_cv_prog_PERL_ithreads=yes
-else
-  am_cv_prog_PERL_ithreads=no
-fi])
-if test $am_cv_prog_PERL_ithreads = yes; then
-  PERL_THREADS=1;
-else
-  PERL_THREADS=0;
-fi
-AC_SUBST([PERL_THREADS])
-
 # The test suite will skip some tests if tex is absent.
 AC_CHECK_PROG([TEX], [tex], [tex])
 # Save details about the selected TeX program in config.log.
diff --git a/doc/automake-ng.texi b/doc/automake-ng.texi
index e8b1303..c84e764 100644
--- a/doc/automake-ng.texi
+++ b/doc/automake-ng.texi
@@ -2717,12 +2717,6 @@ for this reason.
 
 @end table
 
address@hidden AUTOMAKE_JOBS
-If the environment variable @env{AUTOMAKE_JOBS} contains a positive
-number, it is taken as the maximum number of Perl threads to use in
address@hidden for generating multiple @file{Makefile.in} files
-concurrently.  This is an experimental feature.
-
 
 @node configure
 @chapter Scanning @file{configure.ac}, using @command{aclocal}
diff --git a/lib/Automake/ChannelDefs.pm b/lib/Automake/ChannelDefs.pm
index b1ee32e..bc4c6a8 100644
--- a/lib/Automake/ChannelDefs.pm
+++ b/lib/Automake/ChannelDefs.pm
@@ -16,14 +16,6 @@
 package Automake::ChannelDefs;
 
 use Automake::Config;
-BEGIN
-{
-  if ($perl_threads)
-    {
-      require threads;
-      import threads;
-    }
-}
 use Automake::Channels;
 
 =head1 NAME
@@ -142,7 +134,7 @@ Informative messages.
 # Do not forget to update &usage and the manual
 # if you add or change a warning channel.
 
-register_channel 'fatal', type => 'fatal', uniq_part => UP_NONE, ordered => 0;
+register_channel 'fatal', type => 'fatal', uniq_part => UP_NONE;
 register_channel 'error', type => 'error';
 register_channel 'error-gnu', type => 'error';
 register_channel 'error-gnu/warn', type => 'error';
@@ -152,7 +144,7 @@ register_channel 'automake', type => 'fatal', backtrace => 
1,
             "## Internal Error ##\n" .
             "####################\n"),
   footer => "\nPlease contact <$PACKAGE_BUGREPORT>.",
-  uniq_part => UP_NONE, ordered => 0;
+  uniq_part => UP_NONE;
 
 register_channel 'extra-portability', type => 'warning', silent => 1;
 register_channel 'gnu', type => 'warning';
@@ -162,8 +154,7 @@ register_channel 'portability', type => 'warning', silent 
=> 1;
 register_channel 'syntax', type => 'warning';
 register_channel 'unsupported', type => 'warning';
 
-register_channel 'verb', type => 'debug', silent => 1, uniq_part => UP_NONE,
-  ordered => 0;
+register_channel 'verb', type => 'debug', silent => 1, uniq_part => UP_NONE;
 register_channel 'note', type => 'debug', silent => 0;
 
 setup_channel_type 'warning', header => 'warning: ';
@@ -248,8 +239,6 @@ C<--verbose> messages.
 sub verb ($;%)
 {
   my ($msg, %opts) = @_;
-  $msg = "thread " . threads->tid . ": " . $msg
-    if $perl_threads;
   msg 'verb', '', $msg, %opts;
 }
 
diff --git a/lib/Automake/Channels.pm b/lib/Automake/Channels.pm
index 724a114..9149768 100644
--- a/lib/Automake/Channels.pm
+++ b/lib/Automake/Channels.pm
@@ -43,13 +43,6 @@ Automake::Channels - support functions for error and warning 
management
   # Turn on all channels of type 'warning'.
   setup_channel_type 'warning', silent => 0;
 
-  # Redirect all channels to push messages on a Thread::Queue using
-  # the specified serialization key.
-  setup_channel_queue $queue, $key;
-
-  # Output a message pending in a Thread::Queue.
-  pop_channel_queue $queue;
-
   # Treat all warnings as errors.
   $warnings_are_errors = 1;
 
@@ -81,7 +74,6 @@ use vars qw (@ISA @EXPORT %channels $me);
              &setup_channel &setup_channel_type
              &dup_channel_setup &drop_channel_setup
              &buffer_messages &flush_messages
-             &setup_channel_queue &pop_channel_queue
              US_GLOBAL US_LOCAL
              UP_NONE UP_TEXT UP_LOC_TEXT);
 
@@ -181,11 +173,6 @@ The file where the error should be output.
 Whether the channel should be silent.  Use this do disable a
 category of warning, for instance.
 
-=item C<ordered =E<gt> 1>
-
-Whether, with multi-threaded execution, the message should be queued
-for ordered output.
-
 =item C<uniq_part =E<gt> UP_LOC_TEXT>
 
 The part of the message subject to duplicate filtering.  See the
@@ -269,9 +256,6 @@ use vars qw (%_default_options %_global_duplicate_messages
    exit_code => 1,
    file => \*STDERR,
    silent => 0,
-   ordered => 1,
-   queue => 0,
-   queue_key => undef,
    uniq_scope => US_LOCAL,
    uniq_part => UP_LOC_TEXT,
    header => '',
@@ -343,13 +327,6 @@ sub _merge_options (\%%)
          confess "unknown option '$_'";
        }
     }
-  if ($hash->{'ordered'})
-    {
-      confess "fatal messages cannot be ordered"
-       if $hash->{'type'} eq 'fatal';
-      confess "backtrace cannot be output on ordered messages"
-       if $hash->{'backtrace'};
-    }
 }
 
 =item C<register_channel ($name, [%options])>
@@ -433,63 +410,6 @@ sub _format_message ($$%)
   return $msg;
 }
 
-# _enqueue ($QUEUE, $KEY, $UNIQ_SCOPE, $TO_FILTER, $MSG, $FILE)
-# -------------------------------------------------------------
-# Push message on a queue, to be processed by another thread.
-sub _enqueue ($$$$$$)
-{
-  my ($queue, $key, $uniq_scope, $to_filter, $msg, $file) = @_;
-  $queue->enqueue ($key, $msg, $to_filter, $uniq_scope);
-  confess "message queuing works only for STDERR"
-    if $file ne \*STDERR;
-}
-
-# _dequeue ($QUEUE)
-# -----------------
-# Pop a message from a queue, and print, similarly to how
-# _print_message would do it.  Return 0 if the queue is
-# empty.  Note that the key has already been dequeued.
-sub _dequeue ($)
-{
-  my ($queue) = @_;
-  my $msg = $queue->dequeue || return 0;
-  my $to_filter = $queue->dequeue;
-  my $uniq_scope = $queue->dequeue;
-  my $file = \*STDERR;
-
-  if ($to_filter ne '')
-    {
-      # Do we want local or global uniqueness?
-      my $dups;
-      if ($uniq_scope == US_LOCAL)
-       {
-         $dups = \%_local_duplicate_messages;
-       }
-      elsif ($uniq_scope == US_GLOBAL)
-       {
-         $dups = \%_global_duplicate_messages;
-       }
-      else
-       {
-         confess "unknown value for uniq_scope: " . $uniq_scope;
-       }
-
-      # Update the hash of messages.
-      if (exists $dups->{$to_filter})
-       {
-         ++$dups->{$to_filter};
-         return 1;
-       }
-      else
-       {
-         $dups->{$to_filter} = 0;
-       }
-    }
-  print $file $msg;
-  return 1;
-}
-
-
 # _print_message ($LOCATION, $MESSAGE, %OPTIONS)
 # ----------------------------------------------
 # Format the message, check duplicates, and print it.
@@ -561,15 +481,7 @@ sub _print_message ($$%)
        }
     }
   my $file = $opts{'file'};
-  if ($opts{'ordered'} && $opts{'queue'})
-    {
-      _enqueue ($opts{'queue'}, $opts{'queue_key'}, $opts{'uniq_scope'},
-               $to_filter, $msg, $file);
-    }
-  else
-    {
-      print $file $msg;
-    }
+  print $file $msg;
   return 1;
 }
 
@@ -662,7 +574,7 @@ sub msg ($$;$%)
       confess if $opts{'backtrace'};
       if ($opts{'type'} eq 'fatal')
         {
-         # flush messages explicitly here, needed in worker threads.
+         # Flush messages explicitly here, for extra safety.
          STDERR->flush;
          exit $exit_code;
        }
@@ -777,33 +689,6 @@ sub flush_messages ()
   @backlog = ();
 }
 
-=item C<setup_channel_queue ($queue, $key)>
-
-Set the queue to fill for each channel that is ordered,
-and the key to use for serialization.
-
-=cut
-sub setup_channel_queue ($$)
-{
-  my ($queue, $key) = @_;
-  foreach my $channel (keys %channels)
-    {
-      setup_channel $channel, queue => $queue, queue_key => $key
-        if $channels{$channel}{'ordered'};
-    }
-}
-
-=item C<pop_channel_queue ($queue)>
-
-pop a message off the $queue; the key has already been popped.
-
-=cut
-sub pop_channel_queue ($)
-{
-  my ($queue) = @_;
-  return _dequeue ($queue);
-}
-
 =back
 
 =head1 SEE ALSO
diff --git a/lib/Automake/Config.in b/lib/Automake/Config.in
index bbf55ac..548d681 100644
--- a/lib/Automake/Config.in
+++ b/lib/Automake/Config.in
@@ -23,7 +23,7 @@ require Exporter;
 
 our @ISA = qw (Exporter);
 our @EXPORT = qw ($APIVERSION $PACKAGE $PACKAGE_BUGREPORT $VERSION
-                  $RELEASE_YEAR $libdir $perl_threads);
+                  $RELEASE_YEAR $libdir);
 
 # Parameters set by configure.  Not to be changed.  NOTE: assign
 # VERSION as string so that e.g. version 0.30 will print correctly.
@@ -33,7 +33,6 @@ our $PACKAGE_BUGREPORT = '@PACKAGE_BUGREPORT@';
 our $VERSION = '@VERSION@';
 our $RELEASE_YEAR = '@RELEASE_YEAR@';
 our $libdir = '@datadir@/@address@hidden@APIVERSION@';
-our $perl_threads = @PERL_THREADS@;
 
 1;
 
diff --git a/lib/Automake/DisjConditions.pm b/lib/Automake/DisjConditions.pm
index e449121..678892f 100644
--- a/lib/Automake/DisjConditions.pm
+++ b/lib/Automake/DisjConditions.pm
@@ -193,26 +193,6 @@ sub new ($;@)
   return $self;
 }
 
-
-=item C<CLONE>
-
-Internal special subroutine to fix up the self hashes in
-C<%_disjcondition_singletons> upon thread creation.  C<CLONE> is invoked
-automatically with ithreads from Perl 5.7.2 or later, so if you use this
-module with earlier versions of Perl, it is not thread-safe.
-
-=cut
-
-sub CLONE
-{
-  foreach my $self (values %_disjcondition_singletons)
-    {
-      my %h = map { $_ => $_ } @{$self->{'conds'}};
-      $self->{'hash'} = \%h;
-    }
-}
-
-
 =item C<@conds = $set-E<gt>conds>
 
 Return the list of C<Condition> objects involved in C<$set>.
diff --git a/lib/Automake/Location.pm b/lib/Automake/Location.pm
index 290db73..28d1a38 100644
--- a/lib/Automake/Location.pm
+++ b/lib/Automake/Location.pm
@@ -59,13 +59,6 @@ Automake::Location - a class for location tracking, with a 
stack of contexts
   # that would otherwise be modified.
   my $where_copy = $where->clone;
 
-  # Serialize a Location object (for passing through a thread queue,
-  # for example)
-  my @array = $where->serialize ();
-
-  # De-serialize: recreate a Location object from a queue.
-  my $where = new Automake::Location::deserialize ($queue);
-
 =head1 DESCRIPTION
 
 C<Location> objects are used to keep track of locations in Automake,
@@ -207,46 +200,6 @@ sub dump ($)
   return $res;
 }
 
-=item C<@array = $location-E<gt>serialize>
-
-Serialize a Location object (for passing through a thread queue,
-for example).
-
-=cut
-
-sub serialize ($)
-{
-  my ($self) = @_;
-  my @serial = ();
-  push @serial, $self->get;
-  my @contexts = $self->get_contexts;
-  for my $pair (@contexts)
-    {
-      push @serial, @{$pair};
-    }
-  push @serial, undef;
-  return @serial;
-}
-
-=item C<new Automake::Location::deserialize ($queue)>
-
-De-serialize: recreate a Location object from a queue.
-
-=cut
-
-sub deserialize ($)
-{
-  my ($queue) = @_;
-  my $position = $queue->dequeue ();
-  my $self = new Automake::Location $position;
-  while (my $position = $queue->dequeue ())
-    {
-      my $context = $queue->dequeue ();
-      push @{$self->{'contexts'}}, [$position, $context];
-    }
-  return $self;
-}
-
 =back
 
 =head1 SEE ALSO
diff --git a/lib/am/am-dir.am b/lib/am/am-dir.mk
similarity index 93%
rename from lib/am/am-dir.am
rename to lib/am/am-dir.mk
index 9d82b10..af57f81 100644
--- a/lib/am/am-dir.am
+++ b/lib/am/am-dir.mk
@@ -34,10 +34,7 @@ am.top-dir = $(top_builddir)/$(am.dir)
 # Its counterpart with an absolute path and for use in subdir makefiles.
 am.top-dir.abs = $(abs_top_builddir)/$(am.dir)
 
-.PHONY: am--distclean-amdir
-am--distclean-amdir:
-       rm -rf $(am.dir)
-distclean-am: am--distclean-amdir
+am.clean.dist.d += $(am.dir)
 
 $(am.dir):
        @mkdir $@
diff --git a/lib/am/check-typos.am b/lib/am/check-typos.mk
similarity index 98%
rename from lib/am/check-typos.am
rename to lib/am/check-typos.mk
index 89e7db7..f4629fe 100644
--- a/lib/am/check-typos.am
+++ b/lib/am/check-typos.mk
@@ -120,7 +120,7 @@ ifdef .am/sanity-checks-failed
 $(shell rm -f $(am.dir)/check-typos-stamp.mk)
 $(error Some Automake-NG sanity checks failed)
 else
-$(am.dir)/check-typos-stamp.mk: %MAKEFILE% | $(am.dir)
+$(am.dir)/check-typos-stamp.mk: $(am.relpath.makefile) | $(am.dir)
        @if \
          $(MAKE) --no-print-directory AM_FORCE_SANITY_CHECKS=yes .am/nil; \
        then \
diff --git a/lib/am/clean.am b/lib/am/clean.am
deleted file mode 100644
index 24d9587..0000000
--- a/lib/am/clean.am
+++ /dev/null
@@ -1,77 +0,0 @@
-## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994-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/>.
-
-am__mostlyclean_files += $(MOSTLYCLEANFILES)
-am__clean_files       += $(CLEANFILES)
-am__distclean_files   += $(DISTCLEANFILES)
-am__maintclean_files  += $(MAINTAINERCLEANFILES)
-
-am__mostlyclean_files += %MOSTLYCLEAN-FILES%
-am__clean_files       += %CLEAN-FILES%
-am__distclean_files   += %DISTCLEAN-FILES%
-am__maintclean_files  += %MAINTAINERCLEAN-FILES%
-
-am__mostlyclean_dirs  += %MOSTLYCLEAN-DIRS%
-am__clean_dirs        += %CLEAN-DIRS%
-am__distclean_dirs    += %DISTCLEAN-DIRS%
-am__maintclean_dirs   += %MAINTAINERCLEAN-DIRS%
-
-am__distclean_files += $(CONFIG_CLEAN_FILES)
-## Some files must be cleaned only in VPATH builds -- e.g., those linked
-## in usages like "AC_CONFIG_LINKS([GNUmakefile:GNUmakefile])".
-am__distclean_files += $(if $(filter .,$(srcdir)),,$(CONFIG_CLEAN_VPATH_FILES))
-
-## Built sources are automatically removed by maintainer-clean.
-## This is what mainline Automake does.
-am__maintclean_files += $(BUILT_SOURCES)
-
-mostlyclean-am: mostlyclean-generic
-mostlyclean-generic:
-       $(call am.clean-cmd.f,$(am__mostlyclean_files))
-       $(call am.clean-cmd.d,$(am__mostlyclean_dirs))
-
-clean-am: clean-generic mostlyclean-am
-clean-generic:
-       $(call am.clean-cmd.f,$(am__clean_files))
-       $(call am.clean-cmd.d,$(am__clean_dirs))
-
-distclean-am: distclean-generic clean-am
-distclean-generic:
-       $(call am.clean-cmd.f,$(am__distclean_files))
-       $(call am.clean-cmd.d,$(am__distclean_dirs))
-
-maintainer-clean-am: maintainer-clean-generic distclean-am
-maintainer-clean-generic:
-       $(call am.clean-cmd.f,$(am__maintclean_files))
-       $(call am.clean-cmd.d,$(am__maintclean_dirs))
-
-## Makefiles and their dependencies cannot be cleaned by
-## an '-am' dependency, because that would prevent other distclean
-## dependencies from calling make recursively (the multilib cleaning
-## used to do this, and it's not unreasonable to expect user-defined
-## rules might do that as well).
-distclean:
-       rm -f %MAKEFILE% $(am__config_distclean_files)
-maintainer-clean:
-       rm -f %MAKEFILE% $(am__config_distclean_files)
-
-.PHONY: clean mostlyclean distclean maintainer-clean \
-clean-generic mostlyclean-generic distclean-generic maintainer-clean-generic
-
-?!SUBDIRS?clean: clean-am
-?!SUBDIRS?distclean: distclean-am
-?!SUBDIRS?mostlyclean: mostlyclean-am
-?!SUBDIRS?maintainer-clean: maintainer-clean-am
diff --git a/lib/am/clean.mk b/lib/am/clean.mk
new file mode 100644
index 0000000..7d3ee9f
--- /dev/null
+++ b/lib/am/clean.mk
@@ -0,0 +1,78 @@
+## automake - create Makefile.in from Makefile.am
+## Copyright (C) 1994-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/>.
+
+am.clean.mostly.f += $(MOSTLYCLEANFILES)
+am.clean.normal.f += $(CLEANFILES)
+am.clean.dist.f   += $(DISTCLEANFILES)
+am.clean.maint.f  += $(MAINTAINERCLEANFILES)
+
+# Add files computed  automatically by the automake script, at automake
+# runtime.
+$(foreach t,f d, \
+  $(foreach k, mostly normal dist maint, \
+    $(eval am.clean.$k.$t += $(am.clean.$k.$t.auto))))
+
+am.clean.dist.f += $(CONFIG_CLEAN_FILES)
+
+# Some files must be cleaned only in VPATH builds -- e.g., those linked
+# in usages like "AC_CONFIG_LINKS([GNUmakefile:GNUmakefile])".
+ifneq ($(srcdir),.)
+am.clean.dist.f += $(CONFIG_CLEAN_VPATH_FILES)
+endif
+
+# Built sources are automatically removed by maintainer-clean.
+# This is what mainline Automake does.
+am.clean.maint.f += $(BUILT_SOURCES)
+
+mostlyclean-am: mostlyclean-generic
+mostlyclean-generic:
+       $(call am.clean-cmd.f,$(am.clean.mostly.f))
+       $(call am.clean-cmd.d,$(am.clean.mostly.d))
+
+clean-am: clean-generic mostlyclean-am
+clean-generic:
+       $(call am.clean-cmd.f,$(am.clean.normal.f))
+       $(call am.clean-cmd.d,$(am.clean.normal.d))
+
+distclean-am: distclean-generic clean-am
+distclean-generic:
+       $(call am.clean-cmd.f,$(am.clean.dist.f))
+       $(call am.clean-cmd.d,$(am.clean.dist.d))
+
+maintainer-clean-am: maintainer-clean-generic distclean-am
+maintainer-clean-generic:
+       $(call am.clean-cmd.f,$(am.clean.maint.f))
+       $(call am.clean-cmd.d,$(am.clean.maint.d))
+
+# Makefiles and their dependencies cannot be cleaned by an '-am'
+# dependency, because that would prevent other distclean dependencies
+# from calling make recursively (the multilib cleaning used to do
+# this, and it's not unreasonable to expect user-defined rules might
+# do that as well).
+distclean:
+       rm -f $(am.relpath.makefile) $(am__config_distclean_files)
+maintainer-clean:
+       rm -f $(am.relpath.makefile) $(am__config_distclean_files)
+
+.PHONY: clean mostlyclean distclean maintainer-clean \
+clean-generic mostlyclean-generic distclean-generic maintainer-clean-generic
+
+ifndef SUBDIRS
+clean: clean-am
+distclean: distclean-am
+mostlyclean: mostlyclean-am
+maintainer-clean: maintainer-clean-am
+endif
diff --git a/lib/am/color-tests.am b/lib/am/color-tests.mk
similarity index 100%
rename from lib/am/color-tests.am
rename to lib/am/color-tests.mk
diff --git a/lib/am/common-targets.am b/lib/am/common-targets.mk
similarity index 99%
rename from lib/am/common-targets.am
rename to lib/am/common-targets.mk
index 772c340..ec7fbc2 100644
--- a/lib/am/common-targets.am
+++ b/lib/am/common-targets.mk
@@ -163,6 +163,6 @@ all check install: | $(am.built-early)
 else
 $(foreach x,$(am.built-early),$(eval -include .am/built-sources/$(x)))
 .am/built-sources/%: | %
-       @$(am__ensure_target_dir_exists)
+       @$(am.cmd.ensure-target-dir-exists)
        @touch $@
 endif
diff --git a/lib/am/configure.am b/lib/am/configure.am
index 13a936b..67cad8d 100644
--- a/lib/am/configure.am
+++ b/lib/am/configure.am
@@ -19,7 +19,8 @@
 ## --------------------- ##
 
 ## This rule remakes the Makefile.in.
-%MAKEFILE-IN%: %MAINTAINER-MODE% %MAKEFILE-AM% %MAKEFILE-IN-DEPS% 
$(am.remake.configure-deps)
+$(am.relpath.makefile.in): %MAINTAINER-MODE% $(am.relpath.makefile.am) \
+                           %MAKEFILE-IN-DEPS% $(am.remake.configure-deps)
 ## If configure.ac or one of configure's dependencies has changed, all
 ## Makefile.in are to be updated; it is then more efficient to run
 ## automake on all the Makefiles at once.  It also allow Automake to be
@@ -47,9 +48,9 @@
 ## Ensure that GNU make doesn't remove Makefile if ./config.status (below)
 ## is interrupted.  Otherwise, the user would need to know to rerun
 ## ./config.status to recreate the lost Makefile.
-.PRECIOUS: %MAKEFILE%
+.PRECIOUS: $(am.relpath.makefile)
 ## This rule remakes the Makefile.
-%MAKEFILE%: %MAKEFILE-DEPS% $(top_builddir)/config.status
+$(am.relpath.makefile): %MAKEFILE-DEPS% $(top_builddir)/config.status
 ## If Makefile is to be updated because of config.status, then run
 ## config.status without argument in order to (i) rerun all the
 ## AC_CONFIG_COMMANDS including those that are not visible to
@@ -71,7 +72,7 @@
 ## Avoid the "deleted header file" problem for the dependencies.
 ?HAVE-MAKEFILE-IN-DEPS?%MAKEFILE-IN-DEPS%:
 
-am.dist.common-files += %MAKEFILE-AM%
+am.dist.common-files += $(am.relpath.makefile.am)
 
 
 ## --------------------------- ##
@@ -129,8 +130,8 @@ if %?TOPDIR_P%
 
 ## This variable is used in 'clean.am'.  See the comments to the
 ## 'distclean' and 'maintainer-clean' targets there to understand
-## why we cannot simply append this to $(am__distclean_files) or
-## $(am__maintclean_files).
+## why we cannot simply append this to $(am.clean.dist.f) or
+## $(am.clean.maint.f).
 am__config_distclean_files = \
   config.status \
   config.cache \
@@ -143,6 +144,6 @@ am__config_distclean_files = \
 ## If you have an autom4te.cache that cause distcheck to fail, then
 ## it is good news: you finally discovered that autoconf and/or
 ## autoheader is needed to use your tarball, which is wrong.
-am__maintclean_dirs += $(top_srcdir)/autom4te.cache
+am.clean.maint.d += $(top_srcdir)/autom4te.cache
 
 endif %?TOPDIR_P%
diff --git a/lib/am/dejagnu.am b/lib/am/dejagnu.am
index cb5e8a3..42ba485 100644
--- a/lib/am/dejagnu.am
+++ b/lib/am/dejagnu.am
@@ -86,6 +86,6 @@ site.exp: Makefile $(EXTRA_DEJAGNU_SITE_CONFIG)
 ## FIXME: we clean these on "make distclean" only for better compatibility
 ## FIXME: with mainline Automake, but wouldn't be more correct to clean
 ## FIXME: them on "make clean" instead?
-am__distclean_files += site.exp site.bak
-am__distclean_files += $(addsuffix .sum,$(DEJATOOL))
-am__distclean_files += $(addsuffix .log,$(DEJATOOL))
+am.clean.dist.f += site.exp site.bak
+am.clean.dist.f += $(addsuffix .sum,$(DEJATOOL))
+am.clean.dist.f += $(addsuffix .log,$(DEJATOOL))
diff --git a/lib/am/depend2.am b/lib/am/depend2.am
index 2601434..da3e4b5 100644
--- a/lib/am/depend2.am
+++ b/lib/am/depend2.am
@@ -37,7 +37,7 @@ am__depdir = $(dir $@)/$(DEPDIR)
 ## FIXME: more precise in the removal of the suffix?
 am__depbase = $(am__depdir)/$(basename $(notdir $@))
 ## Avoid useless forks when possible.
-am__ensure_depdir = $(call am__ensure_dir_exists,$(am__depdir))
+am__ensure_depdir = $(call am.cmd.ensure-dir-exists,$(am__depdir))
 am__o_src = $(if $(filter .obj,$(suffix $@)),`$(CYGPATH_W) $<`,$<)
 ## To facilitate use of "libtool --dry-run".
 am__mv = mv -f
@@ -54,7 +54,7 @@ if %FASTDEP%
        %SILENT%$(am__mv) $(am__depbase).Tpo $(am__depbase).Po
 else !%FASTDEP%
 if !%AMDEP%
-       %SILENT%$(am__ensure_target_dir_exists)
+       %SILENT%$(am.cmd.ensure-target-dir-exists)
 else %AMDEP%
        %SILENT%$(am__ensure_depdir)
        %VERBOSE%object=$@ libtool=no @AMDEPBACKSLASH@
@@ -76,7 +76,7 @@ if %FASTDEP%
        %SILENT%$(am__mv) $(am__depbase).Tpo $(am__depbase).Plo
 else !%FASTDEP%
 if !%AMDEP%
-       %SILENT%$(am__ensure_target_dir_exists)
+       %SILENT%$(am.cmd.ensure-target-dir-exists)
 else %AMDEP%
        %SILENT%$(am__ensure_depdir)
        %VERBOSE%object=$@ libtool=yes @AMDEPBACKSLASH@
diff --git a/lib/am/header-vars.am b/lib/am/header-vars.mk
similarity index 92%
rename from lib/am/header-vars.am
rename to lib/am/header-vars.mk
index e86f5b3..1cfed95 100644
--- a/lib/am/header-vars.am
+++ b/lib/am/header-vars.mk
@@ -119,8 +119,6 @@ unexport CDPATH
 # FIXME: maybe normalize/sanitize $(V)?
 V ?= 0
 
-am__mkdir = test -d $1 || $(MKDIR_P) $1
-
 # In a recipe, ensure the given directory exists, creating it if
 # necessary; but tries to do so avoiding useless forks, stats, and
 # extra recipe text (the latter is useful when doing "make V=1").
@@ -129,12 +127,12 @@ am__mkdir = test -d $1 || $(MKDIR_P) $1
 # try to optimize for those cases -- especially because, for our
 # usage patterns, one of them should always be true in non-VPATH
 # builds.
-am__ensure_dir_exists = \
-  $(if $(filter .,$1),:,$(if $(wildcard $1/),:,$(call am__mkdir,$1)))
+am.cmd.ensure-dir-exists = \
+  $(if $(filter .,$1),:,$(if $(wildcard $1/),:,$(MKDIR_P) $1))
 
 # Ensure the directory containing the target of the current recipe
 # exists, by creating it if necessary.
-am__ensure_target_dir_exists = $(call am__ensure_dir_exists,$(@D))
+am.cmd.ensure-target-dir-exists = $(call am.cmd.ensure-dir-exists,$(@D))
 
 # The 'all' target must be the default one, independently from the
 # position it is declared in the output Makefile.
@@ -280,7 +278,7 @@ am.util.strip-suffixes = $(strip \
 # counting.  Yay for us :-)
 am.max-cmdline-args := xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
 
-# FIXME! The above accounts for max forty aguments; this is basically
+# FIXME! The above accounts for max forty arguments; this is basically
 # arbitrary.  In the long term, defining that after a configure-time test
 # on the command-line length limits, or at least on a system-by-system
 # basis, might be better.  But don't make the new limit too big (even if
@@ -311,11 +309,28 @@ $(if $2,$(strip \
   )$(if $($0.counter),$(call $1,$(strip $($0.partial-args)))))
 endef
 
-am.rm-f = $(if $(strip $1),rm -f $(strip $1)$(am.chars.newline))
-am.rm-rf = $(if $(strip $1),rm -rf $(strip $1)$(am.chars.newline))
+# Used only by the 'am.clean-cmd.*' functions below.  Do not use in
+# other places.
+am.hack.rm-f = $(if $(strip $1),rm -f $(strip $1)$(am.chars.newline))
+am.hack.rm-rf = $(if $(strip $1),rm -rf $(strip $1)$(am.chars.newline))
 
-am.clean-cmd.f = $(call am.xargs-map,am.rm-f,$1)
-am.clean-cmd.d = $(call am.xargs-map,am.rm-rf,$1)
+# Needed to ensure the invocations of "rm -f" and "rm -rf" in our cleaning
+# rules are not given too many arguments, which might cause command line
+# length limits to be exceeded.  These are only meant to be used in a
+# "sub-recipe" by their own; e.g.,
+#
+#    # This is ok.
+#    clean-x:
+#        @echo "Cleaning X Files"
+#        @$(call am.clean-cmd.f,$(X_FILES))
+#
+#    # This is *wrong*.
+#    clean-x:
+#        @echo "Cleaning X Files" \
+#          && $(call am.clean-cmd.f,$(X_FILES))
+#
+am.clean-cmd.f = $(call am.xargs-map,am.hack.rm-f,$1)
+am.clean-cmd.d = $(call am.xargs-map,am.hack.rm-rf,$1)
 
 # Some derived variables that have been found to be useful.
 # These have since long been documented in the Automake manual and used
diff --git a/lib/am/java.am b/lib/am/java.am
index 7849344..0531bcf 100644
--- a/lib/am/java.am
+++ b/lib/am/java.am
@@ -80,9 +80,9 @@ endif %?INSTALL%
 
 ## Do not repeat the *.class wildcard over and over.
 if %?FIRST%
-am__clean_files += *.class
+am.clean.normal.f += *.class
 endif
-am__clean_files += class%NDIR%.stamp
+am.clean.normal.f += class%NDIR%.stamp
 
 
 ## -------------- ##
diff --git a/lib/am/lex.am b/lib/am/lex.am
index 5d039f5..7d414f5 100644
--- a/lib/am/lex.am
+++ b/lib/am/lex.am
@@ -23,7 +23,7 @@ endif %?MAINTAINER-MODE%
 
 ?GENERIC?%%DERIVED-EXT%: %%EXT%
 ?!GENERIC?%OBJ%: %SOURCE%
-       %SILENT%$(am__ensure_target_dir_exists)
+       %SILENT%$(am.cmd.ensure-target-dir-exists)
 ?GENERIC?      %VERBOSE%$(am.lex.maybe-skip) \
 ?!GENERIC??DIST_SOURCE?        %VERBOSE%$(am.lex.maybe-skip) \
        $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c %OBJ% -- %COMPILE%
diff --git a/lib/am/library.am b/lib/am/library.am
index 0d5ac9e..76adec2 100644
--- a/lib/am/library.am
+++ b/lib/am/library.am
@@ -16,6 +16,6 @@
 %LIBRARY%: $(%XLIBRARY%_OBJECTS) $(%XLIBRARY%_DEPENDENCIES) \
            $(EXTRA_%XLIBRARY%_DEPENDENCIES)
        %SILENT%rm -f $@
-       %SILENT%$(am__ensure_target_dir_exists)
+       %SILENT%$(am.cmd.ensure-target-dir-exists)
        %VERBOSE%$(%XLIBRARY%_AR) $@ $(%XLIBRARY%_OBJECTS) $(%XLIBRARY%_LIBADD)
        %SILENT%$(RANLIB) $@
diff --git a/lib/am/libs.am b/lib/am/libs.am
index 0e39fe9..10200ef 100644
--- a/lib/am/libs.am
+++ b/lib/am/libs.am
@@ -101,4 +101,4 @@ endif %?INSTALL%
 ## Cleaning.  ##
 ## ---------- ##
 
-am__clean_files += $(%DIR%_LIBRARIES)
+am.clean.normal.f += $(%DIR%_LIBRARIES)
diff --git a/lib/am/lisp.am b/lib/am/lisp.am
index 84dd696..cf9b8cf 100644
--- a/lib/am/lisp.am
+++ b/lib/am/lisp.am
@@ -142,7 +142,7 @@ endif %?INSTALL%
 ## Cleaning.  ##
 ## ---------- ##
 
-am__clean_files += elc-stamp $(ELCFILES)
+am.clean.normal.f += elc-stamp $(ELCFILES)
 
 ## -------------- ##
 ## Distributing.  ##
diff --git a/lib/am/ltlib.am b/lib/am/ltlib.am
index 00928f3..794c4c2 100644
--- a/lib/am/ltlib.am
+++ b/lib/am/ltlib.am
@@ -107,8 +107,8 @@ endif %?INSTALL%
 ## Cleaning.  ##
 ## ---------- ##
 
-am__clean_files += $(%DIR%_LTLIBRARIES)
+am.clean.normal.f += $(%DIR%_LTLIBRARIES)
 ## 'so_locations' files are created by some linkers (IRIX, OSF) when
 ## building a shared object.  Libtool places these files in the
 ## directory where the shared object is created.
-am__clean_files += $(wildcard $(addsuffix so_locations,$(sort $(dir 
$(%DIR%_LTLIBRARIES)))))
+am.clean.normal.f += $(wildcard $(addsuffix so_locations,$(sort $(dir 
$(%DIR%_LTLIBRARIES)))))
diff --git a/lib/am/ltlibrary.am b/lib/am/ltlibrary.am
index 371e31c..3e62eb8 100644
--- a/lib/am/ltlibrary.am
+++ b/lib/am/ltlibrary.am
@@ -15,5 +15,5 @@
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 %LTLIBRARY%: $(%XLTLIBRARY%_OBJECTS) $(%XLTLIBRARY%_DEPENDENCIES) \
              $(EXTRA_%XLTLIBRARY%_DEPENDENCIES)
-       %SILENT%$(am__ensure_target_dir_exists)
+       %SILENT%$(am.cmd.ensure-target-dir-exists)
        %VERBOSE%$(%XLINK%) %RPATH% $(%XLTLIBRARY%_OBJECTS) 
$(%XLTLIBRARY%_LIBADD) $(LIBS)
diff --git a/lib/am/parallel-tests.am b/lib/am/parallel-tests.mk
similarity index 99%
rename from lib/am/parallel-tests.am
rename to lib/am/parallel-tests.mk
index 5297c67..20a70e5 100644
--- a/lib/am/parallel-tests.am
+++ b/lib/am/parallel-tests.mk
@@ -287,7 +287,7 @@ am.test-suite.test-results = \
 am.test-suite.test-logs = \
   $(call am.memoize,am.test-suite.test-logs,$(addsuffix .log,$(strip 
$(am.test-suite.test-bases))))
 
-am__mostlyclean_files += $(am.test-suite.test-results) 
$(am.test-suite.test-logs)
+am.clean.mostly.f += $(am.test-suite.test-results) $(am.test-suite.test-logs)
 
 # $(TEST_LOGS) is a published interface.
 TEST_LOGS = $(am.test-suite.test-logs)
@@ -415,7 +415,7 @@ $(TEST_SUITE_LOG): $(am.test-suite.test-logs) 
$(am.test-suite.test-results)
        fi;                                                             \
        $$success || exit 1
 
-am__mostlyclean_files += $(TEST_SUITE_LOG)
+am.clean.mostly.f += $(TEST_SUITE_LOG)
 
 ## ------------------------------------------ ##
 ## Running all tests, or rechecking failures. ##
diff --git a/lib/am/program.am b/lib/am/program.am
index b444bd9..a7a79e6 100644
--- a/lib/am/program.am
+++ b/lib/am/program.am
@@ -21,5 +21,5 @@
 ## Or maybe not... sadly, incremental linkers are rarer than losing
 ## systems.
        %SILENT%rm -f $@
-       %SILENT%$(am__ensure_target_dir_exists)
+       %SILENT%$(am.cmd.ensure-target-dir-exists)
        %VERBOSE%$(%XLINK%) $(%XPROGRAM%_OBJECTS) $(%XPROGRAM%_LDADD) $(LIBS)
diff --git a/lib/am/progs.am b/lib/am/progs.am
index 66ecc3d..6dac5a8 100644
--- a/lib/am/progs.am
+++ b/lib/am/progs.am
@@ -103,7 +103,7 @@ endif %?INSTALL%
 ## Cleaning.  ##
 ## ---------- ##
 
-am__clean_files += $(%DIR%_PROGRAMS)
+am.clean.normal.f += $(%DIR%_PROGRAMS)
 ## Under Cygwin, we build 'program$(EXEEXT)'.  However, if this
 ## program uses a Libtool library, Libtool will move it in
 ## '_libs/program$(EXEEXT)' and create a 'program' wrapper (without
@@ -112,7 +112,7 @@ am__clean_files += $(%DIR%_PROGRAMS)
 ## Cleaning the '_libs/' or '.libs/' directory is done from clean-libtool.
 ## FIXME: In the future (i.e., when it works) it would be nice to delegate
 ## this task to "libtool --mode=clean".
-?LIBTOOL?am__clean_files += $(if $(EXEEXT),$(patsubst 
%$(EXEEXT),%,$(%DIR%_PROGRAMS)))
+?LIBTOOL?am.clean.normal.f += $(if $(EXEEXT),$(patsubst 
%$(EXEEXT),%,$(%DIR%_PROGRAMS)))
 
 ## ---------- ##
 ## Checking.  ##
diff --git a/lib/am/serial-tests.am b/lib/am/serial-tests.mk
similarity index 100%
rename from lib/am/serial-tests.am
rename to lib/am/serial-tests.mk
diff --git a/lib/am/tags.am b/lib/am/tags.am
index 1db4139..c2887d8 100644
--- a/lib/am/tags.am
+++ b/lib/am/tags.am
@@ -173,7 +173,7 @@ cscopelist-am: $(am__tagged_files)
 ## Cleaning.  ##
 ## ---------- ##
 
-am__distclean_files += TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+am.clean.dist.f += TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 if %?TOPDIR_P%
-am__distclean_files += cscope.out cscope.in.out cscope.po.out cscope.files
+am.clean.dist.f += cscope.out cscope.in.out cscope.po.out cscope.files
 endif %?TOPDIR_P%
diff --git a/lib/am/texi-vers.am b/lib/am/texi-vers.am
index 1053dcd..2d5789e 100644
--- a/lib/am/texi-vers.am
+++ b/lib/am/texi-vers.am
@@ -27,7 +27,7 @@ am.dist.common-files += %VTEXI% %STAMPVTI%
 ## (Not configure.ac, because not all setups define the version number
 ## in this file.)
 %STAMPVTI%: %TEXI% $(top_srcdir)/configure
-       @$(am__ensure_target_dir_exists)
+       @$(am.cmd.ensure-target-dir-exists)
        @(set `$(SHELL) $(am.conf.aux-dir)/mdate-sh $<`; \
        echo "@set UPDATED $$1 $$2 $$3"; \
        echo "@set UPDATED-MONTH $$2 $$3"; \
@@ -40,5 +40,5 @@ am.dist.common-files += %VTEXI% %STAMPVTI%
        fi;
        @cp %VTEXI% $@
 
-am__mostlyclean_files += %VTI%.tmp
-%MAINTAINER-MODE%am__maintclean_files += %STAMPVTI% %VTEXI%
+am.clean.mostly.f += %VTI%.tmp
+%MAINTAINER-MODE%am.clean.maint.f += %STAMPVTI% %VTEXI%
diff --git a/lib/am/texibuild.am b/lib/am/texibuild.mk
similarity index 94%
rename from lib/am/texibuild.am
rename to lib/am/texibuild.mk
index 144154a..cbd9005 100644
--- a/lib/am/texibuild.am
+++ b/lib/am/texibuild.mk
@@ -21,7 +21,7 @@ MAKEINFOHTML = $(MAKEINFO) --html
 AM_MAKEINFOHTMLFLAGS ?= $(AM_MAKEINFOFLAGS)
 
 define am__texibuild_dvi_or_pdf
-       $1$(am__ensure_target_dir_exists) && \
+       $1$(am.cmd.ensure-target-dir-exists) && \
        TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
 ## Must set MAKEINFO like this so that version.texi will be found even
 ## if it is in srcdir.
@@ -29,8 +29,8 @@ define am__texibuild_dvi_or_pdf
                              -I $(@D) -I $(srcdir)/$(@D)' \
 
 ## texi2dvi and  texi2pdf don't silence everything with -q, redirect
-## to /dev/null instead.  We still want -q (%TEXIQUIET%) because it
-## turns on batch mode.
+## to /dev/null instead.  We still want -q ($(AM_V_TEXI_QUIETOPTS))
+## because it turns on batch mode.
 ## Use '--build-dir' so that TeX and Texinfo auxiliary files and build
 ## by-products are left in there, instead of cluttering the current
 ## directory (see automake bug#11146).  Use a different build-dir for
@@ -43,7 +43,7 @@ define am__texibuild_dvi_or_pdf
 endef
 
 define am__texibuild_info
-       $(if $1,,@$(am__ensure_target_dir_exists))
+       $(if $1,,@$(am.cmd.ensure-target-dir-exists))
 ## Back up the info files before running makeinfo. This is the cheapest
 ## way to ensure that
 ## 1) If the texinfo file shrinks (or if you start using --no-split),
@@ -78,7 +78,7 @@ define am__texibuild_info
 endef
 
 define am__texibuild_html
-       $(AM_V_MAKEINFO)$(am__ensure_target_dir_exists) \
+       $(AM_V_MAKEINFO)$(am.cmd.ensure-target-dir-exists) \
 ## When --split (the default) is used, makeinfo will output a
 ## directory.  However it will not update the time stamp of a
 ## previously existing directory, and when the names of the nodes
diff --git a/lib/am/texinfos.am b/lib/am/texinfos.am
index b7efd82..1fbd505 100644
--- a/lib/am/texinfos.am
+++ b/lib/am/texinfos.am
@@ -302,10 +302,10 @@ if %?LOCAL-TEXIS%
 ## Append to dirs, not files, because the %*CLEAN% substitutions can
 ## also contain any directory created by "makeinfo --html", as well as
 ## the '*.t2d' and '*.t2p' directories used by texi2dvi and texi2pdf.
-am__mostlyclean_dirs += %MOSTLYCLEAN%
-am__clean_dirs += %TEXICLEAN%
-am__maintclean_dirs += %MAINTCLEAN%
+am.clean.mostly.d += %MOSTLYCLEAN%
+am.clean.normal.d += %TEXICLEAN%
+am.clean.maint.d += %MAINTCLEAN%
 
-am__maintclean_files += $(foreach f,$(INFO_DEPS),$f $f-[0-9] $f-[0-9][0-9])
+am.clean.maint.f += $(foreach f,$(INFO_DEPS),$f $f-[0-9] $f-[0-9][0-9])
 
 endif %?LOCAL-TEXIS%
diff --git a/lib/am/yacc.am b/lib/am/yacc.am
index b621687..5cff9ba 100644
--- a/lib/am/yacc.am
+++ b/lib/am/yacc.am
@@ -41,7 +41,7 @@ endif %?FIRST%
 
 ?GENERIC?%%DERIVED-EXT%: %%EXT%
 ?!GENERIC?%OBJ%: %SOURCE%
-       %SILENT%$(am__ensure_target_dir_exists)
+       %SILENT%$(am.cmd.ensure-target-dir-exists)
        %VERBOSE% \
 ?GENERIC?      $(am.yacc.maybe-skip) \
 ?!GENERIC??DIST_SOURCE?        $(am.yacc.maybe-skip) \
diff --git a/syntax-checks.mk b/syntax-checks.mk
index fc1a868..7662d6f 100644
--- a/syntax-checks.mk
+++ b/syntax-checks.mk
@@ -351,45 +351,6 @@ $(sc_renamed_variables_rules): sc_no_% :
          exit 1; \
        fi
 
-# Variables whose name is prone to typos.
-
-define typos-for-clean
-
-fixtypo.am__mostlyclean$1 = am__mostlyclean_$1
-fixtypo.am__clean$1 = am__clean_$1
-fixtypo.am__distclean$1 = am__distclean_$1
-fixtypo.am__maintclean$1 = am__maintclean_$1
-
-fixtypo.am__mostly_clean_$1 = am__mostlyclean_$1
-fixtypo.am__dist_clean_$1 = am__distclean_$1
-
-fixtypo.am__maint_clean_$1 = am__maintclean_$1
-fixtypo.am__maintainerclean_$1 = am__maintclean_$1
-fixtypo.am__maintainer_clean_$1 = am__maintclean_$1
-
-endef
-
-$(eval $(call typos-for-clean,files))
-$(eval $(call typos-for-clean,dirs))
-
-sc_variables_typos_rules = \
-  $(patsubst fixtypo.%,sc_no_%,$(filter fixtypo.%,$(.VARIABLES)))
-
-$(sc_variable_typos_rules) : sc_no_% :
-       @files="\
-         $(xtests) \
-         $(pms) \
-         $(ams) \
-         $(srcdir)/automake.in \
-         $(srcdir)/doc/*.texi \
-       "; \
-       if grep -E '\b$*\b' $$files; then \
-         echo "'\$$($*)' is probably a typo." >&2; \
-         echo "You should use '$(fixtypo.$*)' instead." >&2; \
-         exit 1; \
-       fi
-
-
 sc_no_RECHECK_LOGS:
        @files="\
          $(xtests) \
diff --git a/t/am-xargs-map.sh b/t/am-xargs-map.sh
index 3d5db39..e2bbdd0 100755
--- a/t/am-xargs-map.sh
+++ b/t/am-xargs-map.sh
@@ -21,7 +21,7 @@ am_create_testdir=empty
 . ./defs || exit 1
 
 # Filter out Automake comments.
-grep -v '^##' "$am_amdir"/header-vars.am > defn.mk \
+grep -v '^##' "$am_amdir"/header-vars.mk > defn.mk \
   || fatal_ "fetching makefile fragment headers-vars.am"
 
 sed 's/^[0-9][0-9]*:://' > Makefile << 'END'
diff --git a/t/ax/am-test-lib.sh b/t/ax/am-test-lib.sh
index 43585dc..a775db1 100644
--- a/t/ax/am-test-lib.sh
+++ b/t/ax/am-test-lib.sh
@@ -517,12 +517,6 @@ require_tool ()
       fi
       unset priv_check_temp overwrite_status
       ;;
-    # Extra quoting required to avoid maintainer-check spurious failures.
-    'perl-threads')
-      if test "$WANT_NO_THREADS" = "yes"; then
-        skip_all_ "Devel::Cover cannot cope with threads"
-      fi
-      ;;
     native)
       # Don't use "&&" here, to avoid a bug of 'set -e' present in
       # some (even relatively recent) versions of the BSD shell.
diff --git a/t/ensure-dir-exists.sh b/t/ensure-dir-exists.sh
index 5911c0b..9d35470 100755
--- a/t/ensure-dir-exists.sh
+++ b/t/ensure-dir-exists.sh
@@ -14,13 +14,13 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Test Automake-provided internal macro 'am__ensure_dir_exists'.
+# Test Automake-provided internal macro 'am.cmd.ensure-dir-exists'.
 
 am_create_testdir=empty
 . ./defs || exit 1
 
 # Filter out Automake comments.
-grep -v '^##' "$am_amdir"/header-vars.am > defn.mk \
+grep -v '^##' "$am_amdir"/header-vars.mk > defn.mk \
   || fatal_ "fetching makefile fragment headers-vars.am"
 
 cat > Makefile << 'END'
@@ -32,13 +32,13 @@ all: $(files)
 .PHONY: all
 
 sanity-check:
-       $(warning $(call am__ensure_dir_exists,x))
-       $(if $(filter $(call am__ensure_dir_exists,x),:MKDIR_P:),, \
-             $(error am__ensure_dir_exists does not contain $$(MKDIR_P)))
+       $(warning $(call am.cmd.ensure-dir-exists,x))
+       $(if $(filter $(call am.cmd.ensure-dir-exists,x),:MKDIR_P:),, \
+             $(error am.cmd.ensure-dir-exists does not contain $$(MKDIR_P)))
 .PHONY: sanity-check
 
 $(files):
-       $(call am__ensure_dir_exists,x)
+       $(call am.cmd.ensure-dir-exists,x)
        echo dummy > $@
 END
 
diff --git a/t/internals.tap b/t/internals.tap
index 91449a0..31b939c 100755
--- a/t/internals.tap
+++ b/t/internals.tap
@@ -22,7 +22,7 @@ am_create_testdir=empty
 plan_ 12
 
 # Filter out Automake comments.
-grep -v '^##' "$am_amdir"/header-vars.am > defn.mk \
+grep -v '^##' "$am_amdir"/header-vars.mk > defn.mk \
   || fatal_ "fetching makefile fragment headers-vars.am"
 
 # WARNING: there are a lot of embedded tabs in the makefile
diff --git a/t/memoize.tap b/t/memoize.tap
index d829918..36f98a2 100755
--- a/t/memoize.tap
+++ b/t/memoize.tap
@@ -24,7 +24,7 @@ plan_ 17
 ocwd=$(pwd) || fatal_ "couldn't get current working directory"
 
 # Filter out Automake comments.
-grep -v '^##' "$am_amdir"/header-vars.am > defn.mk \
+grep -v '^##' "$am_amdir"/header-vars.mk > defn.mk \
   || fatal_ "fetching makefile fragment headers-vars.am"
 
 T ()
diff --git a/t/parallel-am.sh b/t/parallel-am.sh
deleted file mode 100755
index bd50af9..0000000
--- a/t/parallel-am.sh
+++ /dev/null
@@ -1,103 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Test parallel automake execution.
-
-# There are several hypotheses to be tested:  Independently of the number
-# of threads used by automake,
-# 0) the generated Makefile.in files must be identical without --add-missing,
-# 1) the Makefile.in that distributes auxiliary files must be generated
-#    after all other ones, so all installed aux files are caught,
-# 2) normal automake output should have identical content and be ordered
-#    in the same way, when --add-missing is not passed, or when
-#    --add-missing is passed but there are no concurrent file requirements
-#    (i.e., two Makefile.am files call for the same needed aux file)
-# 3) normal automake output should be identical and ordered in the same way
-#    with --add-missing, even with concurrent file requirements, and the
-#    installation of aux files should be race-free,
-# 4) warning and normal error output should be identical, in that duplicate
-#    warnings should be omitted in the same way as without threads,
-# 5) fatal error and debug messages could be identical.  This is not
-#    intended, though.
-#
-# This test checks (0), (1), and (2).  See sister tests for further coverage.
-
-required=perl-threads
-. ./defs || exit 1
-
-cat > configure.ac << 'END'
-AC_INIT([parallel-am], [1.0])
-AC_CONFIG_AUX_DIR([build-aux])
-AM_INIT_AUTOMAKE
-AC_PROG_CC
-AM_PATH_LISPDIR
-AM_PATH_PYTHON
-AC_CONFIG_FILES([Makefile])
-END
-
-cat > Makefile.am << 'END'
-SUBDIRS =
-END
-
-list='1 2 3 4 5 6 7 8 9'
-for i in $list; do
-  echo "AC_CONFIG_FILES([sub$i/Makefile])" >> configure.ac
-  echo "SUBDIRS += sub$i" >> Makefile.am
-  mkdir sub$i
-  echo > sub$i/Makefile.am
-done
-# Use an include chain to cause a nontrivial location object to be
-# serialized through a thread queue.
-echo 'include foo.am' >> sub7/Makefile.am
-echo 'include bar.am' > sub7/foo.am
-echo 'python_PYTHON = foo.py' > sub7/bar.am
-echo 'lisp_LISP = foo.el' >> sub8/Makefile.am
-echo 'bin_PROGRAMS = p' >> sub9/Makefile.am
-
-rm -f install-sh missing depcomp
-mkdir build-aux
-
-$ACLOCAL
-
-# This test may have to be run several times in order to expose the
-# race that, when the last Makefile.in (the toplevel one) is created
-# before the other ones have finished, not all auxiliary files may
-# be installed yet, thus some may not be distributed.
-#
-# Further, automake output should be stable.
-
-# Generate expected output using the non-threaded code.
-unset AUTOMAKE_JOBS || :
-AUTOMAKE_run --add-missing
-mv stderr expected
-Makefile_ins=$(find . -name Makefile.in)
-for file in $Makefile_ins; do
-  mv $file $file.exp
-done
-
-AUTOMAKE_JOBS=5
-export AUTOMAKE_JOBS
-
-for run in 1 2 3 4 5 6 7; do
-  rm -f build-aux/* sub*/Makefile.in
-  AUTOMAKE_run --add-missing
-  diff stderr expected
-  for file in $Makefile_ins; do
-    diff $file $file.exp
-  done
-done
-
-:
diff --git a/t/parallel-am2.sh b/t/parallel-am2.sh
deleted file mode 100755
index 4fc2eed..0000000
--- a/t/parallel-am2.sh
+++ /dev/null
@@ -1,75 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Test parallel automake execution.
-
-# This tests:
-# 4) warning and normal error output should be identical, in that duplicate
-#    warnings should be omitted in the same way as without threads.
-
-required=perl-threads
-. ./defs || exit 1
-
-mkdir sub
-
-cat > Makefile.am << 'END'
-bin_PROGRAMS = main
-main_SOURCES = sub/main.c
-SUBDIRS =
-END
-
-list='1 2 3'
-for i in $list; do
-  echo "AC_CONFIG_FILES([sub$i/Makefile])" >> configure.ac
-  echo "SUBDIRS += sub$i" >> Makefile.am
-  mkdir sub$i sub$i/sub
-  unindent > sub$i/Makefile.am << END
-    bin_PROGRAMS = sub$i
-    sub${i}_SOURCES = sub/main$i.c
-END
-done
-
-mkdir build-aux
-
-$ACLOCAL
-
-# Independently of the number of worker threads, automake output
-# should be
-# - stable (multiple runs should produce the same output),
-# - properly uniquified,
-# - complete (output from worker threads should not be lost).
-#
-# The parts output by --add-missing are unstable not only wrt. order
-# but also wrt. content: any of the Makefile.am files may cause the
-# depcomp script to be installed (or several of them).
-# Thus we install the auxiliary files in a prior step.
-
-# Generate expected output using non-threaded code.
-unset AUTOMAKE_JOBS || :
-rm -f install-sh missing depcomp
-AUTOMAKE_fails --add-missing
-mv stderr expected
-
-AUTOMAKE_JOBS=5
-export AUTOMAKE_JOBS
-
-for i in 1 2 3 4 5 6 7 8; do
-  rm -f install-sh missing depcomp
-  AUTOMAKE_fails --add-missing
-  diff expected stderr
-done
-
-:
diff --git a/t/parallel-am3.sh b/t/parallel-am3.sh
deleted file mode 100755
index 1bc12bb..0000000
--- a/t/parallel-am3.sh
+++ /dev/null
@@ -1,74 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Test parallel automake execution.
-
-# This tests:
-# 3) normal automake output should be identical and ordered in the same way
-#    with --add-missing, even with concurrent file requirements, and the
-#    installation of aux files should be race-free.
-
-required=perl-threads
-. ./defs || exit 1
-
-cat > configure.ac << 'END'
-AC_INIT([parallel-am], [1.0])
-AC_CONFIG_AUX_DIR([build-aux])
-AM_INIT_AUTOMAKE
-AC_PROG_CC
-AM_PATH_LISPDIR
-AM_PATH_PYTHON
-AC_CONFIG_FILES([Makefile])
-END
-
-cat > Makefile.am << 'END'
-SUBDIRS =
-END
-
-list='1 2 3'
-for i in $list; do
-  echo "AC_CONFIG_FILES([sub$i/Makefile])" >> configure.ac
-  echo "SUBDIRS += sub$i" >> Makefile.am
-  mkdir sub$i
-  unindent > sub$i/Makefile.am <<END
-    python_PYTHON = foo$i.py
-    lisp_LISP = foo$i.el
-    bin_PROGRAMS = p$i
-END
-done
-
-rm -f install-sh missing depcomp
-mkdir build-aux
-
-$ACLOCAL
-
-# Generate expected output using the non-threaded code.
-unset AUTOMAKE_JOBS || :
-AUTOMAKE_run --add-missing
-mv stderr expected
-mv Makefile.in Makefile.in.exp
-
-AUTOMAKE_JOBS=3
-export AUTOMAKE_JOBS
-
-for run in 1 2 3 4 5 6 7; do
-  rm -f build-aux/* sub*/Makefile.in
-  AUTOMAKE_run --add-missing
-  diff stderr expected
-  diff Makefile.in Makefile.in.exp
-done
-
-:
diff --git a/t/pm/Condition-t.pl b/t/pm/Condition-t.pl
deleted file mode 100644
index d29407a..0000000
--- a/t/pm/Condition-t.pl
+++ /dev/null
@@ -1,327 +0,0 @@
-# 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/>.
-
-BEGIN {
-  use Config;
-  if (eval { require 5.007_002; }      # for CLONE support
-      && $Config{useithreads}
-      && !$ENV{WANT_NO_THREADS})
-    {
-      require threads;
-      import threads;
-    }
-  else
-    {
-      exit 77;
-    }
-}
-use Automake::Condition qw/TRUE FALSE/;
-
-sub test_basics ()
-{
-  my @tests = (# [[Conditions], is_true?, is_false?, string, subst-string, 
human]
-              [[], 1, 0, 'TRUE', '', 'TRUE'],
-              [['TRUE'], 1, 0, 'TRUE', '', 'TRUE'],
-              [['FALSE'], 0, 1, 'FALSE', '#', 'FALSE'],
-              [['A_TRUE'], 0, 0, 'A_TRUE', '@A_TRUE@', 'A'],
-              [['A_TRUE', 'B_FALSE'],
-               0, 0, 'A_TRUE B_FALSE', '@A_TRUE@@B_FALSE@', 'A and !B'],
-              [['B_TRUE', 'FALSE'], 0, 1, 'FALSE', '#', 'FALSE'],
-              [['B_TRUE', 'B_FALSE'], 0, 1, 'FALSE', '#', 'FALSE']);
-
-  for (@tests)
-    {
-      my $a = new Automake::Condition @{$_->[0]};
-      return 1
-        if threads->new(sub {
-         return 1 if $_->[1] != $a->true;
-         return 1 if $_->[1] != ($a == TRUE);
-         return 1 if $_->[2] != $a->false;
-         return 1 if $_->[2] != ($a == FALSE);
-         return 1 if $_->[3] ne $a->string;
-         return 1 if $_->[4] ne $a->subst_string;
-         return 1 if $_->[5] ne $a->human;
-       })->join;
-    }
-  return 0;
-}
-
-sub test_true_when ()
-{
-  my $failed = 0;
-
-  my @tests = (# [When,
-              #  [Implied-Conditions],
-              #  [Not-Implied-Conditions]]
-              [['TRUE'],
-               [['TRUE']],
-               [['A_TRUE'], ['A_TRUE', 'B_FALSE'], ['FALSE']]],
-              [['A_TRUE'],
-               [['TRUE'], ['A_TRUE']],
-               [['A_TRUE', 'B_FALSE'], ['FALSE']]],
-              [['A_TRUE', 'B_FALSE'],
-               [['TRUE'], ['A_TRUE'], ['B_FALSE'], ['A_TRUE', 'B_FALSE']],
-               [['FALSE'], ['C_FALSE'], ['C_FALSE', 'A_TRUE']]]);
-
-  for my $t (@tests)
-    {
-      my $a = new Automake::Condition @{$t->[0]};
-      return 1
-        if threads->new(sub {
-         for my $u (@{$t->[1]})
-           {
-             my $b = new Automake::Condition @$u;
-             return threads->new(sub {
-               if (! $b->true_when ($a))
-                 {
-                   print "`" . $b->string .
-                     "' not implied by `" . $a->string . "'?\n";
-                   $failed = 1;
-                 }
-             })->join;
-           }
-         for my $u (@{$t->[2]})
-           {
-             my $b = new Automake::Condition @$u;
-             return threads->new(sub {
-               if ($b->true_when ($a))
-                 {
-                   print "`" . $b->string .
-                     "' implied by `" . $a->string . "'?\n";
-                   $failed = 1;
-                 }
-
-               return threads->new(sub {
-                 return 1 if $b->true_when ($a);
-               })->join;
-             })->join;
-           }
-        })->join;
-    }
-  return $failed;
-}
-
-sub test_reduce_and ()
-{
-  my @tests = (# If no conditions are given, TRUE should be returned
-              [[], ["TRUE"]],
-              # An empty condition is TRUE
-              [[""], ["TRUE"]],
-              # A single condition should be passed through unchanged
-              [["FOO"], ["FOO"]],
-              [["FALSE"], ["FALSE"]],
-              [["TRUE"], ["TRUE"]],
-              # TRUE and false should be discarded and overwhelm
-              # the result, respectively
-              [["FOO", "TRUE"], ["FOO"]],
-              [["FOO", "FALSE"], ["FALSE"]],
-              # Repetitions should be removed
-              [["FOO", "FOO"], ["FOO"]],
-              [["TRUE", "FOO", "FOO"], ["FOO"]],
-              [["FOO", "TRUE", "FOO"], ["FOO"]],
-              [["FOO", "FOO", "TRUE"], ["FOO"]],
-              # Two different conditions should be preserved,
-              # but TRUEs should be removed
-              [["FOO", "BAR"], ["BAR,FOO"]],
-              [["TRUE", "FOO", "BAR"], ["BAR,FOO"]],
-              [["FOO", "TRUE", "BAR"], ["BAR,FOO"]],
-              [["FOO", "BAR", "TRUE"], ["BAR,FOO"]],
-              # A condition implied by another condition should be removed.
-              [["FOO BAR", "BAR"], ["FOO BAR"]],
-              [["BAR", "FOO BAR"], ["FOO BAR"]],
-              [["TRUE", "FOO BAR", "BAR"], ["FOO BAR"]],
-              [["FOO BAR", "TRUE", "BAR"], ["FOO BAR"]],
-              [["FOO BAR", "BAR", "TRUE"], ["FOO BAR"]],
-
-              [["BAR FOO", "BAR"], ["BAR FOO"]],
-              [["BAR", "BAR FOO"], ["BAR FOO"]],
-              [["TRUE", "BAR FOO", "BAR"], ["BAR FOO"]],
-              [["BAR FOO", "TRUE", "BAR"], ["BAR FOO"]],
-              [["BAR FOO", "BAR", "TRUE"], ["BAR FOO"]],
-
-              # Check that reduction happens even when there are
-              # two conditions to remove.
-              [["FOO", "FOO BAR", "BAR"], ["FOO BAR"]],
-              [["FOO", "FOO BAR", "BAZ", "FOO BAZ"], ["FOO BAR", "FOO BAZ"]],
-              [["FOO", "FOO BAR", "BAZ", "FOO BAZ", "FOO BAZ BAR"],
-               ["FOO BAZ BAR"]],
-
-              # Duplicated conditionals should be removed.
-              [["FOO", "BAR", "BAR"], ["BAR,FOO"]],
-
-              # Equivalent conditions in different forms should be
-              # reduced: which one is left is unfortunately order
-              # dependent.
-              [["BAR FOO", "FOO BAR"], ["FOO BAR"]],
-              [["FOO BAR", "BAR FOO"], ["BAR FOO"]]);
-
-  my $failed = 0;
-  foreach (@tests)
-    {
-      my ($inref, $outref) = @$_;
-      my @inconds = map { new Automake::Condition $_ } @$inref;
-      return 1
-        if threads->new(sub {
-         my @outconds = map { (new Automake::Condition $_)->string } @$outref;
-         return threads->new(sub {
-           my @res =
-             map { $_->string } (Automake::Condition::reduce_and (@inconds));
-           return threads->new(sub {
-             my $result = join (",", sort @res);
-             my $exresult = join (",", @outconds);
-
-             if ($result ne $exresult)
-               {
-                 print '"' . join(",", @$inref) . '" => "' .
-                   $result . '" expected "' .
-                     $exresult . '"' . "\n";
-                 $failed = 1;
-               }
-             return $failed;
-           })->join;
-         })->join;
-       })->join;
-    }
-  return $failed;
-}
-
-sub test_reduce_or ()
-{
-  my @tests = (# If no conditions are given, FALSE should be returned
-              [[], ["FALSE"]],
-              # An empty condition is TRUE
-              [[""], ["TRUE"]],
-              # A single condition should be passed through unchanged
-              [["FOO"], ["FOO"]],
-              [["FALSE"], ["FALSE"]],
-              [["TRUE"], ["TRUE"]],
-              # FALSE and TRUE should be discarded and overwhelm
-              # the result, respectively
-              [["FOO", "TRUE"], ["TRUE"]],
-              [["FOO", "FALSE"], ["FOO"]],
-              # Repetitions should be removed
-              [["FOO", "FOO"], ["FOO"]],
-              [["FALSE", "FOO", "FOO"], ["FOO"]],
-              [["FOO", "FALSE", "FOO"], ["FOO"]],
-              [["FOO", "FOO", "FALSE"], ["FOO"]],
-              # Two different conditions should be preserved,
-              # but FALSEs should be removed
-              [["FOO", "BAR"], ["BAR,FOO"]],
-              [["FALSE", "FOO", "BAR"], ["BAR,FOO"]],
-              [["FOO", "FALSE", "BAR"], ["BAR,FOO"]],
-              [["FOO", "BAR", "FALSE"], ["BAR,FOO"]],
-              # A condition implying another condition should be removed.
-              [["FOO BAR", "BAR"], ["BAR"]],
-              [["BAR", "FOO BAR"], ["BAR"]],
-              [["FALSE", "FOO BAR", "BAR"], ["BAR"]],
-              [["FOO BAR", "FALSE", "BAR"], ["BAR"]],
-              [["FOO BAR", "BAR", "FALSE"], ["BAR"]],
-
-              [["BAR FOO", "BAR"], ["BAR"]],
-              [["BAR", "BAR FOO"], ["BAR"]],
-              [["FALSE", "BAR FOO", "BAR"], ["BAR"]],
-              [["BAR FOO", "FALSE", "BAR"], ["BAR"]],
-              [["BAR FOO", "BAR", "FALSE"], ["BAR"]],
-
-              # Check that reduction happens even when there are
-              # two conditions to remove.
-              [["FOO", "FOO BAR", "BAR"], ["BAR,FOO"]],
-              [["FOO", "FOO BAR", "BAZ", "FOO BAZ"], ["BAZ,FOO"]],
-              [["FOO", "FOO BAR", "BAZ", "FOO BAZ", "FOO BAZ BAR"],
-               ["BAZ,FOO"]],
-
-              # Duplicated conditionals should be removed.
-              [["FOO", "BAR", "BAR"], ["BAR,FOO"]],
-
-              # Equivalent conditions in different forms should be
-              # reduced: which one is left is unfortunately order
-              # dependent.
-              [["BAR FOO", "FOO BAR"], ["FOO BAR"]],
-              [["FOO BAR", "BAR FOO"], ["BAR FOO"]]);
-
-  my $failed = 0;
-  foreach (@tests)
-    {
-      my ($inref, $outref) = @$_;
-      my @inconds = map { new Automake::Condition $_ } @$inref;
-      return 1
-        if threads->new(sub {
-         my @outconds = map { (new Automake::Condition $_)->string } @$outref;
-         return threads->new(sub {
-           my @res =
-             map { $_->string } (Automake::Condition::reduce_or (@inconds));
-           return threads->new(sub {
-             my $result = join (",", sort @res);
-             my $exresult = join (",", @outconds);
-
-             if ($result ne $exresult)
-               {
-                 print '"' . join(",", @$inref) . '" => "' .
-                   $result . '" expected "' .
-                     $exresult . '"' . "\n";
-                 $failed = 1;
-               }
-             return $failed;
-           })->join;
-         })->join;
-       })->join;
-    }
-  return $failed;
-}
-
-sub test_merge ()
-{
-  my $cond = new Automake::Condition "COND1_TRUE", "COND2_FALSE";
-  return threads->new(sub {
-      my $other = new Automake::Condition "COND3_FALSE";
-      return threads->new(sub {
-       my $both = $cond->merge ($other);
-       return threads->new(sub {
-         my $both2 = $cond->merge_conds ("COND3_FALSE");
-         return threads->new(sub {
-           $cond = $both->strip ($other);
-           my @conds = $cond->conds;
-           return 1 if $both->string ne "COND1_TRUE COND2_FALSE COND3_FALSE";
-           return 1 if $cond->string ne "COND1_TRUE COND2_FALSE";
-           return 1 if $both != $both2;
-         })->join;
-       })->join;
-      })->join;
-    })->join;
-  return 0;
-}
-
-exit (test_basics
-      || test_true_when
-      || test_reduce_and
-      || test_reduce_or
-      || test_merge);
-
-### Setup "GNU" style for perl-mode and cperl-mode.
-## Local Variables:
-## perl-indent-level: 2
-## perl-continued-statement-offset: 2
-## perl-continued-brace-offset: 0
-## perl-brace-offset: 0
-## perl-brace-imaginary-offset: 0
-## perl-label-offset: -2
-## cperl-indent-level: 2
-## cperl-brace-offset: 0
-## cperl-continued-brace-offset: 0
-## cperl-label-offset: -2
-## cperl-extra-newline-before-brace: t
-## cperl-merge-trailing-else: nil
-## cperl-continued-statement-offset: 2
-## End:
diff --git a/t/pm/DisjConditions-t.pl b/t/pm/DisjConditions-t.pl
deleted file mode 100644
index b49ae2e..0000000
--- a/t/pm/DisjConditions-t.pl
+++ /dev/null
@@ -1,461 +0,0 @@
-# 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/>.
-
-BEGIN {
-  use Config;
-  if (eval { require 5.007_002; }      # for CLONE support
-      && $Config{useithreads}
-      && !$ENV{WANT_NO_THREADS})
-    {
-      require threads;
-      import threads;
-    }
-  else
-    {
-      exit 77;
-    }
-}
-use Automake::Condition qw/TRUE FALSE/;
-use Automake::DisjConditions;
-
-sub test_basics ()
-{
-  my $true = new Automake::DisjConditions TRUE;
-  my $false = new Automake::DisjConditions FALSE;
-  my $cond = new Automake::Condition "COND1_TRUE", "COND2_FALSE";
-  return threads->new (sub {
-    my $other = new Automake::Condition "COND3_FALSE";
-    my $another = new Automake::Condition "COND3_TRUE", "COND4_FALSE";
-    return threads->new (sub {
-      my $set1 = new Automake::DisjConditions $cond, $other;
-      return threads->new (sub {
-       my $set2 = new Automake::DisjConditions $other, $cond;
-       my $set3 = new Automake::DisjConditions FALSE, $another;
-       return 1 unless $set1 == $set2;
-       return 1 if $set1->false;
-       return 1 if $set1->true;
-       return 1 unless (new Automake::DisjConditions)->false;
-       return 1 if (new Automake::DisjConditions)->true;
-       return 1 unless $true->human eq 'TRUE';
-       return 1 unless $false->human eq 'FALSE';
-       return 1 unless $set1->human eq "(COND1 and !COND2) or (!COND3)";
-       return 1 unless $set2->human eq "(COND1 and !COND2) or (!COND3)";
-       my $one_cond_human = $set1->one_cond->human;
-       return 1 unless $one_cond_human eq "!COND3"
-                       || $one_cond_human eq "COND1 and !COND2";
-       return 1 unless $set1->string eq "COND1_TRUE COND2_FALSE | COND3_FALSE";
-
-       my $merged1 = $set1->merge ($set2);
-       my $merged2 = $set1->merge ($cond);
-       my $mult1 = $set1->multiply ($set3);
-       return threads->new (sub {
-         my $mult2 = $set1->multiply ($another);
-         return threads->new (sub {
-           return 1 unless $merged1->simplify->string eq "COND1_TRUE 
COND2_FALSE | COND3_FALSE";
-           return 1 unless $merged2->simplify->string eq "COND1_TRUE 
COND2_FALSE | COND3_FALSE";
-           return 1 unless $mult1->string eq "COND1_TRUE COND2_FALSE 
COND3_TRUE COND4_FALSE";
-           return 1 unless $mult1 == $mult2;
-           return 0;
-         })->join;
-       })->join;
-      })->join;
-    })->join;
-  })->join;
-}
-
-sub build_set (@)
-{
-  my @conds = @_;
-  my @set = ();
-  for my $cond (@conds)
-    {
-      push @set, new Automake::Condition @$cond;
-    }
-  return new Automake::DisjConditions @set;
-}
-
-sub test_invert ()
-{
-  my @tests = ([[["FALSE"]],
-               [["TRUE"]]],
-
-              [[["TRUE"]],
-               [["FALSE"]]],
-
-              [[["COND1_TRUE", "COND2_TRUE"],
-                ["COND3_FALSE", "COND2_TRUE"]],
-               [["COND2_FALSE"],
-                ["COND1_FALSE", "COND3_TRUE"]]],
-
-              [[["COND1_TRUE", "COND2_TRUE"],
-                ["TRUE"]],
-               [["FALSE"]]],
-
-              [[["COND1_TRUE", "COND2_TRUE"],
-                ["FALSE"]],
-               [["COND1_FALSE"],
-                ["COND2_FALSE"]]],
-
-              [[["COND1_TRUE"],
-                ["COND2_FALSE"]],
-               [["COND1_FALSE", "COND2_TRUE"]]]
-              );
-
-  for my $t (@tests)
-    {
-      my $set = build_set @{$t->[0]};
-      return 1
-        if threads->new(sub {
-         my $res = build_set @{$t->[1]};
-         my $inv = $set->invert;
-         if ($inv != $res)
-           {
-             print " (I) " . $set->string . "\n\t"
-               . $inv->string . ' != ' . $res->string . "\n";
-             return 1;
-           }
-         return 0
-       })-> join;
-    }
-  return 0;
-}
-
-sub test_simplify ()
-{
-  my @tests = ([[["FOO_TRUE", "BAR_FALSE", "BAZ_FALSE"],
-                ["FOO_TRUE", "BAR_FALSE", "BAZ_TRUE"]],
-               [["FOO_TRUE", "BAR_FALSE"]]],
-
-              [[["FOO_TRUE", "BAR_FALSE", "BAZ_FALSE"],
-                ["FOO_TRUE", "BAR_FALSE", "BAZ_TRUE"],
-                ["FOO_TRUE", "BAR_TRUE"]],
-               [["FOO_TRUE"]]],
-
-              [[["FOO_TRUE", "BAR_FALSE", "BAZ_FALSE"],
-                ["FOO_TRUE", "BAR_FALSE", "BAZ_TRUE"],
-                ["FOO_TRUE", "BAR_TRUE"],
-                ["FOO_FALSE"]],
-               [["TRUE"]]],
-
-              [[["FOO_TRUE", "BAR_FALSE", "BAZ_FALSE"],
-                ["FOO_TRUE", "BAR_FALSE", "BAZ_TRUE"],
-                            ["BAR_TRUE",  "BAZ_TRUE"],
-                            ["BAR_FALSE", "BAZ_TRUE"]],
-               [["BAZ_TRUE"], ["FOO_TRUE", "BAR_FALSE"]]],
-
-              [[["FOO_TRUE", "BAR_FALSE", "BAZ_FALSE"],
-                ["FOO_TRUE", "BAR_FALSE", "BAZ_TRUE"],
-                            ["BAR_TRUE",  "BAZ_TRUE"],
-                            ["BAR_FALSE", "BAZ_TRUE"],
-                ["FOO_FALSE"]],
-               [["FOO_FALSE"], ["BAZ_TRUE"], ["BAR_FALSE"]]],
-
-              [[["B_TRUE"],
-                ["A_FALSE", "B_TRUE"]],
-               [["B_TRUE"]]],
-
-              [[["B_TRUE"],
-                ["A_FALSE", "B_FALSE", "C_TRUE"],
-                ["A_FALSE", "B_FALSE", "C_FALSE"]],
-               [["A_FALSE"], ["B_TRUE"]]],
-
-              [[["B_TRUE"],
-                ["A_FALSE", "B_FALSE", "C_TRUE"],
-                ["A_FALSE", "B_FALSE", "C_FALSE"],
-                ["A_TRUE", "B_FALSE"]],
-               [["TRUE"]]],
-
-              [[["A_TRUE", "B_TRUE"],
-                ["A_TRUE", "B_FALSE"],
-                ["A_TRUE", "C_FALSE", "D_FALSE"]],
-               [["A_TRUE"]]],
-
-              [[["A_FALSE", "B_FALSE", "C_FALSE", "D_TRUE",  "E_FALSE"],
-                ["A_FALSE", "B_FALSE", "C_TRUE",  "D_TRUE",  "E_TRUE"],
-                ["A_FALSE", "B_TRUE",  "C_TRUE",  "D_FALSE", "E_TRUE"],
-                ["A_FALSE", "B_TRUE",  "C_FALSE", "D_FALSE", "E_FALSE"],
-                ["A_TRUE",  "B_TRUE",  "C_FALSE", "D_FALSE", "E_FALSE"],
-                ["A_TRUE",  "B_TRUE",  "C_TRUE",  "D_FALSE", "E_TRUE"],
-                ["A_TRUE",  "B_FALSE", "C_TRUE",  "D_TRUE",  "E_TRUE"],
-                ["A_TRUE",  "B_FALSE", "C_FALSE", "D_TRUE",  "E_FALSE"]],
-               [           ["B_FALSE", "C_FALSE", "D_TRUE",  "E_FALSE"],
-                           ["B_FALSE", "C_TRUE",  "D_TRUE",  "E_TRUE"],
-                           ["B_TRUE",  "C_TRUE",  "D_FALSE", "E_TRUE"],
-                           ["B_TRUE",  "C_FALSE", "D_FALSE", "E_FALSE"]]],
-
-              [[["A_FALSE", "B_FALSE", "C_FALSE", "D_TRUE",  "E_FALSE"],
-                ["A_FALSE", "B_FALSE", "C_TRUE",  "D_TRUE",  "E_TRUE"],
-                ["A_FALSE", "B_TRUE",  "C_TRUE",  "D_FALSE", "E_TRUE"],
-                ["A_FALSE", "B_TRUE",  "C_FALSE", "D_FALSE", "E_FALSE"],
-                ["A_TRUE",  "B_TRUE",  "C_FALSE", "D_FALSE", "E_FALSE"],
-                ["A_TRUE",  "B_TRUE",  "C_TRUE",  "D_FALSE", "E_TRUE"],
-                ["A_TRUE",  "B_FALSE", "C_TRUE",  "D_TRUE",  "E_TRUE"],
-                ["A_TRUE",  "B_FALSE", "C_FALSE", "D_TRUE",  "E_FALSE"],
-                ["A_FALSE", "B_FALSE", "C_FALSE", "D_FALSE", "E_FALSE"],
-                ["A_FALSE", "B_FALSE", "C_TRUE",  "D_FALSE", "E_TRUE"],
-                ["A_FALSE", "B_TRUE",  "C_TRUE",  "D_TRUE",  "E_TRUE"],
-                ["A_FALSE", "B_TRUE",  "C_FALSE", "D_TRUE",  "E_FALSE"],
-                ["A_TRUE",  "B_TRUE",  "C_FALSE", "D_TRUE",  "E_FALSE"],
-                ["A_TRUE",  "B_TRUE",  "C_TRUE",  "D_TRUE",  "E_TRUE"],
-                ["A_TRUE",  "B_FALSE", "C_TRUE",  "D_FALSE", "E_TRUE"],
-                ["A_TRUE",  "B_FALSE", "C_FALSE", "D_FALSE", "E_FALSE"]],
-               [["C_FALSE", "E_FALSE"],
-                ["C_TRUE", "E_TRUE"]]],
-
-              [[["A_FALSE"],
-                ["A_TRUE", "B_FALSE"],
-                ["A_TRUE", "B_TRUE", "C_FALSE"],
-                ["A_TRUE", "B_TRUE", "C_TRUE", "D_FALSE"],
-                ["A_TRUE", "B_TRUE", "C_TRUE", "D_TRUE", "E_FALSE"],
-                ["A_TRUE", "B_TRUE", "C_TRUE", "D_TRUE", "E_TRUE", "F_FALSE"],
-                ["A_TRUE", "B_TRUE", "C_TRUE", "D_TRUE", "E_TRUE"]],
-               [["TRUE"]]],
-
-              # Simplify should work with up to 31 variables.
-              [[["V01_TRUE", "V02_TRUE", "V03_TRUE", "V04_TRUE", "V05_TRUE",
-                 "V06_TRUE", "V07_TRUE", "V08_TRUE", "V09_TRUE", "V10_TRUE",
-                 "V11_TRUE", "V12_TRUE", "V13_TRUE", "V14_TRUE", "V15_TRUE",
-                 "V16_TRUE", "V17_TRUE", "V18_TRUE", "V19_TRUE", "V20_TRUE",
-                 "V21_TRUE", "V22_TRUE", "V23_TRUE", "V24_TRUE", "V25_TRUE",
-                 "V26_TRUE", "V27_TRUE", "V28_TRUE", "V29_TRUE", "V30_TRUE",
-                 "V31_TRUE"],
-                ["V01_TRUE", "V02_TRUE", "V03_TRUE", "V04_TRUE", "V05_TRUE",
-                 "V06_TRUE", "V07_TRUE", "V08_TRUE", "V09_TRUE", "V10_TRUE",
-                 "V11_TRUE", "V12_TRUE", "V13_TRUE", "V14_TRUE", "V15_TRUE",
-                 "V16_TRUE", "V17_TRUE", "V18_TRUE", "V19_TRUE", "V20_TRUE",
-                 "V21_TRUE", "V22_TRUE", "V23_TRUE", "V24_TRUE", "V25_TRUE",
-                 "V26_TRUE", "V27_TRUE", "V28_TRUE", "V29_TRUE", "V30_TRUE",
-                 "V31_FALSE"],
-                ["V01_FALSE","V02_TRUE", "V03_TRUE", "V04_TRUE", "V05_TRUE",
-                 "V06_TRUE", "V07_TRUE", "V08_TRUE", "V09_TRUE", "V10_TRUE",
-                 "V11_TRUE", "V12_TRUE", "V13_TRUE", "V14_TRUE", "V15_TRUE",
-                 "V16_TRUE", "V17_TRUE", "V18_TRUE", "V19_TRUE", "V20_TRUE",
-                 "V21_TRUE", "V22_TRUE", "V23_TRUE", "V24_TRUE", "V25_TRUE",
-                 "V26_TRUE", "V27_TRUE", "V28_TRUE", "V29_TRUE", "V30_TRUE",
-                 "V31_TRUE"],
-                ["V01_FALSE","V02_TRUE", "V03_TRUE", "V04_TRUE", "V05_TRUE",
-                 "V06_TRUE", "V07_TRUE", "V08_TRUE", "V09_TRUE", "V10_TRUE",
-                 "V11_TRUE", "V12_TRUE", "V13_TRUE", "V14_TRUE", "V15_TRUE",
-                 "V16_TRUE", "V17_TRUE", "V18_TRUE", "V19_TRUE", "V20_TRUE",
-                 "V21_TRUE", "V22_TRUE", "V23_TRUE", "V24_TRUE", "V25_TRUE",
-                 "V26_TRUE", "V27_TRUE", "V28_TRUE", "V29_TRUE", "V30_TRUE",
-                 "V31_FALSE"]],
-               [[            "V02_TRUE", "V03_TRUE", "V04_TRUE", "V05_TRUE",
-                 "V06_TRUE", "V07_TRUE", "V08_TRUE", "V09_TRUE", "V10_TRUE",
-                 "V11_TRUE", "V12_TRUE", "V13_TRUE", "V14_TRUE", "V15_TRUE",
-                 "V16_TRUE", "V17_TRUE", "V18_TRUE", "V19_TRUE", "V20_TRUE",
-                 "V21_TRUE", "V22_TRUE", "V23_TRUE", "V24_TRUE", "V25_TRUE",
-                 "V26_TRUE", "V27_TRUE", "V28_TRUE", "V29_TRUE", "V30_TRUE"
-                 ]]]);
-
-  for my $t (@tests)
-    {
-      my $set = build_set @{$t->[0]};
-      return 1
-       if threads->new(sub {
-         my $res = build_set @{$t->[1]};
-         return threads->new(sub {
-
-           # Make sure simplify() yields the expected result.
-           my $sim = $set->simplify;
-           return threads->new(sub {
-             if ($sim != $res)
-               {
-                 print " (S1) " . $set->string . "\n\t"
-                   . $sim->string . ' != ' . $res->string . "\n";
-                 return 1;
-               }
-
-             # Make sure simplify() is idempotent.
-             my $sim2 = $sim->simplify;
-             return threads->new(sub {
-               if ($sim2 != $sim)
-                 {
-                   print " (S2) " . $sim->string . "\n\t"
-                     . $sim2->string . ' != ' . $sim->string . "\n";
-                   return 1;
-                 }
-
-               # Also exercise invert() while we are at it.
-
-               my $inv1 = $set->invert->simplify;
-               return threads->new(sub {
-                 my $inv2 = $sim->invert->simplify;
-                 return threads->new(sub {
-                   if ($inv1 != $inv2)
-                     {
-                       print " (S3) " . $set->string . ", " . $sim->string . 
"\n\t"
-                         . $inv1->string . ' -= ' . $inv2->string . "\n";
-                       return 1;
-                     }
-                 })->join;
-               })->join;
-             })->join;
-           })->join;
-         })->join;
-       })->join;
-    }
-
-  return 0;
-}
-
-sub test_sub_conditions ()
-{
-  my @tests = ([[["FOO_TRUE", "BAR_FALSE", "BAZ_FALSE"],
-                ["FOO_TRUE", "BAR_FALSE", "BAZ_TRUE"],
-                ["FOO_FALSE"]],
-               ["FOO_TRUE"],
-               [["BAR_FALSE", "BAZ_FALSE"],
-                ["BAR_FALSE", "BAZ_TRUE"]]],
-
-              [[["FOO_TRUE", "BAR_FALSE", "BAZ_FALSE"],
-                ["FOO_TRUE", "BAR_FALSE", "BAZ_TRUE"],
-                ["FOO_FALSE"]],
-               ["FOO_TRUE", "BAR_FALSE"],
-               [["BAZ_FALSE"],
-                ["BAZ_TRUE"]]],
-
-              [[["FOO_TRUE", "BAR_FALSE", "BAZ_FALSE"],
-                ["FOO_TRUE", "BAR_FALSE", "BAZ_TRUE"],
-                ["FOO_FALSE"]],
-               ["FOO_TRUE", "BAR_TRUE"],
-               [["FALSE"]]],
-
-              [[["FOO_TRUE", "BAR_FALSE", "BAZ_FALSE"],
-                ["FOO_TRUE", "BAZ_TRUE"],
-                ["FOO_FALSE"]],
-               ["FOO_TRUE", "BAR_TRUE"],
-               [["BAZ_TRUE"]]],
-
-              [[["FOO_TRUE", "BAR_FALSE"],
-                ["FOO_TRUE", "BAR_TRUE"]],
-               ["FOO_TRUE", "BAR_TRUE"],
-               [["TRUE"]]],
-
-              [[["TRUE"]],
-               ["TRUE"],
-               [["TRUE"]]],
-
-              [[["FALSE"]],
-               ["TRUE"],
-               [["FALSE"]]],
-
-              [[["FALSE"]],
-               ["FALSE"],
-               [["FALSE"]]]);
-
-  for my $t (@tests)
-    {
-      my $t1 = build_set @{$t->[0]};
-      return 1
-        if threads->new(sub {
-         my $t2 = new Automake::Condition @{$t->[1]};
-         return threads->new(sub {
-           my $t3 = build_set @{$t->[2]};
-           return threads->new(sub {
-
-             # Make sure sub_conditions() yields the expected result.
-             my $s = $t1->sub_conditions ($t2);
-             threads->new(sub {
-               if ($s != $t3)
-                 {
-                   print " (SC) " . $t1->string . "\n\t"
-                     . $s->string . ' != ' . $t3->string . "\n";
-                   return 1;
-                 }
-             })->join;
-           })->join;
-         })->join;
-       })->join;
-    }
-}
-
-sub test_ambig ()
-{
-  my @tests = ([[["TRUE"]],
-               ["TRUE"],
-               "multiply defined"],
-              [[["C1_TRUE"]],
-               ["C1_TRUE"],
-               "multiply defined"],
-              [[["TRUE"]],
-                ["C1_FALSE"],
-               "which includes"],
-              [[["C1_TRUE"]],
-               ["C1_TRUE", "C2_TRUE"],
-               "which includes"],
-              [[["C1_TRUE", "C2_TRUE"]],
-               ["C2_TRUE"],
-               "which is included in"],
-              [[["C1_TRUE"]],
-               ["C2_TRUE"],
-               ''],
-              [[["C1_TRUE"],
-                ["C2_FALSE"]],
-               ["C1_FALSE", "C2_TRUE"],
-               '']);
-
-  my $failed = 0;
-  for my $t (@tests)
-    {
-      my $t1 = build_set @{$t->[0]};
-      $failed = 1
-        if threads->new(sub {
-         my $t2 = new Automake::Condition @{$t->[1]};
-         my $t3 = $t->[2];
-         return threads->new(sub {
-           my ($ans, $cond) = $t1->ambiguous_p ("FOO", $t2);
-           return threads->new(sub {
-             if ($t3 && $ans !~ /FOO.*$t3/)
-               {
-                 print " (A1) " . $t1->string . " vs. " . $t2->string . "\n\t"
-                   . "Error message '$ans' does not match '$t3'\n";
-                 return 1;
-               }
-             if (!$t3 && $ans ne '')
-               {
-                 print " (A2) " . $t1->string . " vs. " . $t2->string . "\n\t"
-                   . "Unexpected error message: $ans\n";
-                 return 1;
-               }
-           })->join;
-         })->join;
-       })->join;
-    }
-  return $failed;
-}
-
-exit (test_basics
-      || test_invert
-      || test_simplify
-      || test_sub_conditions
-      || test_ambig);
-
-### Setup "GNU" style for perl-mode and cperl-mode.
-## Local Variables:
-## perl-indent-level: 2
-## perl-continued-statement-offset: 2
-## perl-continued-brace-offset: 0
-## perl-brace-offset: 0
-## perl-brace-imaginary-offset: 0
-## perl-label-offset: -2
-## cperl-indent-level: 2
-## cperl-brace-offset: 0
-## cperl-continued-brace-offset: 0
-## cperl-label-offset: -2
-## cperl-extra-newline-before-brace: t
-## cperl-merge-trailing-else: nil
-## cperl-continued-statement-offset: 2
-## End:
diff --git a/t/remake.sh b/t/remake.sh
index b883d2a..1e50eee 100755
--- a/t/remake.sh
+++ b/t/remake.sh
@@ -33,6 +33,9 @@ mkdir sub
 $ACLOCAL
 $AUTOMAKE
 
-grep '^Makefile' sub/Makefile.in
+grep -i makefile sub/Makefile.in # For debugging.
+grep '^am\.relpath\.makefile = Makefile$' sub/Makefile.in
+grep '^am\.relpath\.makefile\.in = \$(srcdir)/Makefile\.in$' sub/Makefile.in
+grep '^am\.relpath\.makefile\.am = \$(srcdir)/Makefile\.am$' sub/Makefile.in
 
 :
diff --git a/t/verbatim.sh b/t/verbatim.sh
index 4921f26..761b301 100755
--- a/t/verbatim.sh
+++ b/t/verbatim.sh
@@ -42,6 +42,7 @@ esac
 
 mkdir am
 cp "$am_amdir"/*.am ./am
+cp "$am_amdir"/*.mk ./am
 
 echo pkgdata_DATA = configure.ac > Makefile.am
 
diff --git a/t/werror3.sh b/t/werror3.sh
index a22ff84..29f6a14 100755
--- a/t/werror3.sh
+++ b/t/werror3.sh
@@ -34,14 +34,6 @@ VAR = bar
 END
 
 $ACLOCAL
-
-# The issue would not manifest with threaded execution.
-unset AUTOMAKE_JOBS || :
-AUTOMAKE_run -Wno-error
-grep 'VAR multiply defined' stderr
-
-AUTOMAKE_JOBS=2
-export AUTOMAKE_JOBS
 AUTOMAKE_run -Wno-error
 grep 'VAR multiply defined' stderr
 


hooks/post-receive
-- 
GNU Automake



reply via email to

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