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-695-g599ee40
Date: Fri, 27 Jul 2012 13:11:35 +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=599ee404cde64c516c7c5041d099702eea2ea3c1

The branch, ng/master has been updated
       via  599ee404cde64c516c7c5041d099702eea2ea3c1 (commit)
       via  0130f3cfaa4cddd01ca2ccdd4d1428a5220ff13d (commit)
       via  d2e6baa1d567a8923723385a023ea171519b9a59 (commit)
       via  dda8a559f69d1fa6048cc005a69da489f568109a (commit)
       via  45371f9b638bcd3cb5a219d75e98cf627c022415 (commit)
       via  e09c86e578dcf9b53d7578577432079b2c36b397 (commit)
       via  0b820849a064ba97a90355ceda2bf04c4a3b1db2 (commit)
       via  dc301dd6d7fa8437cc92691f5b562ebc6f6d438c (commit)
       via  30129d41164615333205b2220bfe29dc20651014 (commit)
       via  c0395a4e0d27483b9235e160b27a8d8c2e34748a (commit)
       via  fb645bdb43b3217e36d2ebfb0649a6a253263b1b (commit)
       via  80572bf4da010d7eb768024787a38ff2d3c0260c (commit)
       via  08d9fa249b1713e0c306771429c7891320fa977c (commit)
       via  f58810d1df9c4c6d48e63b3e2bfcbc276dd860dc (commit)
       via  47475578968585536be8860a32adb7e2d8088ef7 (commit)
       via  207d7e7b440b78c1a2320419825b808183903cf6 (commit)
       via  19867565c4c59061f46df8da4e4de6e130964376 (commit)
       via  3a0356705484a4ccbb61f0e5f365a7c9d7b763b9 (commit)
       via  9e7f8ae0ec53617fac548a5fe14cc714a3f1aa2f (commit)
       via  eb48be804d31da4aff677a15d111135299f07d49 (commit)
       via  78912201b96ce406713c2d312774e0e4bbd363f5 (commit)
       via  2cabb73572a7fd4b0291ec44ade3b8e42b803c76 (commit)
       via  634f9a53d3a7981191ae7e1b241332cba6b43632 (commit)
       via  d0ded550bb6eb4aa17624852a16db381d34914a9 (commit)
       via  c0344626306dab5a8f5714c52740878371903a9d (commit)
       via  783c0e6879e3c575fc88532c636703b03f9c64d9 (commit)
       via  2613f8a58cf14312d2386aa1a4624b3e45bb7158 (commit)
       via  02461fa1e05201f1acbf811fc793da2eaf27b8d6 (commit)
       via  94bde9aab7efff7650222e317ef97295c8cfcaed (commit)
       via  11927353c180858e7d7f4e775f8de68781ce4d71 (commit)
       via  106428fe4e73d5f9f5e7cc2e44a1e9b3b85606c1 (commit)
       via  7d6b27434de032d8b6f852eb49e788b87a5e7695 (commit)
       via  4d62ca97577bdafa20ce64d8811d1bdf4a7d3004 (commit)
       via  c3ab278adbd9673e5f1727ac1841e271694e3985 (commit)
       via  f2b8b7659ae48941ab0be64d1663dd673e097d58 (commit)
       via  db188c29be11177499d4c96bd2b8327e884f7d8c (commit)
       via  253e3eb74d8dabe3eb5c9b2b09dab00e319a6caf (commit)
       via  e82c9156efaf61db57f564f752befa1ac7b8863b (commit)
       via  d8b3c5e4b81986b875f56502006288f43aee5159 (commit)
       via  60f8b3de17ae8812c8e1fc6dd2eb8fe492aee9c7 (commit)
       via  1ab1f5462d358f7f3b99d2008d88c44f8c39cea6 (commit)
       via  4fcf43cd2814ae16d981f5f91ad0c7ad45a6ca52 (commit)
       via  7a42af01cbdc200ba91262a10edde6ad4bce3cda (commit)
       via  55fb714072e3d9c94d4209bd4bf2399ae0c99f08 (commit)
       via  feab5c26b22ea999c741866484f320460a7c7b16 (commit)
       via  3bb5a901116b8e610860477bb1d7e74f3c8d4e0f (commit)
       via  472e4e4708f841967623708898050de5d7c27eda (commit)
       via  22443fe751fe97c065e6285cf8dcc8e5009dc576 (commit)
       via  1f4d8c22ebc0bd4e7f9ec11ae371575d99b1e1a1 (commit)
       via  d9686f93fd450b468bbcdd55980be4008b6a0635 (commit)
       via  f01805fef617d3bf860a58c708abcbb34767d77c (commit)
       via  7f3690db42a7fb8a7cfb1f11bb8b8b22d23ec31f (commit)
       via  1a915b9a8afcd3b8ae119330cea79ba97cf27fc3 (commit)
       via  42bd480ccbe3cf252bbf33e0f7a5e5eacc75a5ce (commit)
       via  2bb312c8afbb7eb15bd794c638d72b4dd15dc4eb (commit)
       via  42fb45b7d98e9155d05f056609452f0ff2385333 (commit)
       via  ecbceb3e4cb88019e490c4814ca7a7382e4e2299 (commit)
       via  69f0f0a143dd9e8ddf45da1b0db2a99f305f2202 (commit)
       via  6976741a7978349023fb415370ed0c946672a7f4 (commit)
       via  9eefd8487a8d60ff3f93be0f2ab2bcb75876970e (commit)
       via  61856a0d0a67d378bf64333a5b3ebd82424aebaf (commit)
       via  2dde586a7605f973accb99d41990804fdd028bab (commit)
       via  42d9439da93eb64ef3bb96e012cf4ab88f7f63ac (commit)
       via  3971f998c5388a46581b2a2c273283ef6f1e5408 (commit)
       via  d25349fe0524e7b6c7961f090cced631ee95aff6 (commit)
       via  b4f5f5b31ad281dd3d11b19ee125da7fc9e948f4 (commit)
       via  00a297e46a719dfb954657c569554db74eedcc64 (commit)
       via  a237c2cfdb919dad8ba36834ddd1649f670e6630 (commit)
       via  8d88ae22d7599c8617e1c53494860c65e3c1b410 (commit)
       via  eb07a5811b8df9ef3f94fb98adccf0f7d74f8559 (commit)
       via  d1a7148c7094f9d7bf188e90f072a01c7b5279ca (commit)
      from  40d140a6569ff4ec9b8619cb9d1cbefbc13e59b8 (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 599ee404cde64c516c7c5041d099702eea2ea3c1
Author: Stefano Lattarini <address@hidden>
Date:   Fri Jul 27 15:01:43 2012 +0200

    [ng] cosmetics: improve a comment
    
    * lib/am/parallel-tests.am (am.test-suite.test-bases): About this variable.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 0130f3cfaa4cddd01ca2ccdd4d1428a5220ff13d
Author: Stefano Lattarini <address@hidden>
Date:   Fri Jul 27 14:55:36 2012 +0200

    [ng] rename: am__is_xfail_test -> -> am.test-suite.is-xfail
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit d2e6baa1d567a8923723385a023ea171519b9a59
Author: Stefano Lattarini <address@hidden>
Date:   Fri Jul 27 14:54:23 2012 +0200

    [ng] rename: am__test_* -> am.test-suite.test-*
    
    That is:
    
        am__test_bases    ->  am.test-suite.test-bases
        am__test_logs     ->  am.test-suite.test-logs
        am__test_results  ->  am.test-suite.test-results
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit dda8a559f69d1fa6048cc005a69da489f568109a
Author: Stefano Lattarini <address@hidden>
Date:   Fri Jul 27 14:46:38 2012 +0200

    [ng] rename: am__xfail_test_bases -> am.test-suite.xfail-test-bases
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 45371f9b638bcd3cb5a219d75e98cf627c022415
Author: Stefano Lattarini <address@hidden>
Date:   Fri Jul 27 14:38:12 2012 +0200

    [ng] rename: am__get_test_bases -> am.test-suite.get-test-bases
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit e09c86e578dcf9b53d7578577432079b2c36b397
Author: Stefano Lattarini <address@hidden>
Date:   Fri Jul 27 14:33:55 2012 +0200

    [ng] rename: am__count_test_result -> am.test-suite.count-results
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 0b820849a064ba97a90355ceda2bf04c4a3b1db2
Author: Stefano Lattarini <address@hidden>
Date:   Fri Jul 27 14:20:31 2012 +0200

    [ng] rename: am__handle_per_suffix_test -> am.test-suite.handle-suffix
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit dc301dd6d7fa8437cc92691f5b562ebc6f6d438c
Author: Stefano Lattarini <address@hidden>
Date:   Fri Jul 27 14:18:17 2012 +0200

    [ng] rename: am__runtest -> am.test-suite.runtest
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 30129d41164615333205b2220bfe29dc20651014
Author: Stefano Lattarini <address@hidden>
Date:   Fri Jul 27 14:09:47 2012 +0200

    [ng] cosmetics: update a couple of outdated references in comments
    
    * lib/tap-driver.pl, lib/test-driver: Here, about synchronization of
    definition of ANSI color escapes with the relevant makefile fragments.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit c0395a4e0d27483b9235e160b27a8d8c2e34748a
Author: Stefano Lattarini <address@hidden>
Date:   Fri Jul 27 14:04:24 2012 +0200

    [ng] rename: am__tty_colors -> am.test-suite.tty-colors
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit fb645bdb43b3217e36d2ebfb0649a6a253263b1b
Author: Stefano Lattarini <address@hidden>
Date:   Fri Jul 27 14:02:28 2012 +0200

    [ng] rename: am__rst_title -> am.test-suite.rst-title
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 80572bf4da010d7eb768024787a38ff2d3c0260c
Author: Stefano Lattarini <address@hidden>
Date:   Fri Jul 27 14:00:54 2012 +0200

    [ng] rename: am__create_global_log -> am.test-suite.create-global-log
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 08d9fa249b1713e0c306771429c7891320fa977c
Author: Stefano Lattarini <address@hidden>
Date:   Fri Jul 27 13:31:09 2012 +0200

    [ng] rename: am.test-harness.* -> am.test-suite.*
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit f58810d1df9c4c6d48e63b3e2bfcbc276dd860dc
Author: Stefano Lattarini <address@hidden>
Date:   Fri Jul 27 13:28:30 2012 +0200

    [ng] rename: am__list_recheck_tests -> am.test-suite.list-tests-to-recheck
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 47475578968585536be8860a32adb7e2d8088ef7
Author: Stefano Lattarini <address@hidden>
Date:   Fri Jul 27 13:26:26 2012 +0200

    [ng] rename: am__list_recheck_tests -> am.test-suite-list-recheck
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 207d7e7b440b78c1a2320419825b808183903cf6
Author: Stefano Lattarini <address@hidden>
Date:   Fri Jul 27 13:22:03 2012 +0200

    [ng] rename: am__copy_in_global_log_rx -> 
am.test-suite.rx.copy-in-global-log
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 19867565c4c59061f46df8da4e4de6e130964376
Author: Stefano Lattarini <address@hidden>
Date:   Fri Jul 27 13:18:13 2012 +0200

    [ng] rename: am__global_test_result_rx -> am.test-suite.rx.global-result
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 3a0356705484a4ccbb61f0e5f365a7c9d7b763b9
Author: Stefano Lattarini <address@hidden>
Date:   Fri Jul 27 13:03:06 2012 +0200

    [ng] rename: am__recheck_rx -> am.test-suite.rx.recheck
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 9e7f8ae0ec53617fac548a5fe14cc714a3f1aa2f
Author: Stefano Lattarini <address@hidden>
Date:   Fri Jul 27 13:01:39 2012 +0200

    [ng] rename: am__test_result_rx -> am.test-suite.rx.result
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit eb48be804d31da4aff677a15d111135299f07d49
Author: Stefano Lattarini <address@hidden>
Date:   Fri Jul 27 12:08:01 2012 +0200

    [ng] check: reduce code duplication in some auxiliary variables
    
    * lib/am/parallel-tests.am (am.test-suite.awk-trs-loop/BEGIN,
    am.test-suite.awk-trs-loop/END, am.test-suite.awk-functions): New, hold
    fragments of awk scripts extracted from (and common to) ...
    (am__create_global_log, am__count_test_result): ... these variables.
    Some related improvements to comments, and minor reformatting.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 78912201b96ce406713c2d312774e0e4bbd363f5
Author: Stefano Lattarini <address@hidden>
Date:   Fri Jul 27 11:28:37 2012 +0200

    [ng] tests: fix a spurious failure
    
    * t/override-conditional-1.sh: Here, due to the recent edits
    of 'lib/am/header-vars.am'.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 2cabb73572a7fd4b0291ec44ade3b8e42b803c76
Author: Stefano Lattarini <address@hidden>
Date:   Fri Jul 27 11:22:08 2012 +0200

    [ng] cosmetics: fix some font-lock problems for vim
    
    * lib/am/parallel-tests.am: Here, by avoiding few occurrences of
    the single-quote characters in comments.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 634f9a53d3a7981191ae7e1b241332cba6b43632
Author: Stefano Lattarini <address@hidden>
Date:   Fri Jul 27 11:13:26 2012 +0200

    [ng] header vars: prefer '#' comments over '##' ones; improve few comments
    
    * lib/am/header-vars.am: Here, throughout the file.  This will make it
    easier for someone reading the generated Makefile.in to understand what
    it's going on.  And improve/fix few existing comments while at it.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit d0ded550bb6eb4aa17624852a16db381d34914a9
Author: Stefano Lattarini <address@hidden>
Date:   Fri Jul 27 10:38:49 2012 +0200

    [ng] header vars: fix comment on why DESTDIR is not explicitly initialized
    
    * lib/am/header-vars.am (DESTDIR): It's because we want to allow it to
    be defined from the environment, for compatibility with mainline Automake.
    For better clarity, define an (empty) default with the line "DESTDIR ?=",
    instead of with the commented-out definition "# DESTDIR=".
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit c0344626306dab5a8f5714c52740878371903a9d
Author: Stefano Lattarini <address@hidden>
Date:   Fri Jul 27 10:32:58 2012 +0200

    [ng] vars: remove variable $(am__sh_e_setup)
    
    The comments to that variable claimed that "set +e" in the shell was
    an XSI extension, but the Automake testsuite since at least 1.11 (which
    was run several times with some weak, non-POSIX vendor /bin/sh) used it
    in the test script, with not problem whatsoever.  So we don't actually
    need the safety net provided by $(am__sh_e_setup): we can simply use
    'set +e' in the relevant recipes.
    
    * lib/am/header-vars.am (am__sh_e_setup): Remove.
    * lib/am/parallel-tests.am: Remove usages; simply inline 'set +e' instead.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 783c0e6879e3c575fc88532c636703b03f9c64d9
Author: Stefano Lattarini <address@hidden>
Date:   Fri Jul 27 10:24:28 2012 +0200

    [ng] header vars: less use of @SUBST@ occurrences
    
    * lib/am/header-vars.am: Use $(PACKAGE) and $(srcdir) throughout
    rather than @PACKAGE@ and @address@hidden
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 2613f8a58cf14312d2386aa1a4624b3e45bb7158
Author: Stefano Lattarini <address@hidden>
Date:   Fri Jul 27 10:18:13 2012 +0200

    [ng] header vars: move check for GNU make version earlier
    
    * lib/am/header-vars.am: Move the check that the version of GNU make
    in use is modern enough before everything else.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 02461fa1e05201f1acbf811fc793da2eaf27b8d6
Author: Stefano Lattarini <address@hidden>
Date:   Fri Jul 27 10:11:48 2012 +0200

    [ng] header vars: remove few old redundant variables
    
    * lib/am/header-vars.am (target_triplet, host_triplet, build_triplet):
    Remove these, redundant because aliases respectively for the variables
    $(target), $(host) and $(build).  See also:
    <http://lists.gnu.org/archive/html/automake/2012-07/msg00058.html>
    * lib/am/dejagnu.am: Adjust.
    * NG-NEWS: Update.
    * doc/automake-ng.texi: Adjust.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

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

Summary of changes:
 .gitignore                                 |    2 +-
 Makefile.am                                |   65 ++++--
 NG-NEWS                                    |    5 +
 configure.ac                               |   13 ++
 defs                                       |   12 +-
 doc/automake-ng.texi                       |   13 +-
 gen-testsuite-part                         |   38 ++--
 lib/am/color-tests.am                      |    2 +-
 lib/am/dejagnu.am                          |    6 +-
 lib/am/header-vars.am                      |  173 ++++++++--------
 lib/am/parallel-tests.am                   |  239 ++++++++++------------
 lib/am/serial-tests.am                     |    2 +-
 lib/tap-driver.pl                          |    2 +-
 lib/test-driver                            |    2 +-
 runtest.in                                 |   85 +++++++--
 syntax-checks.mk                           |   13 +-
 t/README                                   |    2 +-
 t/ax/{test-init.sh => am-test-lib.sh}      |  312 ++++------------------------
 t/ax/plain-functions.sh                    |   40 ----
 t/ax/tap-setup.sh                          |    2 +-
 defs-static.in => t/ax/test-defs.in        |   76 +------
 t/ax/test-lib.sh                           |  296 ++++++++++++++++++++++++++
 t/depcomp-shuffle-sub-vpath.sh             |    4 +-
 t/depcomp-shuffle-sub.sh                   |    4 +-
 t/depcomp-shuffle-vpath.sh                 |    4 +-
 t/depcomp-shuffle.sh                       |    4 +-
 t/memoize.tap                              |    4 +-
 t/override-conditional-1.sh                |    3 +-
 t/parallel-tests-empty-tests.sh            |    7 +-
 t/primary-prefix-couples-force-valid.sh    |    7 +-
 t/self-check-env-sanitize.tap              |   56 -----
 t/self-check-tap.sh                        |   45 ----
 t/serial-tests.sh                          |    2 +-
 t/tap-ambiguous-directive.sh               |    2 +-
 t/tap-autonumber.sh                        |    2 +-
 t/tap-bailout-and-logging.sh               |    2 +-
 t/tap-bailout-leading-space.sh             |    2 +-
 t/tap-bailout-suppress-badexit.sh          |    2 +-
 t/tap-bailout-suppress-later-diagnostic.sh |    2 +-
 t/tap-bailout-suppress-later-errors.sh     |    2 +-
 t/tap-bailout.sh                           |    2 +-
 t/tap-color.sh                             |    2 +-
 t/tap-deps.sh                              |    2 +-
 t/tap-diagnostic.sh                        |    2 +-
 t/tap-empty-diagnostic.sh                  |    2 +-
 t/tap-empty.sh                             |    2 +-
 t/tap-escape-directive-2.sh                |    2 +-
 t/tap-escape-directive.sh                  |    2 +-
 t/tap-exit.sh                              |    2 +-
 t/tap-fancy.sh                             |    2 +-
 t/tap-fancy2.sh                            |    2 +-
 t/tap-global-log.sh                        |    2 +-
 t/tap-global-result.sh                     |    2 +-
 t/tap-lazy-check.sh                        |    2 +-
 t/tap-log.sh                               |    2 +-
 t/tap-merge-stdout-stderr.sh               |    2 +-
 t/tap-missing-plan-and-bad-exit.sh         |    2 +-
 t/tap-msg0-bailout.sh                      |    2 +-
 t/tap-msg0-directive.sh                    |    2 +-
 t/tap-msg0-misc.sh                         |    2 +-
 t/tap-msg0-planskip.sh                     |    2 +-
 t/tap-msg0-result.sh                       |    2 +-
 t/tap-negative-numbers.sh                  |    2 +-
 t/tap-no-disable-hard-error.sh             |    2 +-
 t/tap-no-merge-stdout-stderr.sh            |    2 +-
 t/tap-no-spurious-numbers.sh               |    2 +-
 t/tap-no-spurious.sh                       |    2 +-
 t/tap-not-ok-skip.sh                       |    2 +-
 t/tap-number-wordboundary.sh               |    2 +-
 t/tap-numbers-leading-zero.sh              |    2 +-
 t/tap-numeric-description.sh               |    2 +-
 t/tap-out-of-order.sh                      |    2 +-
 t/tap-passthrough-exit.sh                  |    2 +-
 t/tap-passthrough.sh                       |    2 +-
 t/tap-plan-corner.sh                       |    2 +-
 t/tap-plan-errors.sh                       |    2 +-
 t/tap-plan-leading-zero.sh                 |    2 +-
 t/tap-plan-malformed.sh                    |    2 +-
 t/tap-plan-middle.sh                       |    2 +-
 t/tap-plan-whitespace.sh                   |    2 +-
 t/tap-plan.sh                              |    2 +-
 t/tap-planskip-and-logging.sh              |    2 +-
 t/tap-planskip-badexit.sh                  |    2 +-
 t/tap-planskip-bailout.sh                  |    2 +-
 t/tap-planskip-case-insensitive.sh         |    2 +-
 t/tap-planskip-late.sh                     |    2 +-
 t/tap-planskip-later-errors.sh             |    2 +-
 t/tap-planskip-unplanned-corner.sh         |    2 +-
 t/tap-planskip-unplanned.sh                |    2 +-
 t/tap-planskip-whitespace.sh               |    2 +-
 t/tap-planskip.sh                          |    2 +-
 t/tap-realtime.sh                          |    2 +-
 t/tap-result-comment.sh                    |    2 +-
 t/tap-summary-color.sh                     |    4 +-
 t/tap-summary.sh                           |    4 +-
 t/tap-test-number-0.sh                     |    2 +-
 t/tap-todo-skip-together.sh                |    2 +-
 t/tap-todo-skip-whitespace.sh              |    2 +-
 t/tap-todo-skip.sh                         |    2 +-
 t/tap-unplanned.sh                         |    2 +-
 t/tap-whitespace-normalization.sh          |    2 +-
 t/tap-with-and-without-number.sh           |    2 +-
 t/tap-xfail-tests.sh                       |    2 +-
 t/test-trs-basic.sh                        |    2 +-
 t/testsuite-summary-color.sh               |    8 +-
 t/testsuite-summary-count.sh               |    8 +-
 106 files changed, 830 insertions(+), 872 deletions(-)
 rename t/ax/{test-init.sh => am-test-lib.sh} (71%)
 delete mode 100644 t/ax/plain-functions.sh
 rename defs-static.in => t/ax/test-defs.in (73%)
 create mode 100644 t/ax/test-lib.sh
 delete mode 100755 t/self-check-env-sanitize.tap
 delete mode 100755 t/self-check-tap.sh

diff --git a/.gitignore b/.gitignore
index 51a8b82..8fee6b7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -38,7 +38,7 @@
 /test-suite.log
 /t/wrap/aclocal-1.*
 /t/wrap/automake-1.*
-/defs-static
+/t/ax/test-defs.sh
 /testsuite-autodeps.am
 /t/*-w.tap
 /t/*-w.sh
diff --git a/Makefile.am b/Makefile.am
index 51258cc..362be99 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -305,8 +305,7 @@ include $(srcdir)/contrib/t/local.am
 all_TESTS = \
   $(wildcard $(srcdir)/t/*.sh) \
   $(wildcard $(srcdir)/t/*.tap) \
-  $(wildcard $(srcdir)/t/pm/*.pl) \
-  $(wildcard $(srcdir)/t/perf/*.sh)
+  $(wildcard $(srcdir)/t/pm/*.pl)
 
 # This is to ensure longer-running tests will be run earlier, which is
 # useful when running the testsuite in parallel on multicore machines.
@@ -360,14 +359,17 @@ XFAIL_TESTS = \
 
 # Some testsuite-influential variables should be overridable from the
 # test scripts, but not from the environment.
+# Keep this in sync with the similar list in 'runtest.in'.
 AM_TESTS_ENVIRONMENT = \
   for v in \
     required \
-    am_using_tap \
+    am_test_protocol \
     am_serial_tests \
     am_test_prefer_config_shell \
     am_original_AUTOMAKE \
     am_original_ACLOCAL \
+    am_test_lib_sourced \
+    test_lib_sourced \
   ; do \
     eval test x"\$${$$v}" = x || unset $$v; \
   done;
@@ -376,6 +378,16 @@ AM_TESTS_ENVIRONMENT = \
 AM_TESTS_FD_REDIRECT = 9>&2
 AM_TESTS_ENVIRONMENT += stderr_fileno_=9; export stderr_fileno_;
 
+# For sourcing of extra "shell libraries" by our test scripts.  As per
+# POSIX, sourcing a file with '.' will cause it to be looked up in $PATH
+# in case it is given with a relative name containing no slashes.
+AM_TESTS_ENVIRONMENT += \
+  if test $(srcdir) != .; then \
+    PATH='$(abs_srcdir)/t/ax'$(PATH_SEPARATOR)$$PATH; \
+  fi; \
+  PATH='$(abs_builddir)/t/ax'$(PATH_SEPARATOR)$$PATH; \
+  export PATH;
+
 # Automatically-computed dependencies for tests.
 include $(srcdir)/testsuite-autodeps.am
 
@@ -388,32 +400,38 @@ $(srcdir)/testsuite-autodeps.am: 
$(srcdir)/gen-testsuite-part
        $(AM_V_at)chmod a-w $(@F)-t && mv -f $(@F)-t $@
 EXTRA_DIST += gen-testsuite-part
 
-# Static dependencies valid for each test case.
-check_SCRIPTS = t/wrap/aclocal-$(APIVERSION) t/wrap/automake-$(APIVERSION)
-dist_check_DATA = \
-  t/ax/test-init.sh  \
-  t/ax/plain-functions.sh  \
+# Static dependencies valid for each test case (also further
+# extended later).  Note that use 'noinst_' rather than 'check_'
+# as the prefix, because we really want them to be built by
+# "make all".  This makes it easier to run the test cases by
+# hand after having simply configured and built the package.
+
+nodist_noinst_SCRIPTS = \
+  t/wrap/aclocal-$(APIVERSION) \
+  t/wrap/automake-$(APIVERSION)
+
+dist_noinst_DATA = \
+  t/ax/test-lib.sh \
+  t/ax/am-test-lib.sh \
   t/ax/tap-functions.sh
-nodist_check_DATA = defs-static
 
 # Few more static dependencies.
 t/distcheck-missing-m4.log: t/ax/distcheck-hook-m4.am
 t/distcheck-outdated-m4.log: t/ax/distcheck-hook-m4.am
 EXTRA_DIST += t/ax/distcheck-hook-m4.am
 
-defs-static: defs-static.in Makefile
+t/ax/test-defs.sh: t/ax/test-defs.in Makefile
        $(AM_V_at)rm -f $@ address@hidden
        $(AM_V_GEN)$(do_subst)
        $(generated_file_finalize)
-EXTRA_DIST += defs-static.in
-CLEANFILES += defs-static
+EXTRA_DIST += t/ax/test-defs.in
+CLEANFILES += t/ax/test-defs.sh
+nodist_noinst_DATA = t/ax/test-defs.sh
 
 runtest: runtest.in Makefile
        $(AM_V_at)rm -f $@ address@hidden
-       $(AM_V_GEN)in=runtest.in \
-         && $(MKDIR_P) t/ax \
-         && $(do_subst) <$(srcdir)/runtest.in >address@hidden \
-         && chmod a+x address@hidden
+       $(AM_V_GEN)$(do_subst)
+       $(AM_V_at)chmod a+x address@hidden
        $(generated_file_finalize)
 EXTRA_DIST += runtest.in
 CLEANFILES += runtest
@@ -474,10 +492,21 @@ installcheck-local: installcheck-testsuite
 installcheck-testsuite:
        am_running_installcheck=yes $(MAKE) check
 
+# Performance tests.
+perf_TESTS = $(wildcard $(srcdir)/t/perf/*.sh) \
+             $(wildcard $(srcdir)/t/perf/*.tap)
+.PHONY: perf
+perf: all
+       $(MAKE) $(AM_MAKEFLAGS) TEST_SUITE_LOG='$(PERF_TEST_SUITE_LOG)' \
+                               TESTS='$(perf_TESTS)' check
+PERF_TEST_SUITE_LOG = t/perf/test-suite.log
+CLEANFILES += $(PERF_TEST_SUITE_LOG)
+EXTRA_DIST += $(perf_TESTS)
+
 clean-local: clean-local-check
 .PHONY: clean-local-check
 clean-local-check:
-## Directries candidate to be test directories match this wildcard.
+## Directories candidate to be test directories match this wildcard.
        @globs='t/*.dir t/*/*.dir */t/*.dir */t/*/*.dir'; \
 ## The 'nullglob' bash option is not portable, so use perl.
        dirs=`$(PERL) -e "print join(' ', glob('$$globs'));"` || exit 1; \
@@ -538,7 +567,7 @@ amhello_configury = \
   missing \
   src/Makefile.in
 
-dist_noinst_DATA = $(amhello_sources)
+dist_noinst_DATA += $(amhello_sources)
 dist_doc_DATA = $(srcdir)/doc/amhello-1.0.tar.gz
 
 # We depend on configure.ac so that we regenerate the tarball
diff --git a/NG-NEWS b/NG-NEWS
index 4e91893..78a6524 100644
--- a/NG-NEWS
+++ b/NG-NEWS
@@ -274,6 +274,11 @@ Obsolete Features Removed
   renamed to '$(am.remake.aclocal-m4)', and should be considered an
   internal detail.
 
+* The variables $(target_triplet), $(host_triplet) and $(build_triplet),
+  which were redundant because aliases respectively for the variables
+  $(target), $(host) and $(build), have been removed.  Simply use this
+  latter variables.
+
 
 Source Files with Unknown Extensions
 ====================================
diff --git a/configure.ac b/configure.ac
index be050f9..775eae3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -321,10 +321,23 @@ AC_DEFUN([_AM_CHECK_CANDIDATE_SHELL],
       [], [am_score=1; break])
 
     _AM_CHECK_SHELL_FEATURE([$1],
+      [can define exit traps in a shell function],
+      [fail=0 && foo() { trap 'fail=1' 0; } && foo && test $fail = 0],
+      [], [am_score=1; break])
+
+    _AM_CHECK_SHELL_FEATURE([$1],
       [corrupts stderr with "set -x"],
       [(set -x; P=1 true 2>&3) 3>&1 2>/dev/null | grep P=1],
       [am_score=9], [])
 
+    echo 'return 34' > conftest-return.sh
+    echo 'ok=no' >> conftest-return.sh
+    _AM_CHECK_SHELL_FEATURE([$1],
+      [can return early from "dot-sourced" files],
+      [ok=yes; . ./conftest-return.sh; test $? -eq 34 && test $ok = yes],
+      [rm -f conftest-return.sh],
+      [rm -f conftest-return.sh; am_score=1; break])
+
     echo 'alias false=echo' > conftest-alias.sh
     echo 'false && test "$(false 97)" = 97' >> conftest-alias.sh
     _AM_CHECK_SHELL_FEATURE([$1],
diff --git a/defs b/defs
index df85746..1ee1116 100644
--- a/defs
+++ b/defs
@@ -15,9 +15,11 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Source the shell static setup and variable definitions.
-. ./defs-static; test $? -eq 0 || exit 99
+set -e
 
-# Source the actual test initialization and setup code, and return
-# control to the test script that is sourcing us.
-. "$am_testauxdir/test-init.sh"
+# Source the actual code for test initialization and setup.
+. test-lib.sh
+. am-test-lib.sh
+
+# Run that setup, and return control to the test script sourcing us.
+am_test_setup
diff --git a/doc/automake-ng.texi b/doc/automake-ng.texi
index 64a31c2..e8b1303 100644
--- a/doc/automake-ng.texi
+++ b/doc/automake-ng.texi
@@ -2915,14 +2915,13 @@ Currently recognized macros and their effects are:
 @item AC_CANONICAL_BUILD
 @itemx AC_CANONICAL_HOST
 @itemx AC_CANONICAL_TARGET
address@hidden build_triplet
address@hidden host_triplet
address@hidden target_triplet
address@hidden build
address@hidden host
address@hidden target
 Automake will ensure that @file{config.guess} and @file{config.sub}
-exist.  Also, the @file{Makefile} variables @code{build_triplet},
address@hidden and @code{target_triplet} are introduced.  See
address@hidden, , Getting the Canonical System Type, autoconf,
-The Autoconf Manual}.
+exist.  Also, the @file{Makefile} variables @code{build}, @code{host}
+and @code{target} are introduced.  See @ref{Canonicalizing, ,
+Getting the Canonical System Type, autoconf, The Autoconf Manual}.
 
 @item AC_CONFIG_AUX_DIR
 Automake will look for various helper scripts, such as
diff --git a/gen-testsuite-part b/gen-testsuite-part
index a67ce55..50f8a70 100755
--- a/gen-testsuite-part
+++ b/gen-testsuite-part
@@ -31,6 +31,13 @@ my $me = File::Basename::basename $0;
 # For use in VPATH builds.
 my $srcdir = ".";
 
+# The testsuite subdirectory, relative to the top-lever source directory.
+my $testdir = "t";
+
+# Where testsuite-related helper scripts, data files and shell libraries
+# are placed.  Relative to the top-lever source directory.
+my $testauxdir = "$testdir/ax";
+
 #--------------------------------------------------------------------------
 
 sub unindent ($)
@@ -89,7 +96,7 @@ sub write_wrapper_script ($$$)
   print $file_handle unindent <<EOF;
     #! /bin/sh
     # This file has been automatically generated.  DO NOT EDIT BY HAND!
-    . ./defs-static || exit 1
+    . test-lib.sh
     $shell_setup_code
     w="\$am_top_srcdir/$wrapped_test"
     if test -f "\$w"; then
@@ -104,7 +111,8 @@ EOF
 
 sub get_list_of_tests ()
 {
-  my @tests_list = split /\s+/, `cd '$srcdir' && ls t/*.sh t/*.tap`;
+  my @tests_list = split /\s+/,
+                   `cd '$srcdir' && echo $testdir/*.sh $testdir/*.tap`;
   # Tests whose names matches this pattern are already autogenerated,
   # so we shouldn't re-process them.
   @tests_list = grep { !/-w[0-9]*\.(sh|tap)$/ } @tests_list;
@@ -132,57 +140,53 @@ sub parse_options (@)
 
 #--------------------------------------------------------------------------
 
-# Where testsuite-related helper scripts, data files and shell libraries
-# are placed.  Relative to the 't/' subdirectory.
-my $auxdir = "ax";
-
 my %deps_extractor =
   (
     libtool_macros =>
       {
         line_matcher => qr/^\s*required=.*\blibtool/,
-        nodist_prereqs => "t/libtool-macros.log",
+        nodist_prereqs => "$testdir/libtool-macros.log",
       },
     gettext_macros =>
       {
         line_matcher => qr/^\s*required=.*\bgettext/,
-        nodist_prereqs => "t/gettext-macros.log",
+        nodist_prereqs => "$testdir/gettext-macros.log",
       },
     use_trivial_test_driver =>
       {
         line_matcher => qr/\btrivial-test-driver\b/,
-        dist_prereqs => "t/$auxdir/trivial-test-driver",
+        dist_prereqs => "$testauxdir/trivial-test-driver",
       },
     depcomp_shuffle =>
       {
         line_matcher => qr/\bdepcomp-shuffle\.sh\b/,
-        dist_prereqs => "t/$auxdir/depcomp-shuffle.sh",
+        dist_prereqs => "$testauxdir/depcomp-shuffle.sh",
       },
     check_testsuite_summary =>
       {
         line_matcher => qr/\btestsuite-summary-checks\.sh\b/,
-        dist_prereqs => "t/$auxdir/testsuite-summary-checks.sh",
+        dist_prereqs => "$testauxdir/testsuite-summary-checks.sh",
       },
     extract_testsuite_summary =>
       {
         line_matcher => qr/\bextract-testsuite-summary\.pl\b/,
-        dist_prereqs => "t/$auxdir/extract-testsuite-summary.pl",
+        dist_prereqs => "$testauxdir/extract-testsuite-summary.pl",
       },
     check_tap_testsuite_summary =>
       {
         line_matcher => qr/\btap-summary-aux\.sh\b/,
-        dist_prereqs => "t/$auxdir/tap-summary-aux.sh",
+        dist_prereqs => "$testauxdir/tap-summary-aux.sh",
       },
     on_tap_with_common_setup =>
       {
         line_matcher => qr/\btap-setup\.sh\b/,
-        dist_prereqs => "t/$auxdir/tap-setup.sh",
-        nodist_prereqs => "t/tap-common-setup.log",
+        dist_prereqs => "$testauxdir/tap-setup.sh",
+        nodist_prereqs => "$testdir/tap-common-setup.log",
       },
     depcomp =>
       {
         line_matcher => qr/\bdepcomp\.sh\b/,
-        dist_prereqs => "t/$auxdir/depcomp.sh",
+        dist_prereqs => "$testauxdir/depcomp.sh",
       },
   );
 
@@ -345,7 +349,7 @@ foreach my $lt (TRUE, FALSE)
           );
         my $testname = "depcomp" . ($lt ? "-lt-" : "-") . $m . ".tap";
         # Create wrapper test.
-        atomic_write ("$srcdir/t/$testname", sub
+        atomic_write ("$srcdir/$testdir/$testname", sub
           {
             my $file_handle = shift;
             print $file_handle unindent <<EOF;
diff --git a/lib/am/color-tests.am b/lib/am/color-tests.am
index d2e2a7d..a7cf297 100644
--- a/lib/am/color-tests.am
+++ b/lib/am/color-tests.am
@@ -14,7 +14,7 @@
 ## You should have received a copy of the GNU General Public License
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-am__tty_colors = { \
+am.test-suite.tty-colors = { \
   if test "X$(AM_COLOR_TESTS)" = Xno; then \
     am__color_tests=no; \
   elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
diff --git a/lib/am/dejagnu.am b/lib/am/dejagnu.am
index cb88949..8c8733d 100644
--- a/lib/am/dejagnu.am
+++ b/lib/am/dejagnu.am
@@ -57,11 +57,11 @@ site.exp: Makefile $(EXTRA_DEJAGNU_SITE_CONFIG)
        @echo "set objdir `pwd`" >>site.tmp
 ## Quote the *_alias variables because they might be empty.
 ?BUILD?        @echo 'set build_alias "$(build_alias)"' >>site.tmp
-?BUILD?        @echo 'set build_triplet $(build_triplet)' >>site.tmp
+?BUILD?        @echo 'set build_triplet $(build)' >>site.tmp
 ?HOST? @echo 'set host_alias "$(host_alias)"' >>site.tmp
-?HOST? @echo 'set host_triplet $(host_triplet)' >>site.tmp
+?HOST? @echo 'set host_triplet $(host)' >>site.tmp
 ?TARGET?       @echo 'set target_alias "$(target_alias)"' >>site.tmp
-?TARGET?       @echo 'set target_triplet $(target_triplet)' >>site.tmp
+?TARGET?       @echo 'set target_triplet $(target)' >>site.tmp
 ## Allow the package author to extend site.exp.
        @list='$(EXTRA_DEJAGNU_SITE_CONFIG)'; for f in $$list; do \
          echo "## Begin content included from file $$f.  Do not modify. ##" \
diff --git a/lib/am/header-vars.am b/lib/am/header-vars.am
index 52457ea..472d0b2 100644
--- a/lib/am/header-vars.am
+++ b/lib/am/header-vars.am
@@ -14,13 +14,21 @@
 ## You should have received a copy of the GNU General Public License
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-VPATH = @srcdir@
+# Makefiles generated by Automake-NG require GNU make >= 3.81.
+# The .FEATURES special variable has been introduced in that make
+# version, so use it as a witness to determine whether the current
+# make is good enough.
+ifndef .FEATURES
+  $(error Automake-NG based builds require GNU make 3.81 or later)
+endif
+
+VPATH = $(srcdir)
 
-## Enhance performance by removing GNU make builtin rules that would be
-## rather irrelevant (e.g., rules to automatically check out files from
-## from RCS or SCCS repositories), or overridden by Automake (e.g., rules
-## to compile C or C++ files).  For larger packages (like GNU coreutils),
-## this can greatly speed up null or almost-null builds, up to even 50%!
+# Enhance performance by removing GNU make builtin rules that would be
+# rather irrelevant (e.g., rules to automatically check out files from
+# from RCS or SCCS repositories), or overridden by Automake (e.g., rules
+# to compile C or C++ files).  For larger packages (like GNU coreutils),
+# this can greatly speed up null or almost-null builds, up to even 50%!
 MAKEFLAGS += --no-builtin-rules
 
 # For when we need a do-nothing target.  Add an actual rule to it to avoid
@@ -29,9 +37,9 @@ MAKEFLAGS += --no-builtin-rules
 .am/nil:
        @:
 
-## Declare an error, without immediately terminating the execution (proper
-## code will take care later of that).  This will allow us to diagnose more
-## issues at once, rather than stopping at the first one.
+# Declare an error, without immediately terminating the execution (proper
+# code will take care later of that).  This will allow us to diagnose more
+# issues at once, rather than stopping at the first one.
 am.error.seen :=
 define am.error
 $(warning $1)$(eval am.error.seen := yes)
@@ -62,16 +70,8 @@ define am.chars.newline
 $(am.chars.empty)
 endef
 
-## Makefiles generated by Automake-NG require GNU make >= 3.81.
-## The .FEATURES special variable has been introduced in that make
-## version, so use it as a witness to determine whether the current
-## make is good enough.
-ifndef .FEATURES
-  $(error Automake-NG based builds require GNU make 3.81 or later)
-endif
-
-## Neutralize unwarranted environment settings that might interfere with
-## our Makefiles.
+# Neutralize unwarranted environment settings that might interfere with
+# our Makefiles.
 ifdef SUBDIRS
   ifneq "$(origin SUBDIRS)" "file"
     ifneq "$(origin SUBDIRS)" "command line"
@@ -110,37 +110,28 @@ am__ensure_dir_exists = \
 # exists, by creating it if necessary.
 am__ensure_target_dir_exists = $(call am__ensure_dir_exists,$(@D))
 
-## The 'all' target must be the default one, independently from the
-## position it is declared in the output Makefile.
+# The 'all' target must be the default one, independently from the
+# position it is declared in the output Makefile.
 .DEFAULT_GOAL := all
 
-# Solaris 10 'make', and several other traditional 'make' implementations,
-# pass "-e" to $(SHELL), and POSIX 2008 even requires this.  Work around it
-# by disabling -e (using the XSI extension "set +e") if it's set.
-am__sh_e_setup = case $$- in *e*) set +e;; esac
-
-## Emulate VPATH rewrites.  This uses only GNU make primitives, which
-## allows us to avoid extra forks.
+# Emulate VPATH rewrites.  This uses only GNU make primitives, which
+# allows us to avoid extra forks.
 am.vpath.rewrite = \
   $(firstword $(wildcard $(strip $(1))) $(srcdir)/$(strip $(1)))
 
-## We used to define this.  However, we don't because vendor makes
-## (e.g., Solaris, Irix) won't correctly propagate variables that are
-## defined in Makefile.  This particular variable can't be correctly
-## defined by configure (at least, not the current configure), so we
-## simply avoid defining it to allow the user to use this feature with
-## a vendor make.
-## DESTDIR =
-
-## Tell whether make is running in "dry mode".  It is either 'true' or
-## 'false', so that it can be easily used in shell code as well as in
-## GNU make conditionals.
-## If we run "make TESTS='snooze nap'", GNU make will export MAKEFLAGS to
-## "TESTS=foo\ nap", so that the builtins operating on word-split lists
-## would see a "make flag" equal to "nap" when analyzing $(MAKEFLAGS), and
-## would wrongly misinterpret that as and indication that make is running
-## in dry mode.  This has already happened in practice.  So we need the
-## hack with $(subst \ , ...).
+# make this overridable from the environment, for better compatibility
+# with mainline Automake.
+DESTDIR ?=
+
+# Tell whether make is running in "dry mode".  It is either 'true' or
+# 'false', so that it can be easily used in shell code as well as in
+# GNU make conditionals.
+# If we run "make TESTS='snooze nap'", GNU make will export MAKEFLAGS to
+# "TESTS=foo\ nap", so that the builtins operating on word-split lists
+# would see a "make flag" equal to "nap" when analyzing $(MAKEFLAGS), and
+# would wrongly misinterpret that as and indication that make is running
+# in dry mode.  This has already happened in practice.  So we need the
+# hack with $(subst \ , ...).
 am.make.dry-run := \
   $(strip $(if $(strip \
     $(foreach v, $(subst \ ,,$(strip $(MAKEFLAGS))), \
@@ -151,8 +142,8 @@ am.make.dry-run := \
 am.util.strip-first-word = $(wordlist 2,$(words $(1)),$(1))
 am.util.strip-last-word  = $(wordlist 2,$(words $(1)),dummy $(1))
 
-## Remove repeated elements from the given list (without reordering),
-## and return the reduced list.
+# Remove repeated elements from the given list (without reordering),
+# and return the reduced list.
 am.util.uniq = $(strip \
 ## If the list is empty, we have nothing to do.  Otherwise, go on.
   $(if $(strip $(1)), \
@@ -221,34 +212,34 @@ am.util.canon = $(strip \
   $(subst !,_,$1)))))))))))))))))))))))))))))))
 
 
-## Simple memoization for recursive make variables.  It is useful for
-## situations where immediate variables can't be used (due, say, to
-## ordering issues with the assignments of the referenced variables),
-## but where the value of the lazy variable is costly to calculate
-## (e.g., a $(shell ...) call with a non-trivial command line), so that
-## we can't afford to re-calculate it over and over every time the
-## variable gets expanded.  Example of usage:
-##
-##   var1 = $(am.memoize,var1,$(shell EXPENSIVE-COMMAND-LINE))
-##   var2 = $(am.memoize,var2,$(sort VERY-LONG-LIST))
-##
-## This API and implementation seems to work around a bug in GNU make
-## (present up to and including version 3.82) which caused our first
-## implementation attempts to fail:
-##
-##   <http://lists.gnu.org/archive/html/bug-make/2012-05/msg00013.html>
-##   <https://savannah.gnu.org/patch/?7534>
-##
-## So please don't change this without a very good reason.
-##
+# Simple memoization for recursive make variables.  It is useful for
+# situations where immediate variables can't be used (due, say, to
+# ordering issues with the assignments of the referenced variables),
+# but where the value of the lazy variable is costly to calculate
+# (e.g., a $(shell ...) call with a non-trivial command line), so that
+# we can't afford to re-calculate it over and over every time the
+# variable gets expanded.  Example of usage:
+#
+#   var1 = $(am.memoize,var1,$(shell EXPENSIVE-COMMAND-LINE))
+#   var2 = $(am.memoize,var2,$(sort VERY-LONG-LIST))
+#
+# This API and implementation seems to work around a bug in GNU make
+# (present up to and including version 3.82) which caused our first
+# implementation attempts to fail:
+#
+#   <http://lists.gnu.org/archive/html/bug-make/2012-05/msg00013.html>
+#   <https://savannah.gnu.org/patch/?7534>
+#
+# So please don't change this without a very good reason.
+#
 am.memoize = $(or $(am.memoize.value/$1),$(strip \
   $(eval am.memoize.value/$1 := $$2))$(am.memoize.value/$1))
 
-## $(call am.util.strip-suffixes, SUFFIXES, LIST)
-## ----------------------------------------------
-## Strip any of the SUFFIXES from each of the entries of LIST.  Even if an
-## entry of LIST terminates with several suffixes, only one is stripped:
-## the first one that matches.
+# $(call am.util.strip-suffixes, SUFFIXES, LIST)
+# ----------------------------------------------
+# Strip any of the SUFFIXES from each of the entries of LIST.  Even if an
+# entry of LIST terminates with several suffixes, only one is stripped:
+# the first one that matches.
 am.hack.private-suffix = .,;&!@
 am.util.strip-suffixes = $(strip \
   $(if \
@@ -259,18 +250,20 @@ am.util.strip-suffixes = $(strip \
           $(patsubst %$(firstword $1),%$(am.hack.private-suffix),$2))), \
     $2))
 
-# Helper variables and function to help in recipes that could exceed
-# the command line length limit.
+# Now, some helper functions and variables to help in recipes that could
+# exceed the command line length limit.
 
-## FIXME: Forty aguments; this is basically arbitrary.  In the long term,
-## FIXME: defining this after a configure-time test on the command-line
-## FIXME: length limits, or at least on a system-by-system basis, might
-## FIXME: be better.  But don't make it too big, or our implementation
-## FIXME: will likely suffer in performance and memory consumption.
 # And in the Information Age, we somehow managed to revert to abacus-like
 # counting.  Yay for us :-)
 am.max-cmdline-args := xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
 
+# FIXME! The above accounts for max forty aguments; 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
+# the system would allow it), or our implementation will likely suffer in
+# performance and in memory consumption.
+
 # $(call am.xargs-map,FUNCTION,LIST)
 # ----------------------------------
 # Map the function $1 on the arguments $2, ensuring that each
@@ -301,11 +294,14 @@ am.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)
 
-## Some derived variables that have been found to be useful.
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
+# Some derived variables that have been found to be useful.
+# These have since long been documented in the Automake manual and used
+# by many real-world packages, so they are now an established feature
+# and should not be changed.
+pkgdatadir = $(datadir)/$(PACKAGE)
+pkgincludedir = $(includedir)/$(PACKAGE)
+pkglibdir = $(libdir)/$(PACKAGE)
+pkglibexecdir = $(libexecdir)/$(PACKAGE)
 
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
@@ -313,16 +309,11 @@ install_sh_SCRIPT = $(install_sh) -c
 INSTALL_HEADER = $(INSTALL_DATA)
 transform = $(program_transform_name)
 
-## These are defined because otherwise make on NetBSD V1.1 will print
-## (eg): $(NORMAL_INSTALL) expands to empty string.
+# These are defined like this to avoid introducing gratuitous
+# incompatibilities with mainline Automake.
 NORMAL_INSTALL = :
 PRE_INSTALL = :
 POST_INSTALL = :
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
-
-## dejagnu.am uses these variables.  Some users might rely on them too.
-?BUILD?build_triplet = @build@
-?HOST?host_triplet = @host@
-?TARGET?target_triplet = @target@
diff --git a/lib/am/parallel-tests.am b/lib/am/parallel-tests.am
index a318281..ac62fbc 100644
--- a/lib/am/parallel-tests.am
+++ b/lib/am/parallel-tests.am
@@ -28,19 +28,19 @@ include color-tests.am
 ## Used by (at least) 'check-typos.am'.
 am.conf.using-parallel-tests := yes
 
-am__is_xfail_test = \
-  $(if $(filter-out $(am__xfail_test_bases), \
+am.test-suite.is-xfail = \
+  $(if $(filter-out $(am.test-suite.xfail-test-bases), \
                     $(patsubst $(srcdir)/%,%,$(1))),no,yes)
-am__runtest = \
-  $(am__sh_e_setup);                                                   \
-  $(am__tty_colors);                                                   \
+
+am.test-suite.runtest = \
+  $(am.test-suite.tty-colors);                                         \
   srcdir=$(srcdir); export srcdir;                                     \
 ## Creates the directory for the log file if needed.  Avoid extra forks.
   test x$(@D) = x. || test -d $(@D) || $(MKDIR_P) $(@D) || exit $$?;   \
 ## We need to invoke the test in way that won't cause a PATH search.
 ## Quotes around '$<' are required to avoid extra errors when a circular
 ## dependency is detected (e.g., because $(TEST_SUITE_LOG) is in
-## $(am__test_logs)), because in that case '$<' expands to empty and an
+## $(am.test-suite.test-logs)), because in that case '$<' expands to empty and 
an
 ## unquote usage of it could cause syntax errors in the shell.
   case '$<' in */*) tst='$<';; *) tst=./'$<';; esac;                   \
 ## Executes the developer-defined and user-defined test
@@ -52,7 +52,7 @@ am__runtest = \
   --trs-file $*.trs                                                    \
   --color-tests "$$am__color_tests"                                    \
   --enable-hard-errors $(if $(DISABLE_HARD_ERRORS),no,yes)             \
-  --expect-failure $(call am__is_xfail_test,$*)                                
\
+  --expect-failure $(call am.test-suite.is-xfail,$*)                   \
   $(AM_$(1)LOG_DRIVER_FLAGS)                                           \
   $($(1)LOG_DRIVER_FLAGS)                                              \
   --                                                                   \
@@ -66,23 +66,23 @@ am__runtest = \
 am__tpfx = \
   $(if $1,$(call am.util.toupper,$(patsubst .%,%_,$1)))
 
-!define am__handle_per_suffix_test
+!define am.test-suite.handle-suffix
 !
 ## FIXME: This will pick up the default from the environment; are we sure
 ## FIXME: we want that?
 !$$(call am__tpfx,$1)LOG_DRIVER ?= $(SHELL) $(am.conf.aux-dir)/test-driver
 !
 !%.log %.trs: %$1 $$($$(call am__tpfx,$1)LOG_DEPENDENCIES)
-!      @$$(call am__runtest,$$(call am__tpfx,$1))
+!      @$$(call am.test-suite.runtest,$$(call am__tpfx,$1))
 !
 !ifeq ($(am.conf.handle-exeext),yes)
 !ifdef EXEEXT
 !%.log %.trs: %$1$(EXEEXT) $$($$(call am__tpfx,$1)LOG_DEPENDENCIES)
-!      @$$(call am__runtest,$$(call am__tpfx,$1))
+!      @$$(call am.test-suite.runtest,$$(call am__tpfx,$1))
 !endif # defined EXEEXT
 !endif # am.conf.handle-exeext = yes
 !
-!endef # am__handle_per_suffix_test
+!endef # am.test-suite.handle-suffix
 !
 ## FIXME: this will pick up the default from the environment; are we sure
 ## FIXME: we want that?
@@ -90,14 +90,14 @@ am__tpfx = \
 !$(foreach e,$(filter-out .%,$(TEST_EXTENSIONS)),\
 !     $(call am.error,invalid test extension: '$e'))
 !$(foreach e,$(TEST_EXTENSIONS), \
-!  $(eval $(call am__handle_per_suffix_test,$e)))
+!  $(eval $(call am.test-suite.handle-suffix,$e)))
 ## It is *imperative* that the "empty" suffix goes last.  Otherwise, a
 ## declaration like "TESTS = all.test" would cause GNU make to mistakenly
 ## try to build the 'all.log' and 'all.trs' files from a non-existent
 ## 'all' program (because the Makefile contains an explicit 'all' target,
 ## albeit .PHONY), rather than from the 'all.test' script, thus causing
 ## all sort of mishaps and confusion.
-!$(eval $(call am__handle_per_suffix_test))
+!$(eval $(call am.test-suite.handle-suffix))
 
 # The names of the given tests scripts with any possible registered
 # test extension removed, as well as any leading '$(srcdir)' component
@@ -108,27 +108,57 @@ am__tpfx = \
 #   TESTS = $(wildcard $(srcdir)/t[0-9][0-9]*.sh)
 # where removing the $(srcdir) from the $(wildcard) invocation would
 # cause the idiom to break in VPATH builds.
-am__get_test_bases = $(patsubst $(srcdir)/%,%,$(strip \
+am.test-suite.get-test-bases = $(patsubst $(srcdir)/%,%,$(strip \
 $(call am.util.strip-suffixes, $(TEST_EXTENSIONS), \
 ?!HANDLE-EXEEXT?             $(1))))
 ?HANDLE-EXEEXT?              $(patsubst %$(EXEEXT),%,$(1)))))
 
-am__recheck_rx = ^[    ]*:recheck:[    ]*
-am__global_test_result_rx = ^[         ]*:global-test-result:[         ]*
-am__test_result_rx = ^[        ]*:test-result:[        ]*
-am__copy_in_global_log_rx = ^[         ]*:copy-in-global-log:[         ]*
+am.test-suite.rx.recheck = ^[  ]*:recheck:[    ]*
+am.test-suite.rx.global-result = ^[    ]*:global-test-result:[         ]*
+am.test-suite.rx.result = ^[   ]*:test-result:[        ]*
+am.test-suite.rx.copy-in-global-log = ^[       ]*:copy-in-global-log:[         
]*
+
+# Some awk code fragments used by one another and eventually by the
+# 'check' and 'recheck' recipes.
+# Note that in those scripts we are careful to close all the '.trs' and
+# '.log' files once we are done with them.  This is done to avoid leaking
+# open file descriptors, which could cause serious problems when there
+# are many tests and thus lots of '.log' and '.trs' files to open (yes,
+# there would be problems even on Linux).
+
+am.test-suite.awk-functions = \
+  function error(msg) \
+  { \
+    print msg | "cat >&2"; \
+    exit_status = 1; \
+  } \
+  function input_error(file) \
+  { \
+    error("awk" ": cannot read \"" file "\""); \
+## Never leak file descriptors, not even on errors.
+    close ($$0 ".trs"); close ($$0 ".log"); \
+  }
+
+# Loop on the lines in the current '.trs' or '.log' file,
+# punting on I/O errors.
+am.test-suite.awk-io-loop/BEGIN = \
+  while ((rc = (getline line < ($$0 ".$1"))) != 0) { \
+    if (rc < 0) { input_error($$0 ".$1"); next; }
+am.test-suite.awk-io-loop/END = \
+  }; close ($$0 ".$1");
 
 # A command that, given a newline-separated list of test names on the
 # standard input, print the name of the tests that are to be re-run
 # upon "make recheck".
-am__list_recheck_tests = $(AWK) '{ \
+am.test-suite.list-tests-to-recheck = $(AWK) '{ \
 ## By default, we assume the test is to be re-run.
   recheck = 1; \
   while ((rc = (getline line < ($$0 ".trs"))) != 0) \
     { \
       if (rc < 0) \
         { \
-## If we've encountered an I/O error here, there are three possibilities:
+##
+## If we have encountered an I/O error here, there are three possibilities:
 ##
 ##  [1] The '.log' file exists, but the '.trs' does not; in this case,
 ##      we "gracefully" recover by assuming the corresponding test is
@@ -140,19 +170,19 @@ am__list_recheck_tests = $(AWK) '{ \
 ##
 ##  [3] We have encountered some corner-case problem (e.g., a '.log' or
 ##      '.trs' files somehow made unreadable, or issues with a bad NFS
-##      connection, or whatever); we don't handle such corner cases.
+##      connection, or whatever); we do not handle such corner cases.
 ##
           if ((getline line2 < ($$0 ".log")) < 0) \
            recheck = 0; \
           break; \
         } \
-      else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
+      else if (line ~ /$(am.test-suite.rx.recheck)[nN][Oo]/) \
 ## A directive explicitly specifying the test is *not* to be re-run.
         { \
           recheck = 0; \
           break; \
         } \
-      else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
+      else if (line ~ /$(am.test-suite.rx.recheck)[yY][eE][sS]/) \
         { \
 ## A directive explicitly specifying the test *is* to be re-run.
           break; \
@@ -161,10 +191,8 @@ am__list_recheck_tests = $(AWK) '{ \
     }; \
   if (recheck) \
     print $$0; \
-## Don't leak open file descriptors, as this could cause serious
-## problems when there are many tests (yes, even on Linux).
-  close ($$0 ".trs"); \
-  close ($$0 ".log"); \
+## Never leak file descriptors.
+  close ($$0 ".trs"); close ($$0 ".log"); \
 }'
 
 # A command that, given a newline-separated list of test names on the
@@ -173,41 +201,18 @@ am__list_recheck_tests = $(AWK) '{ \
 # the '.trs' files of that given tests.  For example, the count of
 # PASSes will be saved in the '$am_PASS' variable, the count of SKIPs
 # in the '$am_SKIP' variable, and so on.
-am__count_test_results = $(AWK) ' \
-## Don't leak open file descriptors, as this could cause serious
-## problems when there are many tests (yes, even on Linux).
-function close_current() \
-{ \
-  close ($$0 ".trs"); \
-  close ($$0 ".log"); \
-} \
-function error(msg) \
-{ \
-  print msg | "cat >&2"; \
-  exit_status = 1; \
-} \
-function input_error(file) \
-{ \
-  error("awk" ": cannot read \"" file "\""); \
-  close_current(); \
-} \
+am.test-suite.count-results = $(AWK) ' \
+$(am.test-suite.awk-functions) \
 BEGIN { exit_status = 0; } \
 { \
-  while ((rc = (getline line < ($$0 ".trs"))) != 0) \
-    { \
-      if (rc < 0) \
+  $(call am.test-suite.awk-io-loop/BEGIN,trs) \
+      if (line ~ /$(am.test-suite.rx.result)/) \
         { \
-          input_error($$0 ".trs"); \
-          next; \
-        } \
-      if (line ~ /$(am__test_result_rx)/) \
-        { \
-          sub("$(am__test_result_rx)", "", line); \
+          sub("$(am.test-suite.rx.result)", "", line); \
           sub("[:      ].*$$", "", line); \
           counts[line]++;\
         } \
-    }; \
-  close_current(); \
+  $(call am.test-suite.awk-io-loop/END,trs) \
 } \
 END { \
   if (exit_status != 0) \
@@ -227,24 +232,8 @@ END { \
 
 # A command that, given a newline-separated list of test names on the
 # standard input, create the global log from their .trs and .log files.
-am__create_global_log = $(AWK) ' \
-## Don't leak open file descriptors, as this could cause serious
-## problems when there are many tests (yes, even on Linux).
-function close_current() \
-{ \
-  close ($$0 ".trs"); \
-  close ($$0 ".log"); \
-} \
-function error(msg) \
-{ \
-  print msg | "cat >&2"; \
-  exit_status = 1; \
-} \
-function input_error(file) \
-{ \
-  error("awk" ": cannot read \"" file "\""); \
-  close_current(); \
-} \
+am.test-suite.create-global-log = $(AWK) ' \
+$(am.test-suite.awk-functions) \
 function rst_section(header) \
 { \
   print header; \
@@ -256,41 +245,28 @@ function rst_section(header) \
 BEGIN { exit_status = 0; } \
 { \
 ## By default, we assume the test log is to be copied in the global log,
-## and that its result is simply "RUN" (i.e., we still don't know what
+## and that its result is simply "RUN" (i.e., we still do not know what
 ## it outcome was, but we know that at least it has run).
   copy_in_global_log = 1; \
   global_test_result = "RUN"; \
-  while ((rc = (getline line < ($$0 ".trs"))) != 0) \
-    { \
-      if (rc < 0) \
+  $(call am.test-suite.awk-io-loop/BEGIN,trs) \
+      if (line ~ /$(am.test-suite.rx.global-result)/) \
         { \
-          input_error($$0 ".trs"); \
-          next; \
-        } \
-      if (line ~ /$(am__global_test_result_rx)/) \
-        { \
-          sub("$(am__global_test_result_rx)", "", line); \
+          sub("$(am.test-suite.rx.global-result)", "", line); \
           sub("[       ]*$$", "", line); \
           global_test_result = line; \
         } \
-      else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
+      else if (line ~ /$(am.test-suite.rx.copy-in-global-log)[nN][oO]/) \
         copy_in_global_log = 0; \
-    }; \
+  $(call am.test-suite.awk-io-loop/END,trs) \
   if (copy_in_global_log) \
     { \
       rst_section(global_test_result ": " $$0); \
-      while ((rc = (getline line < ($$0 ".log"))) != 0) \
-      { \
-        if (rc < 0) \
-          { \
-            input_error($$0 ".log"); \
-            next; \
-          } \
+      $(call am.test-suite.awk-io-loop/BEGIN,log) \
         print line; \
-      }; \
+      $(call am.test-suite.awk-io-loop/END,log) \
       printf "\n"; \
     }; \
-  close_current(); \
 } \
 END { \
   if (exit_status != 0) \
@@ -299,49 +275,51 @@ END { \
 }'
 
 # Restructured Text title.
-am__rst_title = { sed 's/.*/   &   /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
+am.test-suite.rst-title = { sed 's/.*/   &   /;h;s/./=/g;p;x;s/ *$$//;p;g' && 
echo; }
 
-# This supports runtime overriding of $(TESTS) and $(XFAIL_TESTS).
-!am__test_bases ?= \
-!  $(call am.memoize,am__test_bases,$(call am__get_test_bases,$(TESTS)))
-am__xfail_test_bases = \
-  $(call am.memoize,am__xfail_test_bases,$(call 
am__get_test_bases,$(XFAIL_TESTS)))
+# These support runtime overriding of $(TESTS) and $(XFAIL_TESTS).
+# The first one must be left overridable (hence the definition with '?=',
+# because the 'recheck' target need to override  it (and in a tricky way).
+!am.test-suite.test-bases ?= \
+!  $(call am.memoize,am.test-suite.test-bases,$(call 
am.test-suite.get-test-bases,$(TESTS)))
+am.test-suite.xfail-test-bases = \
+  $(call am.memoize,am.test-suite.xfail-test-bases,$(call 
am.test-suite.get-test-bases,$(XFAIL_TESTS)))
 
 # The $(strip) is to work around the GNU make 3.80 bug where trailing
 # whitespace in "TESTS = foo.test $(empty)" causes $(TESTS_LOGS) to
 # erroneously expand to "foo.log .log".
-am__test_results = \
-  $(call am.memoize,am__test_results,$(addsuffix .trs,$(strip 
$(am__test_bases))))
-am__test_logs = \
-  $(call am.memoize,am__test_logs,$(addsuffix .log,$(strip $(am__test_bases))))
+am.test-suite.test-results = \
+  $(call am.memoize,am.test-suite.test-results,$(addsuffix .trs,$(strip 
$(am.test-suite.test-bases))))
+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_results) $(am__test_logs)
+am__mostlyclean_files += $(am.test-suite.test-results) 
$(am.test-suite.test-logs)
 
 # $(TEST_LOGS) is a published interface.
-TEST_LOGS = $(am__test_logs)
+TEST_LOGS = $(am.test-suite.test-logs)
 
-am.test-harness.workdir = $(am__dir)/test-harness
+am.test-suite.workdir = $(am__dir)/test-harness
 
-am.test-harness.append-to-list-of-bases = \
+am.test-suite.append-to-list-of-bases = \
   @lst='$1'; for x in $$lst; do echo $$x; done \
-    >> $(am.test-harness.workdir)/bases$(am.chars.newline)
+    >> $(am.test-suite.workdir)/bases$(am.chars.newline)
 
 !define am.setup-test-harness-workdir
-!      @rm -rf $(am.test-harness.workdir)
-!      @$(MKDIR_P) $(am.test-harness.workdir)
-!      @touch $(am.test-harness.workdir)/bases
-!      $(call am.xargs-map,am.test-harness.append-to-list-of-bases, \
-!             $(am__test_bases))
-!      @workdir='$(am.test-harness.workdir)' \
+!      @rm -rf $(am.test-suite.workdir)
+!      @$(MKDIR_P) $(am.test-suite.workdir)
+!      @touch $(am.test-suite.workdir)/bases
+!      $(call am.xargs-map,am.test-suite.append-to-list-of-bases, \
+!             $(am.test-suite.test-bases))
+!      @workdir='$(am.test-suite.workdir)' \
 !        && sed 's/$$/.log/' $$workdir/bases > $$workdir/logs \
 !        && sed 's/$$/.trs/' $$workdir/bases > $$workdir/trs
 !endef
 
-$(TEST_SUITE_LOG): $(am__test_logs) $(am__test_results)
+$(TEST_SUITE_LOG): $(am.test-suite.test-logs) $(am.test-suite.test-results)
        $(am.setup-test-harness-workdir)
-       @$(am__sh_e_setup); $(am__tty_colors); \
+       @set +e; $(am.test-suite.tty-colors); \
        fatal () { echo "fatal: making $@: $$*" >&2; exit 1; }; \
-       workdir='$(am.test-harness.workdir)'; \
+       workdir='$(am.test-suite.workdir)'; \
 ## Detect a possible circular dependency, and error out if it's found.
        grep '^$(TEST_SUITE_LOG:.log=)$$' $$workdir/bases \
          && fatal "depends on itself (check TESTS content)"; \
@@ -349,7 +327,8 @@ $(TEST_SUITE_LOG): $(am__test_logs) $(am__test_results)
 ## unreadable test results, but they'll be appropriately updated later if
 ## needed.
        am_PASS=0 am_FAIL=0 am_SKIP=0 am_XPASS=0 am_XFAIL=0 am_ERROR=0; \
-       count_test_results_command=`$(am__count_test_results) <$$workdir/bases` 
\
+       count_test_results_command=`\
+         $(am.test-suite.count-results) <$$workdir/bases` \
          && eval "$$count_test_results_command" \
           || fatal "unknown error reading test results"; \
 ## Whether the testsuite was successful or not.
@@ -401,17 +380,17 @@ $(TEST_SUITE_LOG): $(am__test_logs) $(am__test_results)
        if {                                                            \
          st=0;                                                         \
          echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" |       \
-           $(am__rst_title);                                           \
+           $(am.test-suite.rst-title);                                 \
          create_testsuite_report --no-color;                           \
          echo;                                                         \
          echo ".. contents:: :depth: 2";                               \
          echo;                                                         \
-         $(am__create_global_log) <$$workdir/bases;                    \
+         $(am.test-suite.create-global-log) <$$workdir/bases;          \
        } >$(TEST_SUITE_LOG).tmp; then                                  \
          mv -f $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG);                \
        else                                                            \
-## The awk program in $(am__create_global_log) should have already emitted
-## a proper error message about I/O error, no need to repeat it.
+## The awk program in $(am.test-suite.create-global-log) should have already
+## emitted a proper error message about I/O error, no need to repeat it.
          rm -f $(TEST_SUITE_LOG).tmp; exit 1;                          \
        fi;                                                             \
 ## Emit the test summary on the console.
@@ -448,8 +427,8 @@ am__remove_if_not_lazy_check = \
   $(if $(filter yes,$(AM_LAZY_CHECK)),,$(call am.clean-cmd.f,$1))
 
 check-TESTS:
-       @$(call am__remove_if_not_lazy_check,$(am__test_results))
-       @$(call am__remove_if_not_lazy_check,$(am__test_logs))
+       @$(call am__remove_if_not_lazy_check,$(am.test-suite.test-results))
+       @$(call am__remove_if_not_lazy_check,$(am.test-suite.test-logs))
 ## We always have to remove TEST_SUITE_LOG, to ensure its rule is run
 ## in any case even in lazy mode: otherwise, if no test needs rerunning,
 ## or a prior run plus reruns all happen within the same timestamp (can
@@ -470,12 +449,12 @@ recheck: all %CHECK_DEPS%
        @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
 ## If running a "make recheck", we must only consider tests that had an
 ## unexpected outcome (FAIL or XPASS) in the earlier run.
-       @bases=`$(am__list_recheck_tests) \
-                 <$(am.test-harness.workdir)/bases` || exit 1; \
+       @bases=`$(am.test-suite.list-tests-to-recheck) \
+                 <$(am.test-suite.workdir)/bases` || exit 1; \
 ## Remove newlines and normalize whitespace.
        bases=`echo $$bases`; \
 ## Re-run the relevant tests, without hitting command-line length limits.
-       echo am__test_bases="$$bases" | \
+       echo am.test-suite.test-bases="$$bases" | \
          $(MAKE) -f- -f$(firstword $(MAKEFILE_LIST)) \
                  $(TEST_SUITE_LOG) .am/doing-recheck=yes
 .PHONY: recheck
@@ -487,7 +466,7 @@ recheck: all %CHECK_DEPS%
 ## and re-run it (automake bug#11791).  This indirection is aimed at
 ## satisfying such a requirement.
 !ifeq ($(.am/doing-recheck),yes)
-!$(am__test_logs) $(am__test_results): .am/nil
+!$(am.test-suite.test-logs) $(am.test-suite.test-results): .am/nil
 !endif
 
 AM_RECURSIVE_TARGETS += check recheck
diff --git a/lib/am/serial-tests.am b/lib/am/serial-tests.am
index 8850dbb..c6d7089 100644
--- a/lib/am/serial-tests.am
+++ b/lib/am/serial-tests.am
@@ -39,7 +39,7 @@ check-TESTS: $(am__cooked_tests)
        @failed=0; all=0; xfail=0; xpass=0; skip=0; \
        srcdir=$(srcdir); export srcdir; \
        list='$(am__cooked_tests)'; \
-       $(am__tty_colors); \
+       $(am.test-suite.tty-colors); \
        is_xfail_test () { \
          case " $(strip $(am__cooked_xfail_tests)) " in \
            *" $$tst "*) return 0;; \
diff --git a/lib/tap-driver.pl b/lib/tap-driver.pl
index c15d2b5..50fa6b5 100755
--- a/lib/tap-driver.pl
+++ b/lib/tap-driver.pl
@@ -49,7 +49,7 @@ END
 my $HELP = "$ME: TAP-aware test driver for Automake testsuite harness." .
            "\n" . $USAGE;
 
-# Keep this in sync with `lib/am/check.am:$(am__tty_colors)'.
+# Keep in sync with 'lib/am/color-tests.am:$(am.test-suite.tty-colors)'.
 my %COLOR = (
   red => "\e[0;31m",
   grn => "\e[0;32m",
diff --git a/lib/test-driver b/lib/test-driver
index c29e726..56d2816 100755
--- a/lib/test-driver
+++ b/lib/test-driver
@@ -74,7 +74,7 @@ while test $# -gt 0; do
 done
 
 if test $color_tests = yes; then
-  # Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
+  # Keep in sync with 'lib/am/color-tests.am:$(am.test-suite.tty-colors)'.
   red='' # Red.
   grn='' # Green.
   lgn='' # Light green.
diff --git a/runtest.in b/runtest.in
index 31f8e01..c2c5d1f 100644
--- a/runtest.in
+++ b/runtest.in
@@ -16,7 +16,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Run an Automake test from the command line.
-# Usage:
 
 set -e; set -u
 
@@ -24,28 +23,77 @@ set -e; set -u
 : ${AM_PROVE_CMD='prove'}
 : ${AM_PROVEFLAGS='--merge --verbose'}
 : ${srcdir='@srcdir@'}
+: ${abs_srcdir='@abs_srcdir@'}
+: ${abs_builddir='@abs_builddir@'}
+: ${PATH_SEPARATOR='@PATH_SEPARATOR@'}
+
+# For sourcing of extra "shell libraries" by our test scripts.  As per
+# POSIX, sourcing a file with '.' will cause it to be looked up in $PATH
+# in case it is given with a relative name containing no slashes.
+if test "$srcdir" != .; then
+  PATH=$abs_srcdir/t/ax$PATH_SEPARATOR$PATH
+fi
+PATH=$abs_builddir/t/ax$PATH_SEPARATOR$PATH
+export PATH
+
+# For use by the testsuite framework.  The Automake test harness
+# define this, so we better do the same.
+export srcdir
+
+# Some testsuite-influential variables should be overridable from the
+# test scripts, but not from the environment.
+# Keep this in sync with the 'Makefile.am:AM_TESTS_ENVIRONMENT'.
+for v in \
+  required \
+  am_test_protocol \
+  am_serial_tests \
+  am_test_prefer_config_shell \
+  am_original_AUTOMAKE \
+  am_original_ACLOCAL \
+  am_test_lib_sourced \
+  test_lib_sourced \
+; do
+  eval "$v= && unset $v" || exit 1
+done
+unset v
 
 error () { echo "$0: $*" >&2; exit 255; }
 
 # Some shell flags should be passed over to the test scripts.
-#while test $# -gt 0; do
-#  case $1 in
-#    --help) echo "Usage: $0 [SHELL-OPTIONS] TEST [TEST-OPTIONS]"; exit $?;;
-#    -*)
-#  esac
-#done
+shell_opts=
+while test $# -gt 0; do
+  case $1 in
+    --help)
+       echo "Usage: $0 [--shell=PATH] [SHELL-OPTIONS] TEST [TEST-OPTIONS]"
+       exit $?
+       ;;
+    --shell)
+       test $# -gt 1 || error "missing argument for option '$1'"
+       AM_TEST_RUNNER_SHELL=$2
+       shift
+       ;;
+    --shell=*)
+       AM_TEST_RUNNER_SHELL=${1#--shell=}
+       ;;
+    -o)
+       test $# -gt 1 || error "missing argument for option '$1'"
+       shell_opts="$shell_opts -o $2"
+       shift
+       ;;
+    -*)
+       # Assume it is an option to pass through to the shell.
+       shell_opts="$shell_opts $1";;
+     *)
+       break;;
+  esac
+  shift
+done
 
 test $# -gt 0 || error "missing argument"
 
 tst=$1; shift
 
 case $tst in
-   *.sh) wrapper () { exec "$@"; };;
-  *.tap) wrapper () { exec "$AM_PROVE_CMD" $AM_PROVEFLAGS -e "$@"; };;
-      *) error "test '$tst' has an unrecognized extension";;
-esac
-
-case $tst in
   /*) ;;
    *) if test -f ./$tst; then
         tst=./$tst
@@ -58,5 +106,14 @@ case $tst in
       ;;
 esac
 
-wrapper "$AM_TEST_RUNNER_SHELL" "$tst" "$@"
+case $tst in
+  *.sh)
+    exec $AM_TEST_RUNNER_SHELL $shell_opts "$tst" "$@" ;;
+  *.tap)
+    exec "$AM_PROVE_CMD" $AM_PROVEFLAGS -e \
+         "$AM_TEST_RUNNER_SHELL $shell_opts" "$tst" "$@" ;;
+  *)
+    error "test '$tst' has an unrecognized extension" ;;
+esac
+
 error "dead code reached"
diff --git a/syntax-checks.mk b/syntax-checks.mk
index b1e1203..fc1a868 100644
--- a/syntax-checks.mk
+++ b/syntax-checks.mk
@@ -31,7 +31,11 @@ xtests := $(shell \
      done; \
    done | sort)
 
-xdefs = $(srcdir)/t/ax/test-init.sh $(srcdir)/defs $(srcdir)/defs-static.in
+xdefs = \
+  $(srcdir)/t/ax/am-test-lib.sh \
+  $(srcdir)/t/ax/test-lib.sh \
+  $(srcdir)/t/ax/test-defs.in \
+  $(srcdir)/defs
 
 ams := $(shell find $(srcdir) -name '*.dir' -prune -o -name '?*.am' -a -print)
 pms := $(dist_perllib_DATA)
@@ -324,9 +328,9 @@ sc_no_am_makeflags:
 modern.DISTFILES = am.dist.all-files
 modern.DIST_COMMON = am.dist.common-files
 modern.DIST_SOURCES = am.dist.sources
-modern.am__TEST_BASES = am__test_bases
-modern.am__TEST_LOGS = am__test_logs
-modern.am__TEST_RESULTS = am__test_results
+modern.am__TEST_BASES = am.test-suite.test-bases
+modern.am__TEST_LOGS = am.test-suite.test-logs
+modern.am__TEST_RESULTS = am.test-suite.test-results
 modern.CONFIG_HEADER = AM_CONFIG_HEADERS
 modern.DEFAULT_INCLUDES = AM_DEFAULT_INCLUDES
 
@@ -421,6 +425,7 @@ sc_docs_no_make_e:
 sc_tests_obsolete_variables:
        @vars=" \
          using_tap \
+         am_using_tap \
          test_prefer_config_shell \
          original_AUTOMAKE \
          original_ACLOCAL \
diff --git a/t/README b/t/README
index 1f2470b..570b667 100644
--- a/t/README
+++ b/t/README
@@ -232,7 +232,7 @@ Writing test cases
   example, if you need to copy or grep an Automake-NG provided script,
   do not assume that they can be found in the '$top_srcdir/lib'
   directory, but use '$am_scriptdir' instead.  The complete list of
-  such "$am_...dir" variables can be found in the 'defs-static.in'
+  such "$am_...dir" variables can be found in the 't/ax/test-defs.in'
   file.
 
 * When writing input for lex, include the following in the definitions
diff --git a/t/ax/test-init.sh b/t/ax/am-test-lib.sh
similarity index 71%
rename from t/ax/test-init.sh
rename to t/ax/am-test-lib.sh
index fa479af..43585dc 100644
--- a/t/ax/test-init.sh
+++ b/t/ax/am-test-lib.sh
@@ -19,56 +19,16 @@
 ###  IMPORTANT NOTE: keep this file 'set -e' clean.  ###
 ########################################################
 
-# Enable the errexit shell flag early.
-set -e
-
-
-## --------------------- ##
-##  Early sanity checks. ##
-## --------------------- ##
-
-# Ensure $am_top_srcdir is set correctly.
-test -f "$am_top_srcdir/defs-static.in" || {
-   echo "$me: $am_top_srcdir/defs-static.in not found," \
-        "check \$am_top_srcdir" >&2
-   exit 99
-}
-
-# Ensure $am_top_builddir is set correctly.
-test -f "$am_top_builddir/defs-static" || {
-   echo "$me: $am_top_builddir/defs-static not found," \
-        "check \$am_top_builddir" >&2
-   exit 99
-}
-
-
-## ------------------ ##
-##  Early variables.  ##
-## ------------------ ##
+# Do not source several times.
+test ${am_test_lib_sourced-no} = yes && return 0
+am_test_lib_sourced=yes
 
-# A single whitespace character.
-sp=' '
-# A tabulation character.
-tab='  '
-# A newline character.
-nl='
-'
 # A literal escape character.  Used by test checking colored output.
 esc=''
 
-# As autoconf-generated configure scripts do, ensure that IFS
-# is defined initially, so that saving and restoring $IFS works.
-IFS=$sp$tab$nl
-
-
-## ----------------------- ##
-##  Early debugging info.  ##
-## ----------------------- ##
-
-echo "Running from installcheck: $am_running_installcheck"
-echo "Using TAP: $am_using_tap"
-echo "PATH = $PATH"
-
+# This might be used in testcases checking distribution-related features.
+# Test scripts are free to override this if they need to.
+distdir=$me-1.0
 
 ## ---------------------- ##
 ##  Environment cleanup.  ##
@@ -126,56 +86,6 @@ unset pfx
 # Re-enable, it had been temporarily disabled above.
 set -e
 
-## ---------------------------- ##
-##  Auxiliary shell functions.  ##
-## ---------------------------- ##
-
-# Tell whether we should keep the test directories around, even in
-# case of success.  By default, we don't.
-am_keeping_testdirs ()
-{
-  case $keep_testdirs in
-     ""|n|no|NO) return 1;;
-              *) return 0;;
-  esac
-}
-
-# This is used in '_am_exit' and in the exit trap.  See comments in
-# the latter for more information.
-am__test_skipped=no
-
-# We use a trap below for cleanup.  This requires us to go through
-# hoops to get the right exit status transported through the signal.
-# Turn off errexit here so that we don't trip the bug with OSF1/Tru64
-# sh inside this function (FIXME: is this still relevant now that we
-# require a POSIX shell?).
-_am_exit ()
-{
-  set +e
-  # See comments in the exit trap for the reason we do this.
-  test 77 = $1 && am__test_skipped=yes
-  # Spurious escaping to ensure we do not call our 'exit' alias.
-  (\exit $1); \exit $1
-}
-alias exit=_am_exit
-
-if test $am_using_tap = yes; then
-  am_funcs_file=tap-functions.sh
-else
-  am_funcs_file=plain-functions.sh
-fi
-
-if test -f "$am_testauxdir/$am_funcs_file"; then
-  . "$am_testauxdir/$am_funcs_file" || {
-    echo "$me: error sourcing $am_testauxdir/$am_funcs_file" >&2
-    exit 99
-  }
-else
-  echo "$me: $am_testauxdir/$am_funcs_file not found" >&2
-  exit 99
-fi
-unset am_funcs_file
-
 # cross_compiling
 # ---------------
 # Tell whether we are cross-compiling.  This is especially useful to skip
@@ -243,7 +153,7 @@ AUTOMAKE_run ()
   $AUTOMAKE ${1+"$@"} >stdout 2>stderr || am__got_rc=$?
   cat stderr >&2
   cat stdout
-  if test $am_using_tap != yes; then
+  if test $am_test_protocol = none; then
     test $am__got_rc -eq $am__exp_rc || exit 1
     return
   fi
@@ -316,41 +226,6 @@ grep_configure_help ()
   $EGREP "$2" am--our-help || exit 1
 }
 
-# seq_ - print a sequence of numbers
-# ----------------------------------
-# This function simulates GNU seq(1) portably.  Valid usages:
-#  - seq LAST
-#  - seq FIRST LAST
-#  - seq FIRST INCREMENT LAST
-seq_ ()
-{
-  case $# in
-    0) fatal_ "seq_: missing argument";;
-    1) seq_first=1  seq_incr=1  seq_last=$1;;
-    2) seq_first=$1 seq_incr=1  seq_last=$2;;
-    3) seq_first=$1 seq_incr=$2 seq_last=$3;;
-    *) fatal_ "seq_: too many arguments";;
-  esac
-  i=$seq_first
-  while test $i -le $seq_last; do
-    echo $i
-    i=$(($i + $seq_incr))
-  done
-}
-
-# rm_rf_ [FILES OR DIRECTORIES ...]
-# ---------------------------------
-# Recursively remove the given files or directory, also handling the case
-# of non-writable subdirectories.
-rm_rf_ ()
-{
-  test $# -gt 0 || return 0
-  # Ignore failures in find, we are only interested in failures of the
-  # final rm.
-  find "$@" -type d ! -perm -700 -exec chmod u+rwx {} \; || :
-  rm -rf "$@"
-}
-
 # count_test_results total=N pass=N fail=N xpass=N xfail=N skip=N error=N
 # -----------------------------------------------------------------------
 # Check that a testsuite run driven by the parallel-tests harness has
@@ -388,37 +263,6 @@ count_test_results ()
   )
 }
 
-commented_sed_unindent_prog='
-  /^$/b                    # Nothing to do for empty lines.
-  x                        # Get x<indent> into pattern space.
-  /^$/{                    # No prior x<indent>, go prepare it.
-    g                      # Copy this 1st non-blank line into pattern space.
-    s/^\(['"$tab"' ]*\).*/x\1/   # Prepare x<indent> in pattern space.
-  }                        # Now: x<indent> in pattern and <line> in hold.
-  G                        # Build x<indent>\n<line> in pattern space, and
-  h                        # duplicate it into hold space.
-  s/\n.*$//                # Restore x<indent> in pattern space, and
-  x                        # exchange with the above duplicate in hold space.
-  s/^x\(.*\)\n\1//         # Remove leading <indent> from <line>.
-  s/^x.*\n//               # Restore <line> when there is no leading <indent>.
-'
-
-# unindent [input files...]
-# -------------------------
-# Remove the "proper" amount of leading whitespace from the given files,
-# and output the result on stdout.  That amount is determined by looking
-# at the leading whitespace of the first non-blank line in the input
-# files.  If no input file is specified, standard input is implied.
-unindent ()
-{
-  if test x"$sed_unindent_prog" = x; then
-    sed_unindent_prog=$(printf '%s\n' "$commented_sed_unindent_prog" \
-                          | sed -e "s/  *# .*//")
-  fi
-  sed "$sed_unindent_prog" ${1+"$@"}
-}
-sed_unindent_prog="" # Avoid interferences from the environment.
-
 # get_shell_script SCRIPT-NAME
 # -----------------------------
 # Fetch an Automake-provided shell script from the 'lib/' directory into
@@ -542,25 +386,12 @@ require_compiler_ ()
 ##  required by them.                                          ##
 ## ----------------------------------------------------------- ##
 
-# Performance tests must be enabled explicitly.
-case $argv0 in
-  */perf/*)
-    case $AM_TESTSUITE_PERF in
-      [yY]|[yY]es|1) ;;
-      *) skip_ "performance tests not explicitly enabled" ;;
-    esac
-    ;;
-esac
-
-# Look for (and maybe set up) required tools and/or system features; skip
-# the current test if they are not found.
-for tool in : $required
-do
-  # Check that each required tool is present.
-  case $tool in
-    :) ;;
+require_tool ()
+{
+  am_tool=$1
+  case $1 in
     cc|c++|fortran|fortran77)
-      require_compiler_ $tool;;
+      require_compiler_ $1;;
     xsi-lib-shell)
       if test x"$am_test_prefer_config_shell" = x"yes"; then
         require_xsi "$SHELL"
@@ -754,94 +585,40 @@ do
       ;;
     *)
       # Generic case: the tool must support --version.
-      echo "$me: running $tool --version"
-      # It is not likely but possible that $tool is a special builtin,
-      # in which case the shell is allowed to exit after an error.  So
-      # we need the subshell here.  Also, some tools, like Sun cscope,
+      echo "$me: running $1 --version"
+      # It is not likely but possible that the required tool is a special
+      # builtin, in which case the shell is allowed to exit after an error.
+      # So we need the subshell here.  Also, some tools, like Sun cscope,
       # can be interactive without redirection.
-      ($tool --version) </dev/null \
-        || skip_all_ "required program '$tool' not available"
+      ($1 --version) </dev/null \
+        || skip_all_ "required program '$1' not available"
       ;;
   esac
-done
-
-# We might need extra macros, e.g., from Libtool or Gettext.
-case " $required " in *\ libtool*) . ./t/libtool-macros.dir/get.sh;; esac
-case " $required " in *\ gettext*) . ./t/gettext-macros.dir/get.sh;; esac
+}
 
+process_requirements ()
+{
+  # Look for (and maybe set up) required tools and/or system features;
+  # skip the current test if they are not found.
+  for am_tool in $*; do
+    require_tool $am_tool
+  done
+  unset am_tool
+  # We might need extra macros, e.g., from Libtool or Gettext.
+  case " $required " in
+    *\ libtool*) . ./t/libtool-macros.dir/get.sh;;
+  esac
+  case " $required " in
+    *\ gettext*) . ./t/gettext-macros.dir/get.sh;;
+  esac
+}
 
 ## ---------------------------------------------------------------- ##
 ##  Create and set up of the temporary directory used by the test.  ##
-##  Set up of the exit trap for cleanup of said directory.          ##
 ## ---------------------------------------------------------------- ##
 
-# This might be used in testcases checking distribution-related features.
-# Test scripts are free to override this if they need to.
-distdir=$me-1.0
-
-# Set up the exit trap.
-trap 'exit_status=$?
-  set +e
-  cd "$am_top_builddir"
-  if test $am_using_tap = yes; then
-    if test "$planned_" = later && test $exit_status -eq 0; then
-      plan_ "now"
-    fi
-    test $exit_status -eq 0 && test $tap_pass_count_ -eq $tap_count_ \
-      || keep_testdirs=yes
-  else
-    # This is to ensure that a test script does give a SKIP outcome just
-    # because a command in it happens to exit with status 77.  This
-    # behaviour, while from time to time useful to developers, is not
-    # meant to be enabled by default, as it could cause spurious failures
-    # in the wild.  Thus it will be enabled only when the variable
-    # "am_explicit_skips" is set to a "true" value.
-    case $am_explicit_skips in
-      [yY]|[yY]es|1)
-        if test $exit_status -eq 77 && test $am__test_skipped != yes; then
-          echo "$me: implicit skip turned into failure"
-          exit_status=78
-        fi;;
-    esac
-    test $exit_status -eq 0 || keep_testdirs=yes
-  fi
-  am_keeping_testdirs || rm_rf_ $am_test_subdir
-  set +x
-  echo "$me: exit $exit_status"
-  # Spurious escaping to ensure we do not call our "exit" alias.
-  \exit $exit_status
-' 0
-trap "fatal_ 'caught signal SIGHUP'" 1
-trap "fatal_ 'caught signal SIGINT'" 2
-trap "fatal_ 'caught signal SIGTERM'" 15
-# Various shells seems to just ignore SIGQUIT under some circumstances,
-# even if the signal is not blocked; however, if the signal it trapped,
-# the trap gets correctly executed.  So we also trap SIGQUIT.
-# Here is a list of some shells that have been verified to exhibit the
-# problematic behavior with SIGQUIT:
-#  - zsh 4.3.12 on Debian GNU/Linux
-#  - /bin/ksh and /usr/xpg4/bin/sh on Solaris 10
-#  - Bash 3.2.51 on Solaris 10 and bash 4.1.5 on Debian GNU/Linux
-#  - AT&T ksh on Debian Gnu/Linux (deb package ksh, version 93u-1)
-# OTOH, at least these shells that do *not* exhibit that behaviour:
-#  - modern version of the Almquist Shell (at least 0.5.5.1), on
-#    both Solaris and GNU/Linux
-#  - public domain Korn Shell, version 5.2.14, on Debian GNU/Linux
-trap "fatal_ 'caught signal SIGQUIT'" 3
-# Ignore further SIGPIPE in the trap code.  This is required to avoid
-# a very weird issue with some shells, at least when the execution of
-# the automake testsuite is driven by the 'prove' utility: if prove
-# (or the make process that has spawned it) gets interrupted with
-# Ctrl-C, the shell might go in a loop, continually getting a SIGPIPE,
-# sometimes finally dumping core, other times hanging indefinitely.
-# See also Test::Harness bug [rt.cpan.org #70855], archived at
-# <https://rt.cpan.org/Ticket/Display.html?id=70855>
-trap "trap '' 13; fatal_ 'caught signal SIGPIPE'" 13
-
-# Create and populate the temporary directory, if and as required.
-if test x"$am_create_testdir" = x"no"; then
-  am_test_subdir=
-else
+am_setup_testdir ()
+{
   # The subdirectory where the current test script will run and write its
   # temporary/data files.  This will be created shortly, and will be removed
   # by the cleanup trap below if the test passes.  If the test doesn't pass,
@@ -876,12 +653,11 @@ else
       echo "AC_CONFIG_FILES([Makefile])"
     } >configure.ac || framework_failure_ "creating configure.ac skeleton"
   fi
-fi
-
-
-## ---------------- ##
-##  Ready to go...  ##
-## ---------------- ##
+}
 
-set -x
-pwd
+am_extra_info ()
+{
+  echo "Running from installcheck: $am_running_installcheck"
+  echo "Test Protocol: $am_test_protocol"
+  echo "PATH = $PATH"
+}
diff --git a/t/ax/plain-functions.sh b/t/ax/plain-functions.sh
deleted file mode 100644
index 6c5fef8..0000000
--- a/t/ax/plain-functions.sh
+++ /dev/null
@@ -1,40 +0,0 @@
-# -*- shell-script -*-
-#
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Helper functions used by "plain" tests of the Automake testsuite
-# (i.e., tests that don't use any test protocol).
-
-# Print warnings (e.g., about skipped and failed tests) to this file
-# number.  Override by putting, say:
-#   AM_TESTS_ENVIRONMENT = stderr_fileno_=9; export stderr_fileno_;
-#   AM_TESTS_FD_REDIRECT = 9>&2
-# in your Makefile.am.
-# This is useful when using automake's parallel tests mode, to print the
-# reason for skip/failure to console, rather than to the *.log files.
-: ${stderr_fileno_=2}
-
-# Copied from Gnulib's 'tests/init.sh'.
-warn_ () { echo "$@" 1>&$stderr_fileno_; }
-fail_ () { warn_ "$me: failed test: $@"; exit 1; }
-skip_ () { warn_ "$me: skipped test: $@"; exit 77; }
-fatal_ () { warn_ "$me: hard error: $@"; exit 99; }
-framework_failure_ () { warn_ "$me: set-up failure: $@"; exit 99; }
-
-# For compatibility with TAP functions.
-skip_all_ () { skip_ "$@"; }
-
-:
diff --git a/t/ax/tap-setup.sh b/t/ax/tap-setup.sh
index 70487c3..952a49d 100644
--- a/t/ax/tap-setup.sh
+++ b/t/ax/tap-setup.sh
@@ -22,7 +22,7 @@
 
 # Check that we are running from a proper directory: last thing we want
 # is to overwrite some random user files.
-test -f ../../defs-static && test -f ../../defs && test -d ../../t \
+test -f ../../automake && test -f ../../defs && test -d ../../t \
   || fatal_ "running from a wrong directory"
 
 test ! -f Makefile.am || mv Makefile.am Makefile.am~ \
diff --git a/defs-static.in b/t/ax/test-defs.in
similarity index 73%
rename from defs-static.in
rename to t/ax/test-defs.in
index 6901212..56b45e1 100644
--- a/defs-static.in
+++ b/t/ax/test-defs.in
@@ -21,74 +21,15 @@
 # IMPORTANT NOTES AND REQUIREMENTS
 #   - Multiple inclusions of this file should be idempotent.
 #   - This code has to be 'set -e' clean.
-#   - This file should execute correctly with any system's /bin/sh
-#     shell, not only with configure-time detected $SHELL and/or
-#     $AM_TEST_RUNNER_SHELL.
-
-# CDPATH is evil if exported in the environment.
-CDPATH=; unset CDPATH
-
-# Be more Bourne compatible.
-# (Snippet inspired to configure's initialization in Autoconf 2.64)
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  setopt NO_GLOB_SUBST
-  # If Zsh is not started directly in POSIX-compatibility mode, it has some
-  # incompatibilities in the handling of $0 that conflict with our usage;
-  # i.e., $0 inside a file sourced with the '.' builtin is temporarily set
-  # to the name of the sourced file.  Work around that.
-  # Note that a bug in some versions of Zsh prevents us from resetting $0
-  # in a sourced script, so the use of $argv0.  For more info see:
-  #   <http://www.zsh.org/mla/workers/2009/msg01140.html>
-  # The apparently useless 'eval' here is needed by at least dash 0.5.2,
-  # to prevent it from bailing out with an error like:
-  #   "Syntax error: Bad substitution".
-  eval 'argv0=${functrace[-1]%:*}' && test -f "$argv0" || {
-    echo "Cannot determine the path of running test script." >&2
-    echo "Your Zsh (version $ZSH_VERSION) is probably too old." >&2
-    exit 99
-  }
-else
-  argv0=$0
-  # Avoid command substitution failure, for Tru64 sh -e and instspc*.test.
-  case `(set -o) 2>/dev/null || :` in *posix*) set -o posix;; esac
-fi
-
-# The name of the current test (without the '.sh' or '.tap' suffix).
-me=${argv0##*/} # Strip all directory components.
-case $me in     # Strip test suffix.
-   *.tap) me=${me%.tap};;
-    *.sh) me=${me%.sh} ;;
- esac
-
-# Check that the environment is properly sanitized.
-# Having variables exported to the empty string is OK, since our code
-# treats such variables as if they were unset.
-for var in \
-  required \
-  am_using_tap \
-  am_serial_tests \
-  am_create_testdir \
-  am_tap_implementation \
-  am_test_prefer_config_shell \
-  am_original_AUTOMAKE \
-  am_original_ACLOCAL \
-; do
-  if eval "test x\"\$$var\" != x" && env | grep "^$var=" >/dev/null; then
-    echo "$me: variable '$var' is set in the environment:" \
-         "this is unsafe" >&2
-    exit 99
-  fi
-done
-unset var
 
 # See whether the current test script is expected to use TAP or not.
 # Use a sensible default, while allowing the scripts to override this
 # check.
-if test -z "$am_using_tap"; then
-  case $argv0 in *.tap) am_using_tap=yes;; *) am_using_tap=no;; esac
+if test -z "$am_test_protocol"; then
+  case $argv0 in
+    *.tap) am_test_protocol=tap;;
+        *) am_test_protocol=none;;
+  esac
 fi
 
 am_rel_srcdir='@srcdir@'
@@ -162,8 +103,8 @@ 
AUTOUPDATE=${AM_TESTSUITE_AUTOUPDATE-${AUTOUPDATE-'@am_AUTOUPDATE@'}}
 
 # Tests who want complete control over aclocal or automake command-line
 # options should use $am_original_ACLOCAL or $am_original_AUTOMAKE.  The
-# "test -z" tests take care not to re-initialize them if defs-static
-# is re-sourced, as we want defs-static to remain really idempotent.
+# "test -z" tests take care not to re-initialize them if 'test-defs.sh'
+# is re-sourced, as we want that file to remain really idempotent.
 if test -z "$am_original_AUTOMAKE"; then
   
am_original_AUTOMAKE=${AM_TESTSUITE_AUTOMAKE-${AUTOMAKE-"automake-$APIVERSION"}}
 fi
@@ -240,7 +181,4 @@ case $PATH in
   *) PATH=$am_bindir$PATH_SEPARATOR$PATH;;
 esac
 
-# Make our helper script accessible by default.
-PATH=$am_testauxdir$PATH_SEPARATOR$PATH
-
 export PATH
diff --git a/t/ax/test-lib.sh b/t/ax/test-lib.sh
new file mode 100644
index 0000000..6048f81
--- /dev/null
+++ b/t/ax/test-lib.sh
@@ -0,0 +1,296 @@
+# -*- shell-script -*-
+#
+# Copyright (C) 1996-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/>.
+
+########################################################
+###  IMPORTANT NOTE: keep this file 'set -e' clean.  ###
+########################################################
+
+# Do not source several times.
+test ${test_lib_sourced-no} = yes && return 0
+test_lib_sourced=yes
+
+# CDPATH is evil if used in non-interactive scripts (and even more
+# evil if exported in the environment).
+CDPATH=; unset CDPATH
+
+# Be more Bourne compatible.
+# (Snippet inspired to configure's initialization in Autoconf 2.64)
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  setopt NO_GLOB_SUBST
+  # If Zsh is not started directly in POSIX-compatibility mode, it has some
+  # incompatibilities in the handling of $0 that conflict with our usage;
+  # i.e., $0 inside a file sourced with the '.' builtin is temporarily set
+  # to the name of the sourced file.  Work around that.
+  # Note that a bug in some versions of Zsh prevents us from resetting $0
+  # in a sourced script, so the use of $argv0.  For more info see:
+  #   <http://www.zsh.org/mla/workers/2009/msg01140.html>
+  # The apparently useless 'eval' here is needed by at least dash 0.5.2,
+  # to prevent it from bailing out with an error like:
+  #   "Syntax error: Bad substitution".
+  eval 'argv0=${functrace[-1]%:*}' && test -f "$argv0" || {
+    echo "Cannot determine the path of running test script." >&2
+    echo "Your Zsh (version $ZSH_VERSION) is probably too old." >&2
+    exit 99
+  }
+else
+  argv0=$0
+  # Avoid command substitution failure, for it might cause problems with
+  # "set -e" on some shells.
+  case `(set -o) 2>/dev/null || :` in *posix*) set -o posix;; esac
+fi
+
+# A single whitespace character.
+sp=' '
+# A tabulation character.
+tab='  '
+# A newline character.
+nl='
+'
+
+# As autoconf-generated configure scripts do, ensure that IFS
+# is defined initially, so that saving and restoring $IFS works.
+IFS=$sp$tab$nl
+
+# The name of the current test (without the '.sh' or '.tap' suffix).
+me=${argv0##*/} # Strip all directory components.
+case $me in     # Strip test suffix.
+   *.tap) me=${me%.tap};;
+    *.sh) me=${me%.sh} ;;
+ esac
+
+# Source extra package-specific configuration.
+. test-defs.sh
+# And fail hard if something went wrong.
+test $? -eq 0 || exit 99
+
+# We use a trap below for cleanup.  This requires us to go through
+# hoops to get the right exit status transported through the signal.
+# Turn off errexit here so that we don't trip the bug with OSF1/Tru64
+# sh inside this function (FIXME: is this still relevant now that we
+# require a POSIX shell?).
+_am_exit ()
+{
+  set +e
+  # See comments in the exit trap for the reason we do this.
+  test 77 = $1 && am__test_skipped=yes
+  # Spurious escaping to ensure we do not call our 'exit' alias.
+  (\exit $1); \exit $1
+}
+# Avoid interferences from the environment
+am__test_skipped=no
+# This alias must actually be placed before any use if 'exit' -- even
+# just inside a function definition.  Weird, but real.
+alias exit=_am_exit
+
+## ------------------------------------ ##
+##  General testsuite shell functions.  ##
+## ------------------------------------ ##
+
+# Print warnings (e.g., about skipped and failed tests) to this file
+# number.  Override by putting, say:
+#   AM_TESTS_ENVIRONMENT = stderr_fileno_=9; export stderr_fileno_;
+#   AM_TESTS_FD_REDIRECT = 9>&2
+# in your Makefile.am.
+# This is useful when using automake's parallel tests mode, to print the
+# reason for skip/failure to console, rather than to the *.log files.
+: ${stderr_fileno_=2}
+
+# Helper functions used by "plain" tests of the Automake testsuite
+# (i.e., tests that don't use any test protocol).
+# TAP tests will override these functions with their TAP-enhanced
+# equivalents later  (see sourcing of 'tap-functions.sh' below).
+# These are copied from Gnulib's 'tests/init.sh'.
+warn_ () { echo "$@" 1>&$stderr_fileno_; }
+fail_ () { warn_ "$me: failed test: $@"; exit 1; }
+skip_ () { warn_ "$me: skipped test: $@"; exit 77; }
+fatal_ () { warn_ "$me: hard error: $@"; exit 99; }
+framework_failure_ () { warn_ "$me: set-up failure: $@"; exit 99; }
+# For compatibility with TAP functions.
+skip_all_ () { skip_ "$@"; }
+
+if test $am_test_protocol = tap; then
+  . tap-functions.sh
+fi
+
+## ---------------------------- ##
+##  Auxiliary shell functions.  ##
+## ---------------------------- ##
+
+# Tell whether we should keep the test directories around, even in
+# case of success.  By default, we don't.
+am_keeping_testdirs ()
+{
+  case $keep_testdirs in
+     ""|n|no|NO) return 1;;
+              *) return 0;;
+  esac
+}
+
+# seq_ - print a sequence of numbers
+# ----------------------------------
+# This function simulates GNU seq(1) portably.  Valid usages:
+#  - seq LAST
+#  - seq FIRST LAST
+#  - seq FIRST INCREMENT LAST
+seq_ ()
+{
+  case $# in
+    0) fatal_ "seq_: missing argument";;
+    1) seq_first=1  seq_incr=1  seq_last=$1;;
+    2) seq_first=$1 seq_incr=1  seq_last=$2;;
+    3) seq_first=$1 seq_incr=$2 seq_last=$3;;
+    *) fatal_ "seq_: too many arguments";;
+  esac
+  i=$seq_first
+  while test $i -le $seq_last; do
+    echo $i
+    i=$(($i + $seq_incr))
+  done
+}
+
+# rm_rf_ [FILES OR DIRECTORIES ...]
+# ---------------------------------
+# Recursively remove the given files or directory, also handling the case
+# of non-writable subdirectories.
+rm_rf_ ()
+{
+  test $# -gt 0 || return 0
+  # Ignore failures in find, we are only interested in failures of the
+  # final rm.
+  find "$@" -type d ! -perm -700 -exec chmod u+rwx {} \; || :
+  rm -rf "$@"
+}
+
+commented_sed_unindent_prog='
+  /^$/b                    # Nothing to do for empty lines.
+  x                        # Get x<indent> into pattern space.
+  /^$/{                    # No prior x<indent>, go prepare it.
+    g                      # Copy this 1st non-blank line into pattern space.
+    s/^\(['"$tab"' ]*\).*/x\1/   # Prepare x<indent> in pattern space.
+  }                        # Now: x<indent> in pattern and <line> in hold.
+  G                        # Build x<indent>\n<line> in pattern space, and
+  h                        # duplicate it into hold space.
+  s/\n.*$//                # Restore x<indent> in pattern space, and
+  x                        # exchange with the above duplicate in hold space.
+  s/^x\(.*\)\n\1//         # Remove leading <indent> from <line>.
+  s/^x.*\n//               # Restore <line> when there is no leading <indent>.
+'
+
+# unindent [input files...]
+# -------------------------
+# Remove the "proper" amount of leading whitespace from the given files,
+# and output the result on stdout.  That amount is determined by looking
+# at the leading whitespace of the first non-blank line in the input
+# files.  If no input file is specified, standard input is implied.
+unindent ()
+{
+  if test x"$sed_unindent_prog" = x; then
+    sed_unindent_prog=$(printf '%s\n' "$commented_sed_unindent_prog" \
+                          | sed -e "s/  *# .*//")
+  fi
+  sed "$sed_unindent_prog" ${1+"$@"}
+}
+sed_unindent_prog="" # Avoid interferences from the environment.
+
+## ---------------------------------------------------------------- ##
+##  Create and set up of the temporary directory used by the test.  ##
+##  Set up of the exit trap for cleanup of said directory.          ##
+## ---------------------------------------------------------------- ##
+
+# Set up the exit trap.
+am_exit_trap ()
+{
+  exit_status=$1
+  set +e
+  cd "$am_top_builddir"
+  if test $am_test_protocol = tap; then
+    if test "$planned_" = later && test $exit_status -eq 0; then
+      plan_ "now"
+    fi
+    test $exit_status -eq 0 && test $tap_pass_count_ -eq $tap_count_ \
+      || keep_testdirs=yes
+  else
+    # This is to ensure that a test script does give a SKIP outcome just
+    # because a command in it happens to exit with status 77.  This
+    # behaviour, while from time to time useful to developers, is not
+    # meant to be enabled by default, as it could cause spurious failures
+    # in the wild.  Thus it will be enabled only when the variable
+    # "am_explicit_skips" is set to a "true" value.
+    case $am_explicit_skips in
+      [yY]|[yY]es|1)
+        if test $exit_status -eq 77 && test $am__test_skipped != yes; then
+          echo "$me: implicit skip turned into failure"
+          exit_status=78
+        fi;;
+    esac
+    test $exit_status -eq 0 || keep_testdirs=yes
+  fi
+  am_keeping_testdirs || rm_rf_ $am_test_subdir
+  set +x
+  echo "$me: exit $exit_status"
+  # Spurious escaping to ensure we do not call our "exit" alias.
+  \exit $exit_status
+}
+
+am_set_exit_traps ()
+{
+  trap 'am_exit_trap $?' 0
+  trap "fatal_ 'caught signal SIGHUP'" 1
+  trap "fatal_ 'caught signal SIGINT'" 2
+  trap "fatal_ 'caught signal SIGTERM'" 15
+  # Various shells seems to just ignore SIGQUIT under some circumstances,
+  # even if the signal is not blocked; however, if the signal it trapped,
+  # the trap gets correctly executed.  So we also trap SIGQUIT.
+  # Here is a list of some shells that have been verified to exhibit the
+  # problematic behavior with SIGQUIT:
+  #  - zsh 4.3.12 on Debian GNU/Linux
+  #  - /bin/ksh and /usr/xpg4/bin/sh on Solaris 10
+  #  - Bash 3.2.51 on Solaris 10 and bash 4.1.5 on Debian GNU/Linux
+  #  - AT&T ksh on Debian Gnu/Linux (deb package ksh, version 93u-1)
+  # OTOH, at least these shells that do *not* exhibit that behaviour:
+  #  - modern version of the Almquist Shell (at least 0.5.5.1), on
+  #    both Solaris and GNU/Linux
+  #  - public domain Korn Shell, version 5.2.14, on Debian GNU/Linux
+  trap "fatal_ 'caught signal SIGQUIT'" 3
+  # Ignore further SIGPIPE in the trap code.  This is required to avoid
+  # a very weird issue with some shells, at least when the execution of
+  # the automake testsuite is driven by the 'prove' utility: if prove
+  # (or the make process that has spawned it) gets interrupted with
+  # Ctrl-C, the shell might go in a loop, continually getting a SIGPIPE,
+  # sometimes finally dumping core, other times hanging indefinitely.
+  # See also Test::Harness bug [rt.cpan.org #70855], archived at
+  # <https://rt.cpan.org/Ticket/Display.html?id=70855>
+  trap "trap '' 13; fatal_ 'caught signal SIGPIPE'" 13
+}
+
+am_test_setup ()
+{
+  process_requirements $required
+  am_set_exit_traps
+  # Create and populate the temporary directory, if required.
+  if test x"$am_create_testdir" = x"no"; then
+    am_test_subdir=
+  else
+    am_setup_testdir
+  fi
+  am_extra_info
+  set -x
+  pwd
+}
diff --git a/t/depcomp-shuffle-sub-vpath.sh b/t/depcomp-shuffle-sub-vpath.sh
index 18fde7e..0eee3a8 100755
--- a/t/depcomp-shuffle-sub-vpath.sh
+++ b/t/depcomp-shuffle-sub-vpath.sh
@@ -18,6 +18,6 @@
 #  - VPATH build
 #  - use of subdir objects
 
-. ./defs-static || exit '99'
+. test-lib.sh
 xdir='sub' vpath='yes'
-. "$am_testauxdir"/depcomp-shuffle.sh
+. depcomp-shuffle.sh
diff --git a/t/depcomp-shuffle-sub.sh b/t/depcomp-shuffle-sub.sh
index 21f703b..8bf843d 100755
--- a/t/depcomp-shuffle-sub.sh
+++ b/t/depcomp-shuffle-sub.sh
@@ -18,6 +18,6 @@
 #  - in-tree build
 #  - use of subdir objects
 
-. ./defs-static || exit 99
+. test-lib.sh
 xdir='sub' vpath='no'
-. "$am_testauxdir"/depcomp-shuffle.sh
+. depcomp-shuffle.sh
diff --git a/t/depcomp-shuffle-vpath.sh b/t/depcomp-shuffle-vpath.sh
index 4baf20f..11d4a7e 100755
--- a/t/depcomp-shuffle-vpath.sh
+++ b/t/depcomp-shuffle-vpath.sh
@@ -18,6 +18,6 @@
 #  - VPATH build
 #  - no use of subdir objects
 
-. ./defs-static || exit 99
+. test-lib.sh
 xdir='' vpath='yes'
-. "$am_testauxdir"/depcomp-shuffle.sh
+. depcomp-shuffle.sh
diff --git a/t/depcomp-shuffle.sh b/t/depcomp-shuffle.sh
index 23ce20c..70b64ac 100755
--- a/t/depcomp-shuffle.sh
+++ b/t/depcomp-shuffle.sh
@@ -18,6 +18,6 @@
 #  - in-tree build
 #  - no use of subdir objects
 
-. ./defs-static || exit 99
+. test-lib.sh
 xdir='' vpath='no'
-. "$am_testauxdir"/depcomp-shuffle.sh
+. depcomp-shuffle.sh
diff --git a/t/memoize.tap b/t/memoize.tap
index d24a711..5e3646b 100755
--- a/t/memoize.tap
+++ b/t/memoize.tap
@@ -298,10 +298,10 @@ T "known GNU make issue 
(https://savannah.gnu.org/patch/?7534)" <<'END'
 setup := $(shell mkdir -p t/pm && : > t/pm/Cond2.pl)
 
 TESTS = $(wildcard t/pm/Cond2.pl)
-am__test_bases = $(call am.memoize,am__test_bases,$(TESTS))
+am.test-suite.test-bases = $(call am.memoize,am.test-suite.test-bases,$(TESTS))
 
 test:
-       test '$(am__test_bases)' = 't/pm/Cond2.pl'
+       test '$(am.test-suite.test-bases)' = 't/pm/Cond2.pl'
 END
 
 #---------------------------------------------------------------------------
diff --git a/t/override-conditional-1.sh b/t/override-conditional-1.sh
index 42e0350..2752346 100755
--- a/t/override-conditional-1.sh
+++ b/t/override-conditional-1.sh
@@ -36,7 +36,8 @@ $ACLOCAL
 $AUTOMAKE -Wno-override
 
 # "ps:" should be output in two conditions
-test $(grep -c '[^-]ps:' Makefile.in) -eq 2
+grep 'ps:' Makefile.in # For debugging.
+test $(grep -c '@ps:' Makefile.in) -eq 2
 grep '@address@hidden: *foobar' Makefile.in
 grep '@address@hidden: *ps-am' Makefile.in
 
diff --git a/t/parallel-tests-empty-tests.sh b/t/parallel-tests-empty-tests.sh
index aefe6b5..0960da5 100755
--- a/t/parallel-tests-empty-tests.sh
+++ b/t/parallel-tests-empty-tests.sh
@@ -32,8 +32,11 @@ mkdir sub1 sub2
 cat > sub1/Makefile.am << 'END'
 TESTS =
 check-local:
-       echo $(am__test_logs) $(am__test_results) $(am__test_bases) \
-         | grep . && exit 1; exit 0
+       echo \
+          $(am.test-suite.test-logs) \
+          $(am.test-suite.test-results) \
+          $(am.test-suite.test-bases) \
+       | grep . && exit 1; exit 0
 END
 
 cat > sub2/Makefile.am << 'END'
diff --git a/t/primary-prefix-couples-force-valid.sh 
b/t/primary-prefix-couples-force-valid.sh
index bf4d39f..f99f29a 100755
--- a/t/primary-prefix-couples-force-valid.sh
+++ b/t/primary-prefix-couples-force-valid.sh
@@ -54,7 +54,12 @@ test:
        test -f '$(bindir)/libquux.a'
        ls -l '$(libexecdir)/bar.h'
        test -f '$(libexecdir)/bar.h'
-       test ! -x '$(libexecdir)/bar.h'
+## If this test is run as root, "test -x" could suceed also for
+## non-executable files, so we need to protect the next check.
+## See automake bug#12041.
+       if test -x Makefile; then echo SKIP THIS; else \
+         test ! -x '$(libexecdir)/bar.h'; \
+       fi;
 END
 
 cat > foo.c <<'END'
diff --git a/t/self-check-env-sanitize.tap b/t/self-check-env-sanitize.tap
deleted file mode 100755
index 3e48d89..0000000
--- a/t/self-check-env-sanitize.tap
+++ /dev/null
@@ -1,56 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Sanity check for the automake testsuite.
-# Make sure that the testsuite initialization code complains when
-# some testsuite-influential variables are set in the environment.
-
-am_create_testdir=no
-. ./defs || exit 1
-
-set -x
-exec 5>&1
-
-plan_ 16 # Two times the number of variable names in $vars.
-
-vars='
-  required
-  am_serial_tests
-  am_using_tap
-  am_create_testdir
-  am_tap_implementation
-  am_test_prefer_config_shell
-  am_original_AUTOMAKE
-  am_original_ACLOCAL
-'
-
-do_run ()
-{
-  env "$1=foo" $AM_TEST_RUNNER_SHELL -c '. ./defs' foo.test
-}
-
-do_grep ()
-{
-  env "$1=foo" $AM_TEST_RUNNER_SHELL -c '. ./defs' foo.test 2>&1 1>&5 \
-    | grep "foo\.test:.* variable '$1'.* in the environment.*unsafe"
-}
-
-for var in $vars; do
-  command_ok_ "$var [err status]" not do_run $var
-  command_ok_ "$var [err message]" do_grep $var
-done
-
-:
diff --git a/t/self-check-tap.sh b/t/self-check-tap.sh
deleted file mode 100755
index d7f788c..0000000
--- a/t/self-check-tap.sh
+++ /dev/null
@@ -1,45 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Sanity check for the automake testsuite.
-# Make sure that $am_using_tap gets automatically defined by
-# './defs-static', but can be overridden by the individual tests.
-
-. ./defs-static || exit 1
-
-set -ex
-
-$AM_TEST_RUNNER_SHELL -c \
-  '. ./defs-static && test $am_using_tap = yes' foo.tap
-
-for name in foo.test tap tap.test foo-tap; do
-  $AM_TEST_RUNNER_SHELL -c \
-    '. ./defs-static && test $am_using_tap = no' $name
-done
-
-$AM_TEST_RUNNER_SHELL -c '
-  am_using_tap=no
-  . ./defs-static
-  test $am_using_tap = no
-' foo.tap
-
-$AM_TEST_RUNNER_SHELL -c '
-  am_using_tap=yes
-  . ./defs-static
-  test $am_using_tap = yes
-' foo.test
-
-:
diff --git a/t/serial-tests.sh b/t/serial-tests.sh
index 5e008ff..d90de29 100755
--- a/t/serial-tests.sh
+++ b/t/serial-tests.sh
@@ -30,7 +30,7 @@ has_parallel_tests ()
 {
   $EGREP '(^| )check-TESTS.*:' $1
   $EGREP '(^| )recheck.*:' $1
-  $EGREP '^\$\(TEST_SUITE_LOG\):.* \$\(am__test_logs\)( |$)' $1
+  $EGREP '^\$\(TEST_SUITE_LOG\):.* \$\(am\.test-suite\.test-logs\)( |$)' $1
   grep '%\.log %\.trs *:' $1
 }
 
diff --git a/t/tap-ambiguous-directive.sh b/t/tap-ambiguous-directive.sh
index 74f258f..aaf2cd0 100755
--- a/t/tap-ambiguous-directive.sh
+++ b/t/tap-ambiguous-directive.sh
@@ -20,7 +20,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<END
 1..6
diff --git a/t/tap-autonumber.sh b/t/tap-autonumber.sh
index 74f7fac..3fab0aa 100755
--- a/t/tap-autonumber.sh
+++ b/t/tap-autonumber.sh
@@ -22,7 +22,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<'END'
 1..14
diff --git a/t/tap-bailout-and-logging.sh b/t/tap-bailout-and-logging.sh
index 5b49c33..f87ccb3 100755
--- a/t/tap-bailout-and-logging.sh
+++ b/t/tap-bailout-and-logging.sh
@@ -20,7 +20,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<END
 First line
diff --git a/t/tap-bailout-leading-space.sh b/t/tap-bailout-leading-space.sh
index 2612cd2..0addf0e 100755
--- a/t/tap-bailout-leading-space.sh
+++ b/t/tap-bailout-leading-space.sh
@@ -23,7 +23,7 @@
 am_tap_implementation=shell
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > a.test <<END
 1..1
diff --git a/t/tap-bailout-suppress-badexit.sh 
b/t/tap-bailout-suppress-badexit.sh
index c83ba8a..7cd5458 100755
--- a/t/tap-bailout-suppress-badexit.sh
+++ b/t/tap-bailout-suppress-badexit.sh
@@ -26,7 +26,7 @@ cat > Makefile.am <<END
 TESTS = $tests
 END
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > exit.test << 'END'
 #!/bin/sh
diff --git a/t/tap-bailout-suppress-later-diagnostic.sh 
b/t/tap-bailout-suppress-later-diagnostic.sh
index 69ac88f..54e21fd 100755
--- a/t/tap-bailout-suppress-later-diagnostic.sh
+++ b/t/tap-bailout-suppress-later-diagnostic.sh
@@ -20,7 +20,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 echo AM_TEST_LOG_DRIVER_FLAGS = --comments >> Makefile
 
diff --git a/t/tap-bailout-suppress-later-errors.sh 
b/t/tap-bailout-suppress-later-errors.sh
index 5073959..44e28ca 100755
--- a/t/tap-bailout-suppress-later-errors.sh
+++ b/t/tap-bailout-suppress-later-errors.sh
@@ -20,7 +20,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 # Various errors that can all be squashed into a single test script.
 cat > foo.test << 'END'
diff --git a/t/tap-bailout.sh b/t/tap-bailout.sh
index d8c6065..cb051a8 100755
--- a/t/tap-bailout.sh
+++ b/t/tap-bailout.sh
@@ -19,7 +19,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 : > exp
 
diff --git a/t/tap-color.sh b/t/tap-color.sh
index f60cc57..6b79f39 100755
--- a/t/tap-color.sh
+++ b/t/tap-color.sh
@@ -36,7 +36,7 @@ TESTS = all.test skip.test bail.test badplan.test noplan.test 
\
         few.test many.test order.test afterlate.test
 END
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test << 'END'
 1..5
diff --git a/t/tap-deps.sh b/t/tap-deps.sh
index 60997b4..472ae3d 100755
--- a/t/tap-deps.sh
+++ b/t/tap-deps.sh
@@ -26,7 +26,7 @@ b.log: a.log
 c.log: b.log
 END
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > a.test << 'END'
 #!/bin/sh
diff --git a/t/tap-diagnostic.sh b/t/tap-diagnostic.sh
index 340d69a..a45b044 100755
--- a/t/tap-diagnostic.sh
+++ b/t/tap-diagnostic.sh
@@ -20,7 +20,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 metacharacters=\''"\$!&()[]<>#;^?*'
 
diff --git a/t/tap-empty-diagnostic.sh b/t/tap-empty-diagnostic.sh
index c92a152..ae0deef 100755
--- a/t/tap-empty-diagnostic.sh
+++ b/t/tap-empty-diagnostic.sh
@@ -19,7 +19,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 sed 's/\$$//' > all.test <<END
 1..1$
diff --git a/t/tap-empty.sh b/t/tap-empty.sh
index 976656d..e3d400c 100755
--- a/t/tap-empty.sh
+++ b/t/tap-empty.sh
@@ -20,7 +20,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 # Empty TAP input.
 : > empty.test
diff --git a/t/tap-escape-directive-2.sh b/t/tap-escape-directive-2.sh
index 3080663..49c6398 100755
--- a/t/tap-escape-directive-2.sh
+++ b/t/tap-escape-directive-2.sh
@@ -19,7 +19,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<'END'
 1..8
diff --git a/t/tap-escape-directive.sh b/t/tap-escape-directive.sh
index 2fb1ad9..9b59c3d 100755
--- a/t/tap-escape-directive.sh
+++ b/t/tap-escape-directive.sh
@@ -19,7 +19,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<'END'
 1..2
diff --git a/t/tap-exit.sh b/t/tap-exit.sh
index 0949384..c9a9823 100755
--- a/t/tap-exit.sh
+++ b/t/tap-exit.sh
@@ -34,7 +34,7 @@ done
 
 chmod a+x *.test
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 $MAKE check >stdout && { cat stdout; exit 1; }
 cat stdout
diff --git a/t/tap-fancy.sh b/t/tap-fancy.sh
index f879cce..9ca5021 100755
--- a/t/tap-fancy.sh
+++ b/t/tap-fancy.sh
@@ -19,7 +19,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 #
 # From manpage Test::Harness::TAP(3):
diff --git a/t/tap-fancy2.sh b/t/tap-fancy2.sh
index 88ef412..d69cf50 100755
--- a/t/tap-fancy2.sh
+++ b/t/tap-fancy2.sh
@@ -19,7 +19,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 #
 # From manpage Test::Harness::TAP(3):
diff --git a/t/tap-global-log.sh b/t/tap-global-log.sh
index 9fd851e..ee3f1b5 100755
--- a/t/tap-global-log.sh
+++ b/t/tap-global-log.sh
@@ -19,7 +19,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > ok.test << 'END'
 1..5
diff --git a/t/tap-global-result.sh b/t/tap-global-result.sh
index 9d69564..6a91880 100755
--- a/t/tap-global-result.sh
+++ b/t/tap-global-result.sh
@@ -20,7 +20,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > ok.test <<END
 1..3
diff --git a/t/tap-lazy-check.sh b/t/tap-lazy-check.sh
index 44befac..7d3e93a 100755
--- a/t/tap-lazy-check.sh
+++ b/t/tap-lazy-check.sh
@@ -24,7 +24,7 @@ TESTS = foo.test bar.test baz.test
 baz.log: zardoz
 END
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 : > zardoz
 
diff --git a/t/tap-log.sh b/t/tap-log.sh
index d39965a..6e0c80d 100755
--- a/t/tap-log.sh
+++ b/t/tap-log.sh
@@ -29,7 +29,7 @@ TESTS = pass.test skip.test xfail.test fail.test xpass.test 
error.test
 TEST_SUITE_LOG = global.log
 END
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 # Custom markers, for use in grepping checks.
 cmarker=::: # comment marker
diff --git a/t/tap-merge-stdout-stderr.sh b/t/tap-merge-stdout-stderr.sh
index 38a5f74..6d029c8 100755
--- a/t/tap-merge-stdout-stderr.sh
+++ b/t/tap-merge-stdout-stderr.sh
@@ -27,7 +27,7 @@ AM_TEST_LOG_DRIVER_FLAGS = --comments --merge
 TESTS = all.test
 END
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<END
 #!/bin/sh
diff --git a/t/tap-missing-plan-and-bad-exit.sh 
b/t/tap-missing-plan-and-bad-exit.sh
index ddd74c8..06a6f88 100755
--- a/t/tap-missing-plan-and-bad-exit.sh
+++ b/t/tap-missing-plan-and-bad-exit.sh
@@ -30,7 +30,7 @@ echo TESTS = foo.test > Makefile.am
 
 chmod a+x foo.test
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 $MAKE check >stdout && { cat stdout; exit 1; }
 cat stdout
diff --git a/t/tap-msg0-bailout.sh b/t/tap-msg0-bailout.sh
index 2faf679..e54debd 100755
--- a/t/tap-msg0-bailout.sh
+++ b/t/tap-msg0-bailout.sh
@@ -21,7 +21,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 echo 'Bail out! 0' > a.test
 echo 'Bail out! 0.0' > b.test
diff --git a/t/tap-msg0-directive.sh b/t/tap-msg0-directive.sh
index 9859e72..9be3816 100755
--- a/t/tap-msg0-directive.sh
+++ b/t/tap-msg0-directive.sh
@@ -19,7 +19,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test << 'END'
 1..3
diff --git a/t/tap-msg0-misc.sh b/t/tap-msg0-misc.sh
index 166b785..d7751d7 100755
--- a/t/tap-msg0-misc.sh
+++ b/t/tap-msg0-misc.sh
@@ -20,7 +20,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test << 'END'
 1..14
diff --git a/t/tap-msg0-planskip.sh b/t/tap-msg0-planskip.sh
index 7502a46..cb905b6 100755
--- a/t/tap-msg0-planskip.sh
+++ b/t/tap-msg0-planskip.sh
@@ -20,7 +20,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 echo '1..0 # SKIP 0' > a.test
 echo '1..0 # SKIP 0.0' > b.test
diff --git a/t/tap-msg0-result.sh b/t/tap-msg0-result.sh
index a1174bc..f55b055 100755
--- a/t/tap-msg0-result.sh
+++ b/t/tap-msg0-result.sh
@@ -19,7 +19,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test << 'END'
 1..10
diff --git a/t/tap-negative-numbers.sh b/t/tap-negative-numbers.sh
index 765442a..fbf54be 100755
--- a/t/tap-negative-numbers.sh
+++ b/t/tap-negative-numbers.sh
@@ -20,7 +20,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<'END'
 1..7
diff --git a/t/tap-no-disable-hard-error.sh b/t/tap-no-disable-hard-error.sh
index e9a1091..dc4cad3 100755
--- a/t/tap-no-disable-hard-error.sh
+++ b/t/tap-no-disable-hard-error.sh
@@ -26,7 +26,7 @@ TEST_LOG_COMPILER = cat
 TESTS = bail.test few.test noplan.test
 END
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > bail.test <<END
 1..1
diff --git a/t/tap-no-merge-stdout-stderr.sh b/t/tap-no-merge-stdout-stderr.sh
index e82b26b..f101315 100755
--- a/t/tap-no-merge-stdout-stderr.sh
+++ b/t/tap-no-merge-stdout-stderr.sh
@@ -25,7 +25,7 @@ TEST_LOG_DRIVER_FLAGS = --comments
 TESTS = all.test
 END
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<END
 #!/bin/sh
diff --git a/t/tap-no-spurious-numbers.sh b/t/tap-no-spurious-numbers.sh
index 3f99498..81104af 100755
--- a/t/tap-no-spurious-numbers.sh
+++ b/t/tap-no-spurious-numbers.sh
@@ -20,7 +20,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > prefixes <<'END'
 A
diff --git a/t/tap-no-spurious.sh b/t/tap-no-spurious.sh
index ebb58cf..bc98a09 100755
--- a/t/tap-no-spurious.sh
+++ b/t/tap-no-spurious.sh
@@ -20,7 +20,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 echo 1..5 > all.test
 
diff --git a/t/tap-not-ok-skip.sh b/t/tap-not-ok-skip.sh
index f73bb03..bbb9a03 100755
--- a/t/tap-not-ok-skip.sh
+++ b/t/tap-not-ok-skip.sh
@@ -20,7 +20,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<'END'
 1..4
diff --git a/t/tap-number-wordboundary.sh b/t/tap-number-wordboundary.sh
index 219a159..2d15121 100755
--- a/t/tap-number-wordboundary.sh
+++ b/t/tap-number-wordboundary.sh
@@ -20,7 +20,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<'END'
 1..5
diff --git a/t/tap-numbers-leading-zero.sh b/t/tap-numbers-leading-zero.sh
index fd1c3b6..620addf 100755
--- a/t/tap-numbers-leading-zero.sh
+++ b/t/tap-numbers-leading-zero.sh
@@ -19,7 +19,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 do_checks ()
 {
diff --git a/t/tap-numeric-description.sh b/t/tap-numeric-description.sh
index 60292a7..61bc252 100755
--- a/t/tap-numeric-description.sh
+++ b/t/tap-numeric-description.sh
@@ -18,7 +18,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 # Some random numbers to be used as test names.  The definitions below are
 # selected so that $x<n> != <n> for every n >= 1.  We can't use positional
diff --git a/t/tap-out-of-order.sh b/t/tap-out-of-order.sh
index 0e3ffb2..edcf006 100755
--- a/t/tap-out-of-order.sh
+++ b/t/tap-out-of-order.sh
@@ -19,7 +19,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > a.test <<END
 1..3
diff --git a/t/tap-passthrough-exit.sh b/t/tap-passthrough-exit.sh
index 617f89c..1e93115 100755
--- a/t/tap-passthrough-exit.sh
+++ b/t/tap-passthrough-exit.sh
@@ -38,7 +38,7 @@ END
   echo TESTS += exit-$e.test >> Makefile.am
 done
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 st=0
 $MAKE check || st=$?
diff --git a/t/tap-passthrough.sh b/t/tap-passthrough.sh
index 380548f..8363d97 100755
--- a/t/tap-passthrough.sh
+++ b/t/tap-passthrough.sh
@@ -24,7 +24,7 @@
 
 weirdchars=\''"address@hidden&()[]<>#;,:.^?*/'
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 #
 # Only successful tests.
diff --git a/t/tap-plan-corner.sh b/t/tap-plan-corner.sh
index 044258e..9b060ad 100755
--- a/t/tap-plan-corner.sh
+++ b/t/tap-plan-corner.sh
@@ -19,7 +19,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 # -------------------------------------------------------------------------
 
diff --git a/t/tap-plan-errors.sh b/t/tap-plan-errors.sh
index 21fd013..4b6a410 100755
--- a/t/tap-plan-errors.sh
+++ b/t/tap-plan-errors.sh
@@ -25,7 +25,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 my_check ()
 {
diff --git a/t/tap-plan-leading-zero.sh b/t/tap-plan-leading-zero.sh
index ce6477d..b6bb507 100755
--- a/t/tap-plan-leading-zero.sh
+++ b/t/tap-plan-leading-zero.sh
@@ -21,7 +21,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > a.test <<END
 1..01
diff --git a/t/tap-plan-malformed.sh b/t/tap-plan-malformed.sh
index b89aa94..551ccd4 100755
--- a/t/tap-plan-malformed.sh
+++ b/t/tap-plan-malformed.sh
@@ -19,7 +19,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > a.test <<END
 1..1 foo
diff --git a/t/tap-plan-middle.sh b/t/tap-plan-middle.sh
index 2538623..63f31c5 100755
--- a/t/tap-plan-middle.sh
+++ b/t/tap-plan-middle.sh
@@ -19,7 +19,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > top1.test <<END
 non-TAP line, ignored
diff --git a/t/tap-plan-whitespace.sh b/t/tap-plan-whitespace.sh
index 122ff2f..e0fdf3e 100755
--- a/t/tap-plan-whitespace.sh
+++ b/t/tap-plan-whitespace.sh
@@ -19,7 +19,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 sed 's/\$$//' > foo.test <<END
 1..2 $
diff --git a/t/tap-plan.sh b/t/tap-plan.sh
index 8106251..d80dd51 100755
--- a/t/tap-plan.sh
+++ b/t/tap-plan.sh
@@ -20,7 +20,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > top.test <<END
 1..3
diff --git a/t/tap-planskip-and-logging.sh b/t/tap-planskip-and-logging.sh
index 3b999d1..8cd3d50 100755
--- a/t/tap-planskip-and-logging.sh
+++ b/t/tap-planskip-and-logging.sh
@@ -20,7 +20,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 echo TEST_LOG_DRIVER_FLAGS = --comments >> Makefile
 
diff --git a/t/tap-planskip-badexit.sh b/t/tap-planskip-badexit.sh
index 1b20864..0bcc7e3 100755
--- a/t/tap-planskip-badexit.sh
+++ b/t/tap-planskip-badexit.sh
@@ -22,7 +22,7 @@
 
 echo TESTS = one.test two.test > Makefile.am
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > one.test <<'END'
 #!/bin/sh
diff --git a/t/tap-planskip-bailout.sh b/t/tap-planskip-bailout.sh
index 255443d..6558a69 100755
--- a/t/tap-planskip-bailout.sh
+++ b/t/tap-planskip-bailout.sh
@@ -20,7 +20,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<END
 1..0 # SKIP
diff --git a/t/tap-planskip-case-insensitive.sh 
b/t/tap-planskip-case-insensitive.sh
index 61f1ea0..f086a68 100755
--- a/t/tap-planskip-case-insensitive.sh
+++ b/t/tap-planskip-case-insensitive.sh
@@ -19,7 +19,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 # These nested loops below are clearer without indentation.
 i=0
diff --git a/t/tap-planskip-late.sh b/t/tap-planskip-late.sh
index 50d74a9..942d0b6 100755
--- a/t/tap-planskip-late.sh
+++ b/t/tap-planskip-late.sh
@@ -20,7 +20,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > foo.test <<END
 some non-TAP text, will be copied in the global log
diff --git a/t/tap-planskip-later-errors.sh b/t/tap-planskip-later-errors.sh
index 3a403c7..c840044 100755
--- a/t/tap-planskip-later-errors.sh
+++ b/t/tap-planskip-later-errors.sh
@@ -19,7 +19,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<END
 1..0
diff --git a/t/tap-planskip-unplanned-corner.sh 
b/t/tap-planskip-unplanned-corner.sh
index 98dd349..9db7d22 100755
--- a/t/tap-planskip-unplanned-corner.sh
+++ b/t/tap-planskip-unplanned-corner.sh
@@ -20,7 +20,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > foo.test <<END
 1..0 # SKIP
diff --git a/t/tap-planskip-unplanned.sh b/t/tap-planskip-unplanned.sh
index 01e5895..5fa8ca5 100755
--- a/t/tap-planskip-unplanned.sh
+++ b/t/tap-planskip-unplanned.sh
@@ -21,7 +21,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<END
 ok 1
diff --git a/t/tap-planskip-whitespace.sh b/t/tap-planskip-whitespace.sh
index ca29d1a..5a1fccf 100755
--- a/t/tap-planskip-whitespace.sh
+++ b/t/tap-planskip-whitespace.sh
@@ -20,7 +20,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > foo.test <<END
 1..0${tab}${tab}   #${tab}SKIP  ${tab}Strip leading & trailing ${tab}${tab}
diff --git a/t/tap-planskip.sh b/t/tap-planskip.sh
index b160e48..361dc5d 100755
--- a/t/tap-planskip.sh
+++ b/t/tap-planskip.sh
@@ -19,7 +19,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 weirdchars=\''"$!&()[]<>#;^?*/@%=,.:'
 
diff --git a/t/tap-realtime.sh b/t/tap-realtime.sh
index 6621053..0655e0f 100755
--- a/t/tap-realtime.sh
+++ b/t/tap-realtime.sh
@@ -39,7 +39,7 @@ TESTS = all.test
 AM_COLOR_TESTS= no
 END
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<'END'
 #! /bin/sh
diff --git a/t/tap-result-comment.sh b/t/tap-result-comment.sh
index 4290751..714f328 100755
--- a/t/tap-result-comment.sh
+++ b/t/tap-result-comment.sh
@@ -19,7 +19,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<END
 1..5
diff --git a/t/tap-summary-color.sh b/t/tap-summary-color.sh
index a28512b..e9b516b 100755
--- a/t/tap-summary-color.sh
+++ b/t/tap-summary-color.sh
@@ -17,7 +17,7 @@
 # TAP support:
 #  - colorized testsuite summary
 
-. ./defs-static
+. test-lib.sh
 
 use_colors=yes
-. "$am_testauxdir"/tap-summary-aux.sh
+. tap-summary-aux.sh
diff --git a/t/tap-summary.sh b/t/tap-summary.sh
index deee099..c4bd739 100755
--- a/t/tap-summary.sh
+++ b/t/tap-summary.sh
@@ -17,7 +17,7 @@
 # TAP support:
 #  - colorized testsuite summary
 
-. ./defs-static
+. test-lib.sh
 
 use_colors=no
-. "$am_testauxdir"/tap-summary-aux.sh
+. tap-summary-aux.sh
diff --git a/t/tap-test-number-0.sh b/t/tap-test-number-0.sh
index e611edc..8412f12 100755
--- a/t/tap-test-number-0.sh
+++ b/t/tap-test-number-0.sh
@@ -43,7 +43,7 @@ if test $am_tap_implementation = perl; then
   fi
 fi
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > a.test <<END
 1..1
diff --git a/t/tap-todo-skip-together.sh b/t/tap-todo-skip-together.sh
index b54013a..dc9e160 100755
--- a/t/tap-todo-skip-together.sh
+++ b/t/tap-todo-skip-together.sh
@@ -20,7 +20,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<END
 1..2
diff --git a/t/tap-todo-skip-whitespace.sh b/t/tap-todo-skip-whitespace.sh
index b9c8825..b979c8b 100755
--- a/t/tap-todo-skip-whitespace.sh
+++ b/t/tap-todo-skip-whitespace.sh
@@ -20,7 +20,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > stub.tap <<END
 1 # TODO
diff --git a/t/tap-todo-skip.sh b/t/tap-todo-skip.sh
index 368bd8e..ffe2aac 100755
--- a/t/tap-todo-skip.sh
+++ b/t/tap-todo-skip.sh
@@ -25,7 +25,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 # ----------------------------------------------------- #
 #  Check all possible combinations of:                  #
diff --git a/t/tap-unplanned.sh b/t/tap-unplanned.sh
index 262c801..bfd0d31 100755
--- a/t/tap-unplanned.sh
+++ b/t/tap-unplanned.sh
@@ -19,7 +19,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<END
 1..1
diff --git a/t/tap-whitespace-normalization.sh 
b/t/tap-whitespace-normalization.sh
index 2b1f627..0cbf90b 100755
--- a/t/tap-whitespace-normalization.sh
+++ b/t/tap-whitespace-normalization.sh
@@ -144,7 +144,7 @@ END
 
 chmod a+x *.test
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 # Don't care about exit status or number of test results, they should be
 # checked for in many other tests.
diff --git a/t/tap-with-and-without-number.sh b/t/tap-with-and-without-number.sh
index c69a40a..6d69eb6 100755
--- a/t/tap-with-and-without-number.sh
+++ b/t/tap-with-and-without-number.sh
@@ -21,7 +21,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<'END'
 1..7
diff --git a/t/tap-xfail-tests.sh b/t/tap-xfail-tests.sh
index aa86dca..94ae1c9 100755
--- a/t/tap-xfail-tests.sh
+++ b/t/tap-xfail-tests.sh
@@ -19,7 +19,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 echo 'XFAIL_TESTS = $(TESTS)' >> Makefile
 
diff --git a/t/test-trs-basic.sh b/t/test-trs-basic.sh
index 7947e63..edb2313 100755
--- a/t/test-trs-basic.sh
+++ b/t/test-trs-basic.sh
@@ -34,7 +34,7 @@ SH_LOG_COMPILER = $(SHELL)
 ## $(am__tests_bases) are deliberate: they check for whitespace
 ## normalization.
 tb:
-       echo '$(am__test_bases)' > $@
+       echo '$(am.test-suite.test-bases)' > $@
 END
 
 cat > foo.test << 'END'
diff --git a/t/testsuite-summary-color.sh b/t/testsuite-summary-color.sh
index c73ca45..7278a2f 100755
--- a/t/testsuite-summary-color.sh
+++ b/t/testsuite-summary-color.sh
@@ -16,12 +16,10 @@
 
 # Check coloring of the testsuite summary.
 
-. ./defs-static || exit 1
+. test-lib.sh
 
-use_colors=yes
-use_vpath=no
-
-. "$am_testauxdir"/testsuite-summary-checks.sh || exit 99
+use_colors=yes; use_vpath=no
+. testsuite-summary-checks.sh
 
 ./configure
 
diff --git a/t/testsuite-summary-count.sh b/t/testsuite-summary-count.sh
index 265eebf..25ecf27 100755
--- a/t/testsuite-summary-count.sh
+++ b/t/testsuite-summary-count.sh
@@ -16,12 +16,10 @@
 
 # Check test counts in the testsuite summary.
 
-. ./defs-static || exit 1
+. test-lib.sh
 
-use_colors=no
-use_vpath=no
-
-. "$am_testauxdir"/testsuite-summary-checks.sh || exit 99
+use_colors=no; use_vpath=no
+. testsuite-summary-checks.sh
 
 ./configure
 


hooks/post-receive
-- 
GNU Automake



reply via email to

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