[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.12-3
From: |
Stefano Lattarini |
Subject: |
[Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.12-306-g879ae21 |
Date: |
Thu, 24 May 2012 08:30:20 +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=879ae21478b10e645c3ad891b466d7cacd5d7765
The branch, ng/master has been updated
via 879ae21478b10e645c3ad891b466d7cacd5d7765 (commit)
via 2ae1c159376e20230b443c55cb9732f0fbde7c73 (commit)
via 0f20e59411bcd1713ac5ac9989863b5f6b20e034 (commit)
via 68a4ec81569a905ce8fe68912915cb2b68ddc6c4 (commit)
via 17b0bf6098aa84f84ebcadb1686989af152f87f8 (commit)
via 08644d068609dc7bdca008cf76a285c441225650 (commit)
via 508270d52ac913fe2260d0821d69c249f65450f6 (commit)
via 743e8c19479d346350899ab7bb1636bcc17eeea2 (commit)
via 9a9f7b596c1e94eb90d07e09af6dc4bad1b771a9 (commit)
via e5d1890ba1b3a5d83fd4b133d144c1ff38b5b681 (commit)
via 9a5f837c23a659931ad8ea03242d633e3678392d (commit)
via 20a1ce3d6b61c97536b701a52961ef8fa342677d (commit)
via 993f03a12d68efb489d6cbe8c7943cf61b1000a5 (commit)
via 8c64f4c94278dbb66b33aeb3c396c6b1fd04387a (commit)
via 9c259ea642d885b8a6b5f3414e7e0016752b9c91 (commit)
via 6b33d2b1922a0cbcd2141c31d13748b4661ffad0 (commit)
via c3eb27283dbe3328f333b3344c11216f788974d2 (commit)
via 9a16c3c08bdc2d26f64ee513c0796b75b50b1a4e (commit)
via cf8fc13a4f3ff8d03cdb93019e5d5c2796937dca (commit)
via c868a21c22ae33e037c6dcb0ec42d758d8be9d12 (commit)
via 3dee480d80bab18f527c483c73523edc53a58e9c (commit)
via 4faacc9ba39b9d5e27eb598653d4089055af0c2c (commit)
via 9ccf085a8d0ada7ce5096360dfa76cd7a792afab (commit)
from 03f340dae2e4bd3370aa6b14df6e3d83d6fa607e (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 879ae21478b10e645c3ad891b466d7cacd5d7765
Merge: 2ae1c15 0f20e59
Author: Stefano Lattarini <address@hidden>
Date: Thu May 24 10:01:08 2012 +0200
Merge branch 'ng/check' into ng/master
* ng/check:
[ng] news: update w.r.t. recent changes in testsuite harnesses (TESTS
based)
[ng] doc: update w.r.t. recent changes in testsuite harnesses
(TESTS-based)
[ng] coverage: parallel-tests and dynamic $(TEST_EXTENSIONS) content
[ng] cosmetics: improve comments and spacing in 'parallel-tests.am'
[ng] check: support conditional $(TEST_EXTENSIONS)
[ng] check: warn about dot-less $(TEST_EXTENSIONS) at make runtime
[ng] check: be laxer in accepted $(TEST_EXTENSIONS)
[ng] check: logic to define *LOG_DRIVER vars moved to generated Makefiles
[ng] warns: don't report possible issues with '_DEPENDENCIES' variables
[ng] refactor: merge check2.am into parallel-tests.am
[ng] am: new make variable '$(am__handle_exeext)'
[ng] check: unconditionally distribute test-driver
[ng] check: warn about invalid TEST_EXTENSIONS at make runtime
[ng] check: separate serial and parallel harnesses in distinct '.am' files
[ng] check: move definition of console colors in its own '.am' fragment
[ng] refactor: make '$am_config_aux_dir' available as a make variable
[ng] am: implement $(am__tolower) and $(am__toupper)
[ng] tests: get rid of an almost-obsolete test case (parallel-tests
related)
[ng] serial-tests: simplify automake-time preprocessing
[ng] am: new private make variable $(am__all_progs)
commit 2ae1c159376e20230b443c55cb9732f0fbde7c73
Merge: 03f340d 9ccf085
Author: Stefano Lattarini <address@hidden>
Date: Thu May 24 09:56:20 2012 +0200
Merge branch 'ng/dirstamp' into ng/master
* ng/dirstamp:
[ng] dirstamp: remove, use inlined parent directory creation instead
Signed-off-by: Stefano Lattarini <address@hidden>
commit 0f20e59411bcd1713ac5ac9989863b5f6b20e034
Author: Stefano Lattarini <address@hidden>
Date: Wed May 23 11:33:25 2012 +0200
[ng] news: update w.r.t. recent changes in testsuite harnesses (TESTS based)
* NG-NEWS (Parallel testsuite harness): The 'test-driver' auxiliary script
is always distributed when the TESTS variable is seen, even if it is not
strictly required. Conditional and dynamic (even computed at make runtime)
content of TEST_EXTENSIONS is supported. We are more liberal in accepting
TEST_EXTENSIONS entries (it's enough that they start with a dot), and if
any of them is invalid, an error is given at make runtime, not at automake
runtime. Adjust some existing text to be more clear, thanks to a better
use of separating vertical and horizontal space.
Signed-off-by: Stefano Lattarini <address@hidden>
commit 68a4ec81569a905ce8fe68912915cb2b68ddc6c4
Author: Stefano Lattarini <address@hidden>
Date: Wed May 23 10:57:10 2012 +0200
[ng] doc: update w.r.t. recent changes in testsuite harnesses (TESTS-based)
* doc/automake-ng.texi (EXEEXT): $(TESTS) and $(XFAIL_TESTS) are not
anymore rewritten for $(EXEEXT) appending, even when the 'serial-tests'
option is in use.
(Parallel Tests Harness): The content of $(TEST_EXTENSIONS) is more
liberally accepted now (any dot-starting string is accepted), and if it
turns out any entry is invalid, an error about that will be reported at
make runtime, not at automake runtime.
* t/test-extensions-funny-chars.sh: Enhance to verify that we can actually
have test extension composed by digits (as is implied by the manual).
Signed-off-by: Stefano Lattarini <address@hidden>
commit 17b0bf6098aa84f84ebcadb1686989af152f87f8
Author: Stefano Lattarini <address@hidden>
Date: Tue May 22 23:22:01 2012 +0200
[ng] coverage: parallel-tests and dynamic $(TEST_EXTENSIONS) content
The recent changes to the parallel-tests implementation should allow us
to define or override TEST_EXTENSIONS with more dynamic contents; in
particular, something like:
TEST_EXTENSIONS = $(suffix $(TESTS))
should now work smoothly.
* t/test-extensions-dynamic.sh: New test.
Signed-off-by: Stefano Lattarini <address@hidden>
commit 08644d068609dc7bdca008cf76a285c441225650
Author: Stefano Lattarini <address@hidden>
Date: Tue May 22 22:37:34 2012 +0200
[ng] cosmetics: improve comments and spacing in 'parallel-tests.am'
* lib/am/parallel-tests.am: Fix some comment typos and missing
capitalization; improve clarity through more use of vertical
spacing; add a coupe of explicative comments.
Signed-off-by: Stefano Lattarini <address@hidden>
commit 508270d52ac913fe2260d0821d69c249f65450f6
Author: Stefano Lattarini <address@hidden>
Date: Tue May 22 22:34:11 2012 +0200
[ng] check: support conditional $(TEST_EXTENSIONS)
That is pretty easy to do with the current code base; just ...
* automake.in (handle_tests): ... stop erroring on conditional contents
of TEST_EXTENSIONS, and move the definitions of a default TEST_EXTENSIONS
variable ...
* lib/am/parallel-tests.am: ... in here.
* t/test-extensions-cond.sh: Rewritten to adapt to the new semantic.
Signed-off-by: Stefano Lattarini <address@hidden>
commit 743e8c19479d346350899ab7bb1636bcc17eeea2
Author: Stefano Lattarini <address@hidden>
Date: Wed May 23 00:31:49 2012 +0200
[ng] check: warn about dot-less $(TEST_EXTENSIONS) at make runtime
* lib/am/parallel-tests.am: Analyze the $(TEST_EXTENSIONS) contents at
make runtime, instead of relying on the '%INVALID_TEST_EXTENSIONS%'
transform once passed in by automake. Do any necessary error reporting
with the help of ...
(am__maybe_invalid_test_extensions): ... this new function.
* automake.in (is_valid_test_extension): Delete.
(handle_tests): Don't call that anymore. Simplify accordingly. Rely
on code in parallel-tests.am to report the proper errors at runtime.
* t/test-extensions.sh: Moved ...
* t/test-extensions-invalid.sh: ... to this, nd updated.
* Makefile.am (XFAIL_TESTS): Drop 'test-extensions.sh'.
Signed-off-by: Stefano Lattarini <address@hidden>
commit 9a9f7b596c1e94eb90d07e09af6dc4bad1b771a9
Author: Stefano Lattarini <address@hidden>
Date: Tue May 22 18:28:49 2012 +0200
[ng] check: be laxer in accepted $(TEST_EXTENSIONS)
Relax our checks on the contents of $(TEST_EXTENSIONS) by simply
verifying that every entry there starts with a dot.
The only reasons the restriction on the $(TEST_EXTENSIONS) was in
place was to ensure the relevant LOG_COMPILER, LOG_DRIVER, etc.,
variables derived from an extension had valid names according to
POSIX; but this is overkill for GNU make, since for it variables
names can happily contain "funny" characters as well (e.g., '!',
'@', '-', ...).
Maybe in the future we could start to again complain about truly
problematic characters (like '$', '=' or ','), but let's not
over-engineer for the moment. After all, mainline Automake had
suffered from a similar limitation in the long-lived version 1.11
(until commit v1.11-476-g90bea64 of 2011-10-01, "parallel-tests:
automake error our on invalid TEST_EXTENSIONS"), and nobody had
ever complained.
* automake.in (is_valid_test_extension): Be much laxer: accept
all the strings beginning with a dot, in addition to the @EXEEXT@
substitution.
* t/test-extensions-funny-chars.sh: New test.
Signed-off-by: Stefano Lattarini <address@hidden>
commit e5d1890ba1b3a5d83fd4b133d144c1ff38b5b681
Author: Stefano Lattarini <address@hidden>
Date: Tue May 22 17:01:12 2012 +0200
[ng] check: logic to define *LOG_DRIVER vars moved to generated Makefiles
If a LOG_DRIVER variable is undefined, we should define a default for it,
pointing to the "simple" test driver ('lib/test-driver' in the automake
repository). Move the logic to do so out of the automake script and into
the generated Makefiles.
* automake.in (handle_per_suffix_test): Remove.
(handle_tests): Don't call it anymore, and simplify accordingly.
* lib/am/parallel-tests.am (am__handle_per_suffix_test): Define the
relevant LOG_DRIVER variable to a proper default if it is undefined.
* t/test-driver-cond.sh: Remove obsolete grepping checks.
Signed-off-by: Stefano Lattarini <address@hidden>
commit 9a5f837c23a659931ad8ea03242d633e3678392d
Author: Stefano Lattarini <address@hidden>
Date: Tue May 22 16:21:28 2012 +0200
[ng] warns: don't report possible issues with '_DEPENDENCIES' variables
This will allow us to move (in future changes) some more processing at
make runtime, without having automake complain spuriously (which couldn't
be avoided, as to avoid such complaints automake should have access to
context and information only available at make runtime -- which is clearly
impossible).
* NG-NEWS: Document that Automake-NG can be weaker than mainline Automake
in diagnostic and early error detection; and also explain why it is so.
* automake.in (check_typos): Don't check for possible typos in the
'_DEPENDENCIES'.
Consequently, don't bother calling 'set_seen' ...
(handle_per_suffix_test): ... on the 'LOG_DEPENDENCIES' variables ...
(scan_aclocal_m4): ... nor on the 'CONFIG_STATUS_DEPENDENCIES' and
'CONFIGURE_DEPENDENCIES' variables ...
(handle_tags): ... nor on the 'TAGS_DEPENDENCIES' variable ...
(handle_ltlibraries): ... nor on the 'libfoo_la_DEPENDENCIES' nor
the 'EXTRA_libfoo_la_DEPENDENCIES' variables ...
(handle_libraries): ... nor on the 'libfoo_a_DEPENDENCIES' nor the
'EXTRA_libfoo_a_DEPENDENCIES' variables ...
(handle_programs): ... nor on the 'program_DEPENDENCIES' nor the
'EXTRA_program_DEPENDENCIES' variables.
* t/vartypos.sh, t/vartypo2.sh: Relax accordingly.
Signed-off-by: Stefano Lattarini <address@hidden>
commit 20a1ce3d6b61c97536b701a52961ef8fa342677d
Author: Stefano Lattarini <address@hidden>
Date: Tue May 22 15:20:48 2012 +0200
[ng] refactor: merge check2.am into parallel-tests.am
Another change aimed at moving logic and processing out of automake
and inside the generated Makefiles. This is mostly a preparatory
step.
* lib/am/check2.am: Merged ...
* lib/am/parallel-tests.am: ... in here, with the (several) required
adjustments and extensions.
* Makefile.am (dist_am_DATA): Adjust.
(XFAIL_TESTS): Add 't/test-extensions.sh'.
* automake.in (handle_per_suffix_test): Don't process nor include
'check2.am' anymore.
* t/parallel-tests-internals.sh: New test.
* t/serial-tests.sh: Adjust grepping checks.
Signed-off-by: Stefano Lattarini <address@hidden>
commit 993f03a12d68efb489d6cbe8c7943cf61b1000a5
Author: Stefano Lattarini <address@hidden>
Date: Tue May 22 14:33:52 2012 +0200
[ng] am: new make variable '$(am__handle_exeext)'
This is just a preparatory commit in view of future changes.
* lib/am/header-vars.am (am__handle_exeext): New internal variable,
defined to "yes" if the automake static conditional '?HANDLE-EXEEXT?'
is true, and to "no" otherwise.
Signed-off-by: Stefano Lattarini <address@hidden>
commit 8c64f4c94278dbb66b33aeb3c396c6b1fd04387a
Author: Stefano Lattarini <address@hidden>
Date: Tue May 22 01:48:52 2012 +0200
[ng] check: unconditionally distribute test-driver
This new behaviour is suboptimal, but will allow us to move yet more
logic and processing from the automake scripts into the generated
Makefiles.
* automake.in (handle_tests): Distribute 'test-driver' unconditionally
if the variable TESTS is defined and the 'serial-tests' option is not
used.
(handle_per_suffix_test): Don't distribute 'test-driver' anymore.
* Several tests: Adjust.
* t/test-driver-custom-no-extra-driver.sh: Remove as obsolete.
Signed-off-by: Stefano Lattarini <address@hidden>
commit 9c259ea642d885b8a6b5f3414e7e0016752b9c91
Author: Stefano Lattarini <address@hidden>
Date: Tue May 22 01:37:28 2012 +0200
[ng] check: warn about invalid TEST_EXTENSIONS at make runtime
* automake.in (handle_tests): Instead of warning about invalid test
extensions at Automake runtime, pass their list through the transform
'%INVALID_TEST_EXTENSIONS%' to ...
* lib/am/parallel-tests.am: ... this file, that will warn at make
runtime if that list is not empty.
Signed-off-by: Stefano Lattarini <address@hidden>
commit 6b33d2b1922a0cbcd2141c31d13748b4661ffad0
Author: Stefano Lattarini <address@hidden>
Date: Tue May 22 01:11:42 2012 +0200
[ng] check: separate serial and parallel harnesses in distinct '.am' files
This is just code reordering. No semantic change is intended.
* lib/am/check.am: Split out ...
* lib/am/parallel-tests.am, lib/am/serial-tests.am: ... into these
two files.
* automake.in (handle_tests): Adjust.
* Makefile.am (dist_am_DATA): Likewise.
Signed-off-by: Stefano Lattarini <address@hidden>
commit c3eb27283dbe3328f333b3344c11216f788974d2
Author: Stefano Lattarini <address@hidden>
Date: Tue May 22 00:58:58 2012 +0200
[ng] check: move definition of console colors in its own '.am' fragment
This is only meant to simplify future changes. No semantic change is
intended.
* lib/am/check.am: Include ...
* lib/am/check.am (am__tty_colors, am__tty_colors_dummy): Move out to ...
* lib/am/color-tests.am: ... this new file.
* Makefile.am (dist_am_DATA): Adjust.
Signed-off-by: Stefano Lattarini <address@hidden>
commit 9a16c3c08bdc2d26f64ee513c0796b75b50b1a4e
Author: Stefano Lattarini <address@hidden>
Date: Mon May 21 23:27:55 2012 +0200
[ng] refactor: make '$am_config_aux_dir' available as a make variable
This API improvement will become useful in future changes.
* automake.in (generate_makefile): Define an internal make variable
'$(am__config_aux_dir)', holding value '$am_config_aux_dir' computed
at Automake time.
(All users): Adjusted.
* t/distcom2.sh: Adjust.
* t/distcom-subdir.sh: Likewise.
* t/yacc-auxdir.sh: Likewise.
* t/auxdir.sh: Adjust and simplify.
* t/auxdir6.sh: Likewise.
* t/auxdir7.sh: Likewise.
* t/auxdir8.sh: Likewise.
Signed-off-by: Stefano Lattarini <address@hidden>
commit cf8fc13a4f3ff8d03cdb93019e5d5c2796937dca
Author: Stefano Lattarini <address@hidden>
Date: Mon May 21 23:15:31 2012 +0200
[ng] am: implement $(am__tolower) and $(am__toupper)
These new make functions will be useful in future changes.
* lib/am/header-vars.am (am__toupper, am__tolower): New make functions.
* t/internals.tap: Test them.
Signed-off-by: Stefano Lattarini <address@hidden>
commit c868a21c22ae33e037c6dcb0ec42d758d8be9d12
Author: Stefano Lattarini <address@hidden>
Date: Mon May 21 22:40:34 2012 +0200
[ng] tests: get rid of an almost-obsolete test case (parallel-tests related)
* t/posixsubst-tests.sh: Remove this test, merging the still-relevant
parts of it ...
* t/parallel-tests-dynamic.sh: ... in here. Since we are at it, make
existing grepping checks on "make check" output slightly stricter.
Signed-off-by: Stefano Lattarini <address@hidden>
commit 3dee480d80bab18f527c483c73523edc53a58e9c
Author: Stefano Lattarini <address@hidden>
Date: Mon May 21 22:23:56 2012 +0200
[ng] serial-tests: simplify automake-time preprocessing
Prefer make-time and recipe-time processing instead. Note that this
change does not (nor is meant to) offer any simplification nor performance
enhancement (in fact, it actually complicates the code); its purpose is
to continue the trend of "move logic and knowledge out of the automake
script and into the generated Makefiles".
* NG-NEWS: Report that $(TESTS) and $(XFAIL_TESTS) are not rewritten
anymore for $(EXEEXT) appending.
* automake.in (handle_tests): Don't rewrite TESTS nor XFAIL_TESTS
anymore.
* lib/am/check.am: If 'EXEEXT' AC_SUBST is used, process $(TESTS) and
$(XFAIL_TESTS) for $(EXEEXT) appending (for entries that are also
compiled programs). Do so with the help of ...
(am__check_cook_with_exeext_1, am__check_cook_with_exeext): ... this
new internal make functions, and place the processed content into
(am__cooked_tests, am__cooked_xfail_tests): ... these new internal
variables respectively.
(check-TESTS): Depend on and use $(am__cooked_tests) rather than
plain $(TESTS). While we are at it, remove some code duplication
with the help of the new 'is_xfail_test' shell function.
* t/check5.sh: Adjust and extend.
* t/check7.sh: Likewise.
* t/serial-tests.sh: Adjust.
* t/exeext4.sh: Adjust.
Signed-off-by: Stefano Lattarini <address@hidden>
commit 4faacc9ba39b9d5e27eb598653d4089055af0c2c
Author: Stefano Lattarini <address@hidden>
Date: Mon May 21 19:16:10 2012 +0200
[ng] am: new private make variable $(am__all_progs)
This is just a preparatory refactoring for future changes.
* automake.in (generate_makefile): Substitute $(am__all_progs) to the
list of all programs "seen" by automake (by looking at the PROGRAMS
primary).
* t/all-progs.sh: New test.
Signed-off-by: Stefano Lattarini <address@hidden>
commit 9ccf085a8d0ada7ce5096360dfa76cd7a792afab
Author: Stefano Lattarini <address@hidden>
Date: Thu May 17 11:40:49 2012 +0200
[ng] dirstamp: remove, use inlined parent directory creation instead
Since GNU make offers an efficient and simple way to refer to the directory
component of a target within its recipe (through the use of the automatic
variable "$(@D)"), and ways to avoid launching a "sub-recipe" to create
a directory if that directory already exists (through a careful the use
of the $(wildcard) builtin), we can simplify the automake pre-processing
a little by getting rid of dirstamp files creation, instead inlining the
creation of any required parent directory for a target into the recipe of
the target itself.
As a first step, instead of emitting rules like:
sub/foo.o: sub/foo.c sub/.dirstamp
$(CC) $(CFLAGS) sub/foo.c
sub/.dirstamp:
mkdir sub && touch sub/.dirstamp
we might simply emit rules like:
sub/foo.o: sub/foo.c
$(MKDIR_P) $(@D)
$(CC) $(CFLAGS) sub/foo.c
But the above would be quite wasteful if we really called $(MKDIR_P) for
every created object file, since the directory $(@D) will likely already
exist (in an in-tree build, it will exist unconditionally and beforehand,
and in a VPATH build will exists after the first object file in it has
been created).
So, as hinted above, we employ few optimizations to try to avoid such
extra forks when they are not really required, thus keeping most of
the performance gains offered by dirstamp files, but without the added
pre-processing complexity.
* automake.in (preprocess_file): Add a transform for '%SILENT%', as
returned by the 'silent_flag()' subroutine.
(output_texinfo_build_rules, handle_languages, handle_programs,
handle_libraries): Drop explicit '%SILENT%' transforms for single
'.am' files as a result.
(%directory_map): Delete this global variable.
(initialize_per_input): Do not reset it.
(handle_single_transform): Don't create dependency of subdir objects
on the corresponding dirstamp file.
(handle_programs, handle_libraries): Likewise, but for subdir programs
and libraries. And drop the '%DIRSTAMP%' transform when processing the
relevant '.am' fragment.
(output_texinfo_build_rules): Don't handle nor return a dirstamp.
(handle_texinfo_helper): Adjust, and drop the '%DIRSTAMP%' transform
when processing the relevant .am fragment.
(require_build_directory, require_build_directory_maybe): Delete.
* lib/am/header-vars.am (am__ensure_dir_exists, am__mkdir): New private
make function, used to create a directory with "maximal" possible
efficiency, especially trying to avoid extra forks when possible.
* t/ensure-dir-exists.sh: New test, checking the behaviour of the new
$(am__mkdir) function.
* t/spy-wildcard.sh: New "spy" test, verifying that the $(wildcard)
GNU make builtin really has the behaviour the $(am__ensure_dir_exists)
expects.
* t/subobj-libtool.sh: New test (subdir objects with libtool).
* t/subobj.sh: Adjust and enhance.
* t/subobj6.sh: Remove as obsolete.
* lib/am/library.am: Adjust to create required targets parent directories
with the help of $(am__ensure_dir_exists) rather than of dirstamp files,
once provided by the now-removed '%DIRSTAMP%' transforms.
* lib/am/ltlibrary.am: Likewise.
* lib/am/program.am: Likewise.
* lib/am/texi-vers.am: Likewise.
* lib/am/texibuild.am: Likewise.
* lib/am/depend2.am: Likewise. Also ...
(am__ensure_depdir): Rewrite to using $(am__ensure_dir_exists).
Signed-off-by: Stefano Lattarini <address@hidden>
-----------------------------------------------------------------------
Summary of changes:
Makefile.am | 5 +-
NG-NEWS | 63 ++++--
automake.in | 250 +++-----------------
doc/automake-ng.texi | 19 +-
lib/am/check2.am | 68 ------
lib/am/color-tests.am | 45 ++++
lib/am/depend2.am | 14 +-
lib/am/header-vars.am | 36 +++
lib/am/library.am | 10 +-
lib/am/ltlibrary.am | 4 +-
lib/am/{check.am => parallel-tests.am} | 218 +++++++-----------
lib/am/program.am | 6 +-
lib/am/serial-tests.am | 135 +++++++++++
lib/am/texi-vers.am | 6 +-
lib/am/texibuild.am | 22 +-
t/{stdinc.sh => all-progs.sh} | 58 +++---
t/auxdir.sh | 9 +-
t/auxdir6.sh | 14 +-
t/auxdir7.sh | 14 +-
t/auxdir8.sh | 14 +-
t/check5.sh | 26 ++-
t/check7.sh | 51 ++++-
t/distcom-subdir.sh | 31 +--
t/distcom2.sh | 10 +-
t/ensure-dir-exists.sh | 70 ++++++
t/exeext4.sh | 6 +-
t/internals.tap | 44 ++++-
t/parallel-tests-dynamic.sh | 51 +++--
...allel-tests6.sh => parallel-tests-internals.sh} | 20 +-
t/posixsubst-tests.sh | 68 ------
t/serial-tests.sh | 4 +-
t/{option-ng.sh => spy-wildcard.sh} | 22 +-
t/subobj-libtool.sh | 95 ++++++++
t/subobj.sh | 84 ++++++-
t/subobj6.sh | 85 -------
t/tap-bad-prog.tap | 15 +-
t/tap-basic.sh | 9 +-
t/tap-common-setup.sh | 17 +-
t/tap-diagnostic-custom.sh | 3 +-
t/tap-more.sh | 7 +
t/tap-more2.sh | 2 +-
t/tap-recheck.sh | 2 +-
t/test-driver-acsubst.sh | 7 +
t/test-driver-cond.sh | 7 -
t/test-driver-create-log-dir.sh | 7 +
t/test-driver-custom-multitest.sh | 7 +
t/test-driver-custom-no-extra-driver.sh | 62 -----
t/test-driver-custom.sh | 7 +
t/test-driver-fail.sh | 2 +-
t/test-driver-strip-vpath.sh | 2 +-
t/test-extensions-cond.sh | 107 ++++++---
t/test-extensions-dynamic.sh | 94 ++++++++
t/test-extensions-funny-chars.sh | 132 ++++++++++
...el-tests-once.sh => test-extensions-invalid.sh} | 30 +--
t/test-extensions.sh | 70 ------
t/test-metadata-global-log.sh | 3 +-
t/test-metadata-global-result.sh | 2 +-
t/test-metadata-recheck.sh | 2 +-
t/test-metadata-results.sh | 2 +-
t/vartypo2.sh | 9 +-
t/vartypos.sh | 14 +-
t/yacc-auxdir.sh | 4 +-
62 files changed, 1269 insertions(+), 1033 deletions(-)
delete mode 100644 lib/am/check2.am
create mode 100644 lib/am/color-tests.am
rename lib/am/{check.am => parallel-tests.am} (76%)
create mode 100644 lib/am/serial-tests.am
copy t/{stdinc.sh => all-progs.sh} (60%)
create mode 100755 t/ensure-dir-exists.sh
copy t/{parallel-tests6.sh => parallel-tests-internals.sh} (71%)
delete mode 100755 t/posixsubst-tests.sh
copy t/{option-ng.sh => spy-wildcard.sh} (67%)
create mode 100755 t/subobj-libtool.sh
delete mode 100755 t/subobj6.sh
delete mode 100755 t/test-driver-custom-no-extra-driver.sh
create mode 100755 t/test-extensions-dynamic.sh
create mode 100755 t/test-extensions-funny-chars.sh
copy t/{parallel-tests-once.sh => test-extensions-invalid.sh} (63%)
delete mode 100755 t/test-extensions.sh
diff --git a/Makefile.am b/Makefile.am
index 39cde85..60d5ab7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -223,8 +223,9 @@ EXTRA_DIST += lib/Automake/Config.in
## --------------------- ##
dist_am_DATA = \
- lib/am/check.am \
- lib/am/check2.am \
+ lib/am/serial-tests.am \
+ lib/am/parallel-tests.am \
+ lib/am/color-tests.am \
lib/am/clean-hdr.am \
lib/am/clean.am \
lib/am/compile.am \
diff --git a/NG-NEWS b/NG-NEWS
index 2fbc0e4..1334438 100644
--- a/NG-NEWS
+++ b/NG-NEWS
@@ -59,6 +59,20 @@ Warnings and diagnostic
* The 'portability-recursive' warning category is obsolete, and has been
removed.
+* Automake-NG is less smart than mainline Automake in detecting some kind
+ of possible typos or suspicious usages at automake runtime. This is due
+ to the fact that more processing and logic takes place in the generated
+ Makefiles rather than in the automake script, so that the latter has
+ access to less context and information.
+
+Serial testsuite harness (obsolescent)
+======================================
+
+* The $(TESTS) and $(XFAIL_TESTS) variables are not anymore rewritten for
+ $(EXEEXT) appending. The use of compiled programs in $(TESTS) and
+ $(XFAIL_TESTS) still works as before though, even on systems where
+ $(EXEEXT) is non-empty.
+
Parallel testsuite harness
==========================
@@ -72,20 +86,18 @@ Parallel testsuite harness
thanks to a careful use of pattern rules.
* The new implementation of the parallel-tests harness tries to defer
- as much as possible processing on the $(TESTS) variable at make,
- rather than doing it at automake time. This as some positive effects
- (described below), but also entails a minor annoyance. When automake
- runs, it cannot know anymore whether $(TESTS) contains or not any
- entry with no recognized test suffix; as a consequence, it always
- need the '$(LOG_DRIVER)' variable to be defined. If it's not,
- automake will define it to a proper invocation of the 'test-driver'
- auxiliary script, and require that script to be present in the
- config-aux directory (or bring it in if "--add-missing" is in use).
- If you know you package won't make use of suffix-less tests (thus, in
- particular, no use of compiled programs in $(TESTS)), you can avoid
- requiring the 'test-driver' script by adding this line to your
- configure.ac:
- AC_SUBST([LOG_DRIVER], ['unused but required by automake'])
+ as much as possible processing on the $(TESTS), $(XFAIL_TESTS) and
+ $(TEST_EXTENSIONS) variable at make runtime, rather than doing it at
+ automake time. This has several positive effects (described below),
+ but also entails a minor annoyance: due to implementation reasons, the
+ 'test-driver' auxiliary script is now always required and distributed,
+ even if no test script actually uses it as its LOG_DRIVER script.
+ This is not a big deal in practice, since as of today, all the real
+ world packages out there actually use 'test-driver' for most (if not
+ all) of their tests (the introduction of TAP support in mainstream
+ automake being too recent for those packages to have had time to phase
+ out their protocol-less tests, assuming they wanted to -- which is
+ usually not the case either).
* The parallel testsuite harness realizes whether an entry of $(TESTS)
start with $(srcdir) (as in "TESTS = $(srcdir)/foo.test"), and manages
@@ -97,7 +109,28 @@ Parallel testsuite harness
advanced features (like specific builtins or user-defined functions)
in the definition of $(TESTS); for example, the following should now
work as expected:
- TESTS = $(wildcard $(srcdir)/t[0-9][0-9]*.sh)
+
+ TESTS = $(wildcard $(srcdir)/t[0-9][0-9]*.sh)
+
+* The contents of $(TEST_EXTENSIONS) are mostly analyzed at make runtime
+ rather than at automake runtime, so that it is now possible to use
+ Automake conditionals and GNU make advanced features in the definition
+ of $(TEST_EXTENSIONS); for example, the following should now work as
+ expected:
+
+ TEST_EXTENSIONS = $(sort $(suffix $(TESTS)))
+ if SUPPORT_SHELL_TESTS
+ TEST_EXTENSIONS += .sh
+ endif
+
+* We are more liberal and lenient in accepting TEST_EXTENSIONS entries:
+ it's enough that they start with a dot to be considered valid. However,
+ using overly "funny" characters (like '!' or '@') could cause problems,
+ so the user is still advised to limit himself to the use of alphanumeric
+ characters, plus eventually '.', '-', and '_'.
+
+* Errors about invalid content of $(TEST_EXTENSIONS) are reported at
+ make runtime, not auto Automake runtime.
* It is not anymore possible to override TEST_LOGS at make runtime as a
mean to redefine the list of tests to be run.
diff --git a/automake.in b/automake.in
index 7b0ac7a..d2d1551 100644
--- a/automake.in
+++ b/automake.in
@@ -574,13 +574,6 @@ my %object_map;
# libtool compilation (the COMPILE_* constants).
my %object_compilation_map;
-
-# This keeps track of the directories for which we've already
-# created dirstamp code. Keys are directories, values are stamp files.
-# Several keys can share the same stamp files if they are equivalent
-# (as are './/foo' and 'foo').
-my %directory_map;
-
# All .P files.
my %dep_files;
@@ -692,8 +685,6 @@ sub initialize_per_input ()
%object_map = ();
%object_compilation_map = ();
- %directory_map = ();
-
%dep_files = ();
@dist_targets = ();
@@ -1322,7 +1313,7 @@ sub handle_languages
{
# Set location of depcomp.
&define_variable ('depcomp',
- "\$(SHELL) $am_config_aux_dir/depcomp",
+ '$(SHELL) $(am__config_aux_dir)/depcomp',
INTERNAL);
require_conf_file ("$am_file.am", FOREIGN, 'depcomp');
@@ -1373,7 +1364,6 @@ sub handle_languages
my $verbose = verbose_flag ($lang->ccer || 'GEN');
my $verbose_nodep = ($AMDEP eq 'FALSE')
? $verbose : verbose_nodep_flag ($lang->ccer || 'GEN');
- my $silent = silent_flag ();
my %transform = ('EXT' => $ext,
'PFX' => $pfx,
@@ -1388,7 +1378,6 @@ sub handle_languages
DIST_SOURCE => 1,
VERBOSE => $verbose,
'VERBOSE-NODEP' => $verbose_nodep,
- SILENT => $silent,
);
# Generate the appropriate rules for this extension.
@@ -1490,7 +1479,6 @@ sub handle_languages
VERBOSE => $verbose,
'VERBOSE-NODEP' => $verbose_nodep,
- SILENT => $silent,
COMPILE => $obj_compile,
LTCOMPILE => $obj_ltcompile,
-o => $output_flag,
@@ -1894,7 +1882,6 @@ sub handle_single_transform ($$$$$%)
if (! defined $object_map{$object})
{
- my @dep_list = ();
$object_map{$object} = $full;
# If resulting object is in subdir, we need to make
@@ -1923,12 +1910,7 @@ sub handle_single_transform ($$$$$%)
# Remove any libtool object in this directory.
$libtool_clean_directories{$directory} = 1;
}
-
- push (@dep_list, require_build_directory ($directory));
}
-
- &pretty_print_rule ($object . ':', "\t", @dep_list)
- if scalar @dep_list > 0;
}
# Transform .o or $o file into .P file (for automatic
@@ -2429,18 +2411,12 @@ sub handle_programs
reject_var ($xname . '_LIBADD',
"use '${xname}_LDADD', not '${xname}_LIBADD'");
- set_seen ($xname . '_DEPENDENCIES');
- set_seen ('EXTRA_' . $xname . '_DEPENDENCIES');
set_seen ($xname . '_LDFLAGS');
# Determine program to use for link.
my($xlink, $vlink) = &define_per_target_linker_variable ($linker,
$xname);
$vlink = verbose_flag ($vlink || 'GEN');
- # If the resulting program lies into a subdirectory,
- # make sure this directory will exist.
- my $dirstamp = require_build_directory_maybe ($one_file);
-
$libtool_clean_directories{dirname ($one_file)} = 1;
$output_rules .= &file_contents ('program',
@@ -2449,7 +2425,6 @@ sub handle_programs
XPROGRAM => $xname,
XLINK => $xlink,
VERBOSE => $vlink,
- DIRSTAMP => $dirstamp,
EXEEXT => '$(EXEEXT)');
if ($seen_libobjs || $seen_global_libobjs)
@@ -2541,26 +2516,16 @@ sub handle_libraries
reject_var ($xlib . '_LDADD',
"use '${xlib}_LIBADD', not '${xlib}_LDADD'");
- # Make sure we at look at this.
- set_seen ($xlib . '_DEPENDENCIES');
- set_seen ('EXTRA_' . $xlib . '_DEPENDENCIES');
-
&handle_source_transform ($xlib, $onelib, $obj, $where,
NONLIBTOOL => 1, LIBTOOL => 0);
- # If the resulting library lies into a subdirectory,
- # make sure this directory will exist.
- my $dirstamp = require_build_directory_maybe ($onelib);
my $verbose = verbose_flag ('AR');
- my $silent = silent_flag ();
$output_rules .= &file_contents ('library',
$where,
VERBOSE => $verbose,
- SILENT => $silent,
LIBRARY => $onelib,
- XLIBRARY => $xlib,
- DIRSTAMP => $dirstamp);
+ XLIBRARY => $xlib);
if ($seen_libobjs)
{
@@ -2728,10 +2693,8 @@ sub handle_ltlibraries
$where->push_context ("while processing Libtool library '$onelib'");
$where->set (INTERNAL->get);
- # Make sure we look at these.
+ # Make sure we look at this.
set_seen ($xlib . '_LDFLAGS');
- set_seen ($xlib . '_DEPENDENCIES');
- set_seen ('EXTRA_' . $xlib . '_DEPENDENCIES');
# Generate support for conditional object inclusion in
# libraries.
@@ -2792,10 +2755,6 @@ sub handle_ltlibraries
}
}
- # If the resulting library lies into a subdirectory,
- # make sure this directory will exist.
- my $dirstamp = require_build_directory_maybe ($onelib);
-
# Remember to cleanup .libs/ in this directory.
my $dirname = dirname $onelib;
$libtool_clean_directories{$dirname} = 1;
@@ -2806,8 +2765,7 @@ sub handle_ltlibraries
XLTLIBRARY => $xlib,
RPATH => $rpath,
XLINK => $xlink,
- VERBOSE => $vlink,
- DIRSTAMP => $dirstamp);
+ VERBOSE => $vlink);
if ($seen_libobjs)
{
if (var ($xlib . '_LIBADD'))
@@ -2831,7 +2789,7 @@ sub check_typos ()
# It is ok if the user sets this particular variable.
set_seen 'AM_LDFLAGS';
- foreach my $primary ('SOURCES', 'LIBADD', 'LDADD', 'LDFLAGS', 'DEPENDENCIES')
+ foreach my $primary ('SOURCES', 'LIBADD', 'LDADD', 'LDFLAGS')
{
foreach my $var (variables $primary)
{
@@ -2958,7 +2916,7 @@ sub scan_texinfo_file ($)
}
-# ($DIRSTAMP, @CLEAN_FILES)
+# @CLEAN_FILES
# output_texinfo_build_rules ($SOURCE, $DEST, $INSRC, @DEPENDENCIES)
# ------------------------------------------------------------------
# SOURCE - the source Texinfo file
@@ -3022,10 +2980,6 @@ sub output_texinfo_build_rules ($$$@)
# extension).
my $generic_info = ($generic && $dsfx) ? 1 : 0;
- # If the resulting file lie into a subdirectory,
- # make sure this directory will exist.
- my $dirstamp = require_build_directory_maybe ($dest);
-
my $dipfx = ($insrc ? '$(srcdir)/' : '') . $dpfx;
$output_rules .= file_contents ('texibuild',
@@ -3037,12 +2991,10 @@ sub output_texinfo_build_rules ($$$@)
DEST_PREFIX => $dpfx,
DEST_INFO_PREFIX => $dipfx,
DEST_SUFFIX => $dsfx,
- DIRSTAMP => $dirstamp,
GENERIC => $generic,
GENERIC_INFO => $generic_info,
INSRC => $insrc,
MAKEINFOFLAGS => $makeinfoflags,
- SILENT => silent_flag(),
SOURCE => ($generic
? '$<' : $source),
SOURCE_INFO => ($generic_info
@@ -3052,7 +3004,7 @@ sub output_texinfo_build_rules ($$$@)
TEXIQUIET => verbose_flag('texinfo'),
TEXIDEVNULL =>
verbose_flag('texidevnull'),
);
- return ($dirstamp, "$dpfx.dvi", "$dpfx.pdf", "$dpfx.ps", "$dpfx.html");
+ return ("$dpfx.dvi", "$dpfx.pdf", "$dpfx.ps", "$dpfx.html");
}
@@ -3223,8 +3175,8 @@ sub handle_texinfo_helper ($)
push_dist_common ('$(' . $canonical . '_TEXINFOS)');
}
- my ($dirstamp, @cfiles) =
- output_texinfo_build_rules ($texi, $out_file, $insrc, @texi_deps);
+ my @cfiles = output_texinfo_build_rules ($texi, $out_file,
+ $insrc, @texi_deps);
push (@texi_cleans, @cfiles);
push (@info_deps_list, $out_file);
@@ -3258,7 +3210,7 @@ sub handle_texinfo_helper ($)
my $conf_dir;
if ($config_aux_dir_set_in_configure_ac)
{
- $conf_dir = "$am_config_aux_dir/";
+ $conf_dir = '$(am__config_aux_dir)/';
}
else
{
@@ -3270,8 +3222,7 @@ sub handle_texinfo_helper ($)
VTI => $vti,
STAMPVTI => "${soutdir}stamp-$vti",
VTEXI => "$soutdir$vtexi",
- MDDIR => $conf_dir,
- DIRSTAMP => $dirstamp);
+ MDDIR => $conf_dir);
}
}
@@ -3287,7 +3238,7 @@ sub handle_texinfo_helper ($)
}
elsif ($config_aux_dir_set_in_configure_ac)
{
- $texinfodir = $am_config_aux_dir;
+ $texinfodir = '$(am__config_aux_dir)';
define_variable ('TEXINFO_TEX', "$texinfodir/texinfo.tex", INTERNAL);
$need_texi_file = 2; # so that we require_conf_file later
}
@@ -3581,8 +3532,6 @@ sub handle_tags
TAGSDIRS => "@tag_deps",
CTAGSDIRS => "@ctag_deps",
CSCOPEDIRS => "@cscope_deps");
-
- set_seen 'TAGS_DEPENDENCIES';
}
elsif (reject_var ('TAGS_DEPENDENCIES',
"it doesn't make sense to define 'TAGS_DEPENDENCIES'"
@@ -3831,9 +3780,6 @@ sub scan_aclocal_m4 ()
{
my $regen_aclocal = 0;
- set_seen 'CONFIG_STATUS_DEPENDENCIES';
- set_seen 'CONFIGURE_DEPENDENCIES';
-
if (-f 'aclocal.m4')
{
&define_variable ("ACLOCAL_M4", '$(top_srcdir)/aclocal.m4', INTERNAL);
@@ -4564,54 +4510,6 @@ sub handle_tests_dejagnu
$output_rules .= file_contents ('dejagnu', new Automake::Location);
}
-sub handle_per_suffix_test($)
-{
- my $test_suffix = shift;
- my $pfx;
- if ($test_suffix eq '')
- {
- $pfx = '';
- }
- else
- {
- prog_error ("test suffix '$test_suffix' lacks leading dot")
- unless $test_suffix =~ m/^\.(.*)/;
- $pfx = uc ($1) . '_';
- }
- # The "test driver" program, deputed to handle tests protocol used by
- # test scripts. By default, it's assumed that no protocol is used, so
- # we fall back to the old behaviour, implemented by the 'test-driver'
- # auxiliary script.
- if (! var "${pfx}LOG_DRIVER")
- {
- require_conf_file ("parallel-tests", FOREIGN, 'test-driver');
- define_variable ("${pfx}LOG_DRIVER",
- "\$(SHELL) $am_config_aux_dir/test-driver",
- INTERNAL);
- }
- # Required to avoid spurious errors like:
- # ``variable 'LOG_DEPENDENCIES' is defined but no program or
- # library has 'LOG' as canonical name (possible typo)''
- set_seen ("${pfx}LOG_DEPENDENCIES");
- $output_rules .= file_contents ('check2', new Automake::Location,
- PFX => $pfx,
- EXT => $test_suffix);
-}
-
-# is_valid_test_extension ($EXT)
-# ------------------------------
-# Return true if $EXT can appear in $(TEST_EXTENSIONS), return false
-# otherwise.
-sub is_valid_test_extension ($)
-{
- my $ext = shift;
- return 1
- if ($ext =~ /^\.[a-zA-Z_][a-zA-Z0-9_]*$/);
- return 1
- if (exists $configure_vars{'EXEEXT'} && $ext eq subst ('EXEEXT'));
- return 0;
-}
-
# Handle TESTS variable and other checks.
sub handle_tests
{
@@ -4631,51 +4529,22 @@ sub handle_tests
if (var ('TESTS'))
{
push (@check_tests, 'check-TESTS');
- $output_rules .= &file_contents ('check', new Automake::Location,
- COLOR => !! option 'color-tests',
- SERIAL_TESTS => !! option 'serial-tests',
- CHECK_DEPS => "@check");
+
if (option 'serial-tests')
{
- # Tests that are known programs should have $(EXEEXT) appended.
- # For matching purposes, we need to adjust XFAIL_TESTS as well.
- append_exeext { exists $known_programs{$_[0]} } 'TESTS';
- append_exeext { exists $known_programs{$_[0]} } 'XFAIL_TESTS'
- if (var ('XFAIL_TESTS'));
+ $output_rules .=
+ file_contents ('serial-tests', new Automake::Location,
+ COLOR => !! option 'color-tests',
+ CHECK_DEPS => "@check");
}
else
{
define_variable ('TEST_SUITE_LOG', 'test-suite.log', INTERNAL);
- my $suff = '.test';
- define_variable ('TEST_EXTENSIONS', '.test', INTERNAL)
- if (! var 'TEST_EXTENSIONS');
- my $var = var 'TEST_EXTENSIONS';
- # Currently, we are not able to deal with conditional contents
- # in TEST_EXTENSIONS.
- if ($var->has_conditional_contents)
- {
- msg_var 'unsupported', $var,
- "'TEST_EXTENSIONS' cannot have conditional contents";
- }
- my @test_suffixes = $var->value_as_list_recursive;
- if ((my @invalid_test_suffixes =
- grep { !is_valid_test_extension $_ } @test_suffixes) > 0)
- {
- error $var->rdef (TRUE)->location,
- "invalid test extensions: @invalid_test_suffixes";
- }
- @test_suffixes = grep { is_valid_test_extension $_ } @test_suffixes;
- # 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) rather than from the 'all.test' script,
- # thus causing all sort of mishaps and confusion.
- push @test_suffixes, '';
- foreach my $test_suffix (@test_suffixes)
- {
- handle_per_suffix_test ($test_suffix);
- }
+ require_conf_file ("parallel-tests", FOREIGN, 'test-driver');
+ $output_rules .=
+ file_contents ('parallel-tests', new Automake::Location,
+ COLOR => !! option 'color-tests',
+ CHECK_DEPS => "@check");
$clean_files{'$(am__test_logs)'} = MOSTLY_CLEAN;
$clean_files{'$(am__test_results)'} = MOSTLY_CLEAN;
$clean_files{'$(TEST_SUITE_LOG)'} = MOSTLY_CLEAN;
@@ -4703,7 +4572,7 @@ sub handle_emacs_lisp
require_variables ($elfiles[0][0], "Emacs Lisp sources seen", TRUE,
'EMACS', 'lispdir');
require_conf_file ($elfiles[0][0], FOREIGN, 'elisp-comp');
- &define_variable ('elisp_comp', "$am_config_aux_dir/elisp-comp", INTERNAL);
+ &define_variable ('elisp_comp', '$(am__config_aux_dir)/elisp-comp',
INTERNAL);
}
# Handle Python
@@ -4715,7 +4584,7 @@ sub handle_python
require_variables ($pyfiles[0][0], "Python sources seen", TRUE, 'PYTHON');
require_conf_file ($pyfiles[0][0], FOREIGN, 'py-compile');
- &define_variable ('py_compile', "$am_config_aux_dir/py-compile", INTERNAL);
+ &define_variable ('py_compile', '$(am__config_aux_dir)/py-compile',
INTERNAL);
}
# Handle Java.
@@ -5703,7 +5572,7 @@ sub yacc_lex_finish_helper
# FIXME: for now, no line number.
require_conf_file ($configure_ac, FOREIGN, 'ylwrap');
- &define_variable ('YLWRAP', "$am_config_aux_dir/ylwrap", INTERNAL);
+ &define_variable ('YLWRAP', '$(am__config_aux_dir)/ylwrap', INTERNAL);
}
sub lang_yacc_finish
@@ -6657,6 +6526,7 @@ sub preprocess_file ($%)
'NONLIBTOOL' => 1,
'HANDLE-EXEEXT' => (exists $configure_vars{'EXEEXT'} ?
'TRUE' : 'FALSE'),
+ 'SILENT' => silent_flag (),
%transform);
if (! defined ($_ = $am_file_cache{$file}))
@@ -7324,7 +7194,7 @@ sub push_required_file
# of $am_config_aux_dir here is deliberate and necessary.
elsif ($dir eq $config_aux_dir)
{
- push_dist_common ("$am_config_aux_dir/$file");
+ push_dist_common ('$(am__config_aux_dir)/' . $file);
}
# FIXME: another spacial case, for AC_LIBOBJ/AC_LIBSOURCE support.
# We probably need some refactoring of this function and its callers,
@@ -7638,68 +7508,6 @@ sub require_conf_file_with_macro ($$$@)
################################################################
-# &require_build_directory ($DIRECTORY)
-# -------------------------------------
-# Emit rules to create $DIRECTORY if needed, and return
-# the file that any target requiring this directory should be made
-# dependent upon.
-# We don't want to emit the rule twice, and want to reuse it
-# for directories with equivalent names (e.g., 'foo/bar' and './foo//bar').
-sub require_build_directory ($)
-{
- my $directory = shift;
-
- return $directory_map{$directory} if exists $directory_map{$directory};
-
- my $cdir = File::Spec->canonpath ($directory);
-
- if (exists $directory_map{$cdir})
- {
- my $stamp = $directory_map{$cdir};
- $directory_map{$directory} = $stamp;
- return $stamp;
- }
-
- my $dirstamp = "$cdir/\$(am__dirstamp)";
-
- $directory_map{$directory} = $dirstamp;
- $directory_map{$cdir} = $dirstamp;
-
- # Set a variable for the dirstamp basename.
- define_pretty_variable ('am__dirstamp', TRUE, INTERNAL,
- '$(am__leading_dot)dirstamp');
-
- # Directory must be removed by 'make distclean'.
- $clean_files{$dirstamp} = DIST_CLEAN;
-
- $output_rules .= ("$dirstamp:\n"
- . "address@hidden(MKDIR_P) $directory\n"
- . "\t\@: > $dirstamp\n");
-
- return $dirstamp;
-}
-
-# &require_build_directory_maybe ($FILE)
-# --------------------------------------
-# If $FILE lies in a subdirectory, emit a rule to create this
-# directory and return the file that $FILE should be made
-# dependent upon. Otherwise, just return the empty string.
-sub require_build_directory_maybe ($)
-{
- my $file = shift;
- my $directory = dirname ($file);
-
- if ($directory ne '.')
- {
- return require_build_directory ($directory);
- }
- else
- {
- return '';
- }
-}
-
-################################################################
# Push a list of files onto dist_common.
sub push_dist_common
@@ -7770,6 +7578,7 @@ sub generate_makefile ($$)
# Must do this after reading .am file.
define_variable ('subdir', $relative_dir, INTERNAL);
+ define_variable ('am__config_aux_dir', $am_config_aux_dir, INTERNAL);
# If DIST_SUBDIRS is defined, make sure SUBDIRS is, so that
# recursive rules are enabled.
@@ -7812,7 +7621,10 @@ sub generate_makefile ($$)
handle_subdirs;
handle_tags;
handle_minor_options;
+
# Must come after handle_programs so that %known_programs is up-to-date.
+ define_variable ('am__all_progs', join(" ", keys %known_programs),
+ INTERNAL);
handle_tests;
# This must come after most other rules.
diff --git a/doc/automake-ng.texi b/doc/automake-ng.texi
index b68015e..55a1288 100644
--- a/doc/automake-ng.texi
+++ b/doc/automake-ng.texi
@@ -6896,12 +6896,6 @@ bin_PROGRAMS = liver$(EXEEXT)
The targets Automake generates are likewise given the @samp{$(EXEEXT)}
extension.
-When the @option{parallel-tests} option is in use, the variables
address@hidden and @code{XFAIL_TESTS} (@pxref{Simple Tests}) are also
-rewritten if they contain filenames that have been declared as
-programs in the same @file{Makefile}. (This is mostly useful when some
-programs from @code{check_PROGRAMS} are listed in @code{TESTS}.)
-
However, Automake cannot apply this rewriting to @command{configure}
substitutions. This means that if you are conditionally building a
program using such a substitution, then your @file{configure.ac} must
@@ -8981,11 +8975,14 @@ the @emph{read-only} variable @code{TEST_LOGS}, and
defaults to
as well as any suffix listed in @code{TEST_EXTENSIONS} removed, and
@file{.log} appended. @code{TEST_EXTENSIONS} defaults to @file{.test};
it can be overridden by the user, in which case any extension listed
-in it must be constituted by a dot, followed by a non-digit alphabetic
-character, followed by any number of alphabetic characters.
address@hidden Keep in sync with test-extensions.sh
-For example, @samp{.sh}, @samp{.T} and @samp{.t1} are valid extensions,
-while @samp{.x-y}, @samp{.6c} and @samp{.t.1} are not.
+in it must start with a dot (the generated Makefile will check at
+runtime that this is the case, and error out if it's not). While
address@hidden entries could in theory support ``funny
+characters'' (like @samp{@@} or @samp{!}), their use might cause
+unexpected problems for the underlying GNU make implementation, so
+you're advised to limit to the use of alphanumeric characters, plus
+eventually the underscore @samp{_}, the dot @samp{.}, the dash
address@hidden characters.
@vindex _LOG_COMPILE
@vindex _LOG_COMPILER
diff --git a/lib/am/check2.am b/lib/am/check2.am
deleted file mode 100644
index 486944c..0000000
--- a/lib/am/check2.am
+++ /dev/null
@@ -1,68 +0,0 @@
-## automake - create Makefile.in from Makefile.am
-## Copyright (C) 2008-2012 Free Software Foundation, Inc.
-
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2, or (at your option)
-## any later version.
-
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-## GNU General Public License for more details.
-
-## You should have received a copy of the GNU General Public License
-## along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-if %?FIRST%
-
-am__is_xfail_test = \
- $(if $(filter-out $(am__xfail_test_bases), \
- $(patsubst $(srcdir)/%,%,$(1))),no,yes)
-am__runtest = \
- $(am__sh_e_setup); \
- $(am__tty_colors); \
- srcdir=$(srcdir); export srcdir; \
-## Creates the directory for the log if needed.
- 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
-## unquote usage of it could cause syntax errors in the shell.
- case '$<' in */*) tst='$<';; *) tst=./'$<';; esac; \
-## Executes the developer-defined and user-defined test
-## setups (if any), in that order.
- $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) \
- $($(1)LOG_DRIVER) \
- --test-name '$(patsubst $(srcdir)/%,%,$<)' \
- --log-file $*.log \
- --trs-file $*.trs \
- --color-tests "$$am__color_tests" \
- --enable-hard-errors $(if $(DISABLE_HARD_ERRORS),no,yes) \
- --expect-failure $(call am__is_xfail_test,$*)
\
- $(AM_$(1)LOG_DRIVER_FLAGS) \
- $($(1)LOG_DRIVER_FLAGS) \
- -- \
- $($(1)LOG_COMPILER) \
- $(AM_$(1)LOG_FLAGS) \
- $($(1)LOG_FLAGS) \
- "$$tst" \
- $(AM_TESTS_FD_REDIRECT)
-
-endif %?FIRST%
-
-## From a test file to a .log and .trs file.
-%.log %.trs: %%EXT% $(%PFX%LOG_DEPENDENCIES)
- @$(call am__runtest,%PFX%)
-
-## If no programs are built in this package, then this rule is removed
-## at automake time.
-if %HANDLE-EXEEXT%
-## FIXME: spurious indentnation to avoid Automake thinking this is an
-## automake conditional.
- ifdef EXEEXT
-%.log %.trs: %%EXT%$(EXEEXT) $(%PFX%LOG_DEPENDENCIES)
- @$(call am__runtest,%PFX%)
- endif
-endif %HANDLE-EXEEXT%
diff --git a/lib/am/color-tests.am b/lib/am/color-tests.am
new file mode 100644
index 0000000..db91049
--- /dev/null
+++ b/lib/am/color-tests.am
@@ -0,0 +1,45 @@
+## automake - create Makefile.in from Makefile.am
+## Copyright (C) 2001-2012 Free Software Foundation, Inc.
+
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+
+## You should have received a copy of the GNU General Public License
+## along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+am__tty_colors_dummy = \
+ mgn= red= grn= lgn= blu= brg= std=; \
+ am__color_tests=no
+if %?COLOR%
+am__tty_colors = { \
+ $(am__tty_colors_dummy); \
+ if test "X$(AM_COLOR_TESTS)" = Xno; then \
+ am__color_tests=no; \
+ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
+ am__color_tests=yes; \
+## If stdout is a non-dumb tty, use colors. If test -t is not supported,
+## then this check fails; a conservative approach. Of course do not
+## redirect stdout here, just stderr.
+ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
+ am__color_tests=yes; \
+ fi; \
+ if test $$am__color_tests = yes; then \
+ red='[0;31m'; \
+ grn='[0;32m'; \
+ lgn='[1;32m'; \
+ blu='[1;34m'; \
+ mgn='[0;35m'; \
+ brg='[1m'; \
+ std='[m'; \
+ fi; \
+}
+else !%?COLOR%
+am__tty_colors = $(am__tty_colors_dummy)
+endif !%?COLOR%
diff --git a/lib/am/depend2.am b/lib/am/depend2.am
index 81660c1..e68bba7 100644
--- a/lib/am/depend2.am
+++ b/lib/am/depend2.am
@@ -38,7 +38,7 @@ if %?FIRST%
## FIXME: more precise in the removal of the suffix?
am__depbase = $(am__depdir)/$(basename $(notdir $@))
## Avoid useless forks when possible.
-am__ensure_depdir = test -d $(am__depdir) || $(MKDIR_P) $(am__depdir)
+am__ensure_depdir = $(call am__ensure_dir_exists,$(am__depdir))
endif %?FIRST%
if %?NONLIBTOOL%
@@ -51,7 +51,9 @@ if %FASTDEP%
%-c% -o $@ %SOURCEFLAG%$<
%SILENT%$(am__mv) $(am__depbase).Tpo $(am__depbase).Po
else !%FASTDEP%
-if %AMDEP%
+if !%AMDEP%
+ %SILENT%$(am__ensure_target_dir_exists)
+else %AMDEP%
%SILENT%$(am__ensure_depdir)
%VERBOSE%source='%SOURCE%' object='%OBJ%' libtool=no @AMDEPBACKSLASH@
DEPDIR=$(DEPDIR) $(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@
@@ -69,7 +71,9 @@ if %FASTDEP%
%-c% -o $@ %SOURCEFLAG%`$(CYGPATH_W) $<`
%SILENT%$(am__mv) $(am__depbase).Tpo $(am__depbase).Po
else !%FASTDEP%
-if %AMDEP%
+if !%AMDEP%
+ %SILENT%$(am__ensure_target_dir_exists)
+else %AMDEP%
%SILENT%$(am__ensure_depdir)
%VERBOSE%source='%SOURCE%' object='%OBJOBJ%' libtool=no @AMDEPBACKSLASH@
DEPDIR=$(DEPDIR) $(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@
@@ -89,7 +93,9 @@ if %FASTDEP%
%-c% -o $@ %SOURCEFLAG%$<
%SILENT%$(am__mv) $(am__depbase).Tpo $(am__depbase).Plo
else !%FASTDEP%
-if %AMDEP%
+if !%AMDEP%
+ %SILENT%$(am__ensure_target_dir_exists)
+else %AMDEP%
%SILENT%$(am__ensure_depdir)
%VERBOSE%source='%SOURCE%' object='%LTOBJ%' libtool=yes @AMDEPBACKSLASH@
DEPDIR=$(DEPDIR) $(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@
diff --git a/lib/am/header-vars.am b/lib/am/header-vars.am
index 79dde9c..7f34666 100644
--- a/lib/am/header-vars.am
+++ b/lib/am/header-vars.am
@@ -23,6 +23,23 @@ VPATH = @srcdir@
$(if $(.FEATURES),, \
$(error Automake-NG based builds require GNU make 3.81 or later))
+am__mkdir = test -d $1 || $(MKDIR_P) $1
+
+# In a recipe, ensure the given directory exists, creating it if
+# necessary; but tries to do so avoiding useless forks, stats, and
+# extra recipe text (the latter is useful when doing "make V=1").
+# If the target has no directory component, or if the parent
+# directory of the target already exists, we have nothing to do, so
+# try to optimize for those cases -- especially because, for our
+# usage patterns, one of them should always be true in non-VPATH
+# builds.
+am__ensure_dir_exists = \
+ $(if $(filter .,$1),:,$(if $(wildcard $1/),:,$(call am__mkdir,$1)))
+
+# Ensure the directory containing the target of the current recipe
+# exists, by creating it if necessary.
+am__ensure_target_dir_exists = $(call am__ensure_dir_exists,$(@D))
+
## The 'all' target must be the default one, independently from the
## position it is declared in the output Makefile.
.DEFAULT_GOAL := all
@@ -83,6 +100,25 @@ am__uniq = $(strip \
$(am__empty), \
$(lastword $(1)))))
+?HANDLE-EXEEXT?am__handle_exeext := yes
+?!HANDLE-EXEEXT?am__handle_exeext := no
+
+## These definitions have been generated by the following Bash 4 script:
+##
+## #!/bin/bash
+## toupper='$1' tolower='$1'
+## for c in {a..z}; do
+## C=${c^^}
+## toupper="\$(subst $c,$C,$toupper)"
+## tolower="\$(subst $C,$c,$tolower)"
+## done
+## echo "am__tolower = $tolower"
+## echo "am__toupper = $toupper"
+
+am__tolower = $(subst Z,z,$(subst Y,y,$(subst X,x,$(subst W,w,$(subst
V,v,$(subst U,u,$(subst T,t,$(subst S,s,$(subst R,r,$(subst Q,q,$(subst
P,p,$(subst O,o,$(subst N,n,$(subst M,m,$(subst L,l,$(subst K,k,$(subst
J,j,$(subst I,i,$(subst H,h,$(subst G,g,$(subst F,f,$(subst E,e,$(subst
D,d,$(subst C,c,$(subst B,b,$(subst A,a,$1))))))))))))))))))))))))))
+
+am__toupper = $(subst z,Z,$(subst y,Y,$(subst x,X,$(subst w,W,$(subst
v,V,$(subst u,U,$(subst t,T,$(subst s,S,$(subst r,R,$(subst q,Q,$(subst
p,P,$(subst o,O,$(subst n,N,$(subst m,M,$(subst l,L,$(subst k,K,$(subst
j,J,$(subst i,I,$(subst h,H,$(subst g,G,$(subst f,F,$(subst e,E,$(subst
d,D,$(subst c,C,$(subst b,B,$(subst a,A,$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),
diff --git a/lib/am/library.am b/lib/am/library.am
index 686b648..0d5ac9e 100644
--- a/lib/am/library.am
+++ b/lib/am/library.am
@@ -13,7 +13,9 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
-%LIBRARY%: $(%XLIBRARY%_OBJECTS) $(%XLIBRARY%_DEPENDENCIES)
$(EXTRA_%XLIBRARY%_DEPENDENCIES) %DIRSTAMP%
- %SILENT%-rm -f %LIBRARY%
- %VERBOSE%$(%XLIBRARY%_AR) %LIBRARY% $(%XLIBRARY%_OBJECTS)
$(%XLIBRARY%_LIBADD)
- %SILENT%$(RANLIB) %LIBRARY%
+%LIBRARY%: $(%XLIBRARY%_OBJECTS) $(%XLIBRARY%_DEPENDENCIES) \
+ $(EXTRA_%XLIBRARY%_DEPENDENCIES)
+ %SILENT%rm -f $@
+ %SILENT%$(am__ensure_target_dir_exists)
+ %VERBOSE%$(%XLIBRARY%_AR) $@ $(%XLIBRARY%_OBJECTS) $(%XLIBRARY%_LIBADD)
+ %SILENT%$(RANLIB) $@
diff --git a/lib/am/ltlibrary.am b/lib/am/ltlibrary.am
index b758880..371e31c 100644
--- a/lib/am/ltlibrary.am
+++ b/lib/am/ltlibrary.am
@@ -13,5 +13,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/>.
-%LTLIBRARY%: $(%XLTLIBRARY%_OBJECTS) $(%XLTLIBRARY%_DEPENDENCIES)
$(EXTRA_%XLTLIBRARY%_DEPENDENCIES) %DIRSTAMP%
+%LTLIBRARY%: $(%XLTLIBRARY%_OBJECTS) $(%XLTLIBRARY%_DEPENDENCIES) \
+ $(EXTRA_%XLTLIBRARY%_DEPENDENCIES)
+ %SILENT%$(am__ensure_target_dir_exists)
%VERBOSE%$(%XLINK%) %RPATH% $(%XLTLIBRARY%_OBJECTS)
$(%XLTLIBRARY%_LIBADD) $(LIBS)
diff --git a/lib/am/check.am b/lib/am/parallel-tests.am
similarity index 76%
rename from lib/am/check.am
rename to lib/am/parallel-tests.am
index 45bc615..4f2e003 100644
--- a/lib/am/check.am
+++ b/lib/am/parallel-tests.am
@@ -14,39 +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_dummy = \
- mgn= red= grn= lgn= blu= brg= std=; \
- am__color_tests=no
-if %?COLOR%
-am__tty_colors = { \
- $(am__tty_colors_dummy); \
- if test "X$(AM_COLOR_TESTS)" = Xno; then \
- am__color_tests=no; \
- elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
- am__color_tests=yes; \
-## If stdout is a non-dumb tty, use colors. If test -t is not supported,
-## then this check fails; a conservative approach. Of course do not
-## redirect stdout here, just stderr.
- elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
- am__color_tests=yes; \
- fi; \
- if test $$am__color_tests = yes; then \
- red='[0;31m'; \
- grn='[0;32m'; \
- lgn='[1;32m'; \
- blu='[1;34m'; \
- mgn='[0;35m'; \
- brg='[1m'; \
- std='[m'; \
- fi; \
-}
-else !%?COLOR%
-am__tty_colors = $(am__tty_colors_dummy)
-endif !%?COLOR%
-
-.PHONY: check-TESTS
-
-if !%?SERIAL_TESTS%
+include color-tests.am
## New parallel test driver.
##
@@ -57,6 +25,84 @@ if !%?SERIAL_TESTS%
## of more test metadata, and the use of custom test derivers and protocols
## (among them, TAP).
+am__maybe_invalid_test_extensions = \
+ $(if \
+ $(strip $1), \
+ $(foreach am__e, $1,\
+ $(warning invalid test extension: '$(am__e)')) \
+ $(error invalid test extensions have been encountered))
+
+am__is_xfail_test = \
+ $(if $(filter-out $(am__xfail_test_bases), \
+ $(patsubst $(srcdir)/%,%,$(1))),no,yes)
+am__runtest = \
+ $(am__sh_e_setup); \
+ $(am__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
+## unquote usage of it could cause syntax errors in the shell.
+ case '$<' in */*) tst='$<';; *) tst=./'$<';; esac; \
+## Executes the developer-defined and user-defined test
+## setups (if any), in that order.
+ $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) \
+ $($(1)LOG_DRIVER) \
+ --test-name '$(patsubst $(srcdir)/%,%,$<)' \
+ --log-file $*.log \
+ --trs-file $*.trs \
+ --color-tests "$$am__color_tests" \
+ --enable-hard-errors $(if $(DISABLE_HARD_ERRORS),no,yes) \
+ --expect-failure $(call am__is_xfail_test,$*)
\
+ $(AM_$(1)LOG_DRIVER_FLAGS) \
+ $($(1)LOG_DRIVER_FLAGS) \
+ -- \
+ $($(1)LOG_COMPILER) \
+ $(AM_$(1)LOG_FLAGS) \
+ $($(1)LOG_FLAGS) \
+ "$$tst" \
+ $(AM_TESTS_FD_REDIRECT)
+
+## Turn e.g., ".test" in "_TEST", and return the empty string unchanged.
+am__tpfx = \
+ $(if $1,$(call am__toupper,$(patsubst .%,%_,$1)))
+
+!define am__handle_per_suffix_test
+!
+## 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__config_aux_dir)/test-driver
+!
+!%.log %.trs: %$1 $$($$(call am__tpfx,$1)LOG_DEPENDENCIES)
+! @$$(call am__runtest,$$(call am__tpfx,$1))
+!
+!ifeq ($(am__handle_exeext),yes)
+!ifdef EXEEXT
+!%.log %.trs: %$1$(EXEEXT) $$($$(call am__tpfx,$1)LOG_DEPENDENCIES)
+! @$$(call am__runtest,$$(call am__tpfx,$1))
+!endif # defined EXEEXT
+!endif # am__handle_exeext = yes
+!
+!endef # am__handle_per_suffix_test
+!
+## FIXME: this will pick up the default from the environment; are we sure
+## FIXME: we want that?
+!TEST_EXTENSIONS ?= .test
+!$(call am__maybe_invalid_test_extensions,$(filter-out .%,$(TEST_EXTENSIONS)))
+## FIXME: it would be nice to break these on multiple lines. Unfortunately,
+## FIXME: our '!' is not yet smart enough to handle that :-(
+!$(foreach am__e,$(TEST_EXTENSIONS), $(eval $(call
am__handle_per_suffix_test,$(am__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))
+
# The names of the given tests scripts with any possible registered
# test extension removed, as well as any leading '$(srcdir)' component
# (if any) stripped.
@@ -351,6 +397,7 @@ check-TESTS:
## we rely on .PHONY to work portably.
@rm -f $(TEST_SUITE_LOG)
$(MAKE) $(TEST_SUITE_LOG)
+.PHONY: check-TESTS
## Recheck must depend on $(check_SCRIPTS), $(check_PROGRAMS), etc.
## It must also depend on the 'all' target. See automake bug#11252.
@@ -366,108 +413,3 @@ recheck: all %CHECK_DEPS%
.PHONY: recheck
AM_RECURSIVE_TARGETS += check recheck
-
-else %?SERIAL_TESTS%
-
-## Obsolescent serial testsuite driver.
-
-check-TESTS: $(TESTS)
- @failed=0; all=0; xfail=0; xpass=0; skip=0; \
- srcdir=$(srcdir); export srcdir; \
- list='$(TESTS)'; \
- $(am__tty_colors); \
- if test -n "$$list"; then \
- for tst in $$list; do \
- if test -f ./$$tst; then dir=./; \
- else dir="$(srcdir)/"; fi; \
- if $(TESTS_ENVIRONMENT) $${dir}$$tst $(AM_TESTS_FD_REDIRECT); then \
-## Success
- all=`expr $$all + 1`; \
- case " $(XFAIL_TESTS) " in \
- *[\ \ ]$$tst[\ \ ]*) \
- xpass=`expr $$xpass + 1`; \
- failed=`expr $$failed + 1`; \
- col=$$red; res=XPASS; \
- ;; \
- *) \
- col=$$grn; res=PASS; \
- ;; \
- esac; \
- elif test $$? -ne 77; then \
-## Failure
- all=`expr $$all + 1`; \
- case " $(XFAIL_TESTS) " in \
- *[\ \ ]$$tst[\ \ ]*) \
- xfail=`expr $$xfail + 1`; \
- col=$$lgn; res=XFAIL; \
- ;; \
- *) \
- failed=`expr $$failed + 1`; \
- col=$$red; res=FAIL; \
- ;; \
- esac; \
- else \
-## Skipped
- skip=`expr $$skip + 1`; \
- col=$$blu; res=SKIP; \
- fi; \
- echo "$${col}$$res$${std}: $$tst"; \
- done; \
-## Prepare the banner
- if test "$$all" -eq 1; then \
- tests="test"; \
- All=""; \
- else \
- tests="tests"; \
- All="All "; \
- fi; \
- if test "$$failed" -eq 0; then \
- if test "$$xfail" -eq 0; then \
- banner="$$All$$all $$tests passed"; \
- else \
- if test "$$xfail" -eq 1; then failures=failure; else
failures=failures; fi; \
- banner="$$All$$all $$tests behaved as expected ($$xfail expected
$$failures)"; \
- fi; \
- else \
- if test "$$xpass" -eq 0; then \
- banner="$$failed of $$all $$tests failed"; \
- else \
- if test "$$xpass" -eq 1; then passes=pass; else passes=passes;
fi; \
- banner="$$failed of $$all $$tests did not behave as expected
($$xpass unexpected $$passes)"; \
- fi; \
- fi; \
-## DASHES should contain the largest line of the banner.
- dashes="$$banner"; \
- skipped=""; \
- if test "$$skip" -ne 0; then \
- if test "$$skip" -eq 1; then \
- skipped="($$skip test was not run)"; \
- else \
- skipped="($$skip tests were not run)"; \
- fi; \
- test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
- dashes="$$skipped"; \
- fi; \
- report=""; \
- if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
- report="Please report to $(PACKAGE_BUGREPORT)"; \
- test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
- dashes="$$report"; \
- fi; \
- dashes=`echo "$$dashes" | sed s/./=/g`; \
- if test "$$failed" -eq 0; then \
- col="$$grn"; \
- else \
- col="$$red"; \
- fi; \
-## Multi line coloring is problematic with "less -R", so we really need
-## to color each line individually.
- echo "$${col}$$dashes$${std}"; \
- echo "$${col}$$banner$${std}"; \
- test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
- test -z "$$report" || echo "$${col}$$report$${std}"; \
- echo "$${col}$$dashes$${std}"; \
- test "$$failed" -eq 0; \
- else :; fi
-
-endif %?SERIAL_TESTS%
diff --git a/lib/am/program.am b/lib/am/program.am
index 699afb5..b444bd9 100644
--- a/lib/am/program.am
+++ b/lib/am/program.am
@@ -13,11 +13,13 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
-%PROGRAM%%EXEEXT%: $(%XPROGRAM%_OBJECTS) $(%XPROGRAM%_DEPENDENCIES)
$(EXTRA_%XPROGRAM%_DEPENDENCIES) %DIRSTAMP%
+%PROGRAM%%EXEEXT%: $(%XPROGRAM%_OBJECTS) $(%XPROGRAM%_DEPENDENCIES) \
+ $(EXTRA_%XPROGRAM%_DEPENDENCIES)
## Remove program before linking. Otherwise the link will fail if the
## program is running somewhere. FIXME: this could be a loss if
## you're using an incremental linker. Maybe we should think twice?
## Or maybe not... sadly, incremental linkers are rarer than losing
## systems.
- @rm -f %PROGRAM%%EXEEXT%
+ %SILENT%rm -f $@
+ %SILENT%$(am__ensure_target_dir_exists)
%VERBOSE%$(%XLINK%) $(%XPROGRAM%_OBJECTS) $(%XPROGRAM%_LDADD) $(LIBS)
diff --git a/lib/am/serial-tests.am b/lib/am/serial-tests.am
new file mode 100644
index 0000000..af5e7b5
--- /dev/null
+++ b/lib/am/serial-tests.am
@@ -0,0 +1,135 @@
+## automake - create Makefile.in from Makefile.am
+## Copyright (C) 2001-2012 Free Software Foundation, Inc.
+
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+
+## You should have received a copy of the GNU General Public License
+## along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+include color-tests.am
+
+## Obsolescent serial testsuite driver.
+
+if %?HANDLE-EXEEXT%
+## This is suboptimal, but we need to preserve the order of $(TESTS).
+am__check_cook_with_exeext_1 = \
+ $(if $(filter $(am__all_progs), $1), $1$(EXEEXT), $1)
+am__check_cook_with_exeext = $(strip \
+ $(if $(EXEEXT), $(foreach am__t, $1, $(call $(0)_1, $(am__t))), $1))
+else !%?HANDLE-EXEEXT%
+am__check_cook_with_exeext = $(strip $1)
+endif !%?HANDLE-EXEEXT%
+
+# TESTS can contain compiled programs, in which case we might have
+# to account for $(EXEEXT) appending. For matching purposes, we
+# need to adjust XFAIL_TESTS as well.
+am__cooked_tests = $(call am__check_cook_with_exeext, $(TESTS))
+am__cooked_xfail_tests = $(call am__check_cook_with_exeext, $(XFAIL_TESTS))
+
+.PHONY: check-TESTS
+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); \
+ is_xfail_test () { \
+ case " $(strip $(am__cooked_xfail_tests)) " in \
+ *" $$tst "*) return 0;; \
+ *) return 1;; \
+ esac; \
+ }; \
+ if test -n "$$list"; then \
+ for tst in $$list; do \
+ if test -f ./$$tst; then dir=./; \
+ else dir="$(srcdir)/"; fi; \
+ if $(TESTS_ENVIRONMENT) $${dir}$$tst $(AM_TESTS_FD_REDIRECT); then \
+## Success
+ all=`expr $$all + 1`; \
+ if is_xfail_test; then \
+ xpass=`expr $$xpass + 1`; \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=XPASS; \
+ else \
+ col=$$grn; res=PASS; \
+ fi; \
+ elif test $$? -ne 77; then \
+## Failure
+ all=`expr $$all + 1`; \
+ if is_xfail_test; then \
+ xfail=`expr $$xfail + 1`; \
+ col=$$lgn; res=XFAIL; \
+ else \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=FAIL; \
+ fi; \
+ else \
+## Skipped
+ skip=`expr $$skip + 1`; \
+ col=$$blu; res=SKIP; \
+ fi; \
+ echo "$${col}$$res$${std}: $$tst"; \
+ done; \
+## Prepare the banner
+ if test "$$all" -eq 1; then \
+ tests="test"; \
+ All=""; \
+ else \
+ tests="tests"; \
+ All="All "; \
+ fi; \
+ if test "$$failed" -eq 0; then \
+ if test "$$xfail" -eq 0; then \
+ banner="$$All$$all $$tests passed"; \
+ else \
+ if test "$$xfail" -eq 1; then failures=failure; else
failures=failures; fi; \
+ banner="$$All$$all $$tests behaved as expected ($$xfail expected
$$failures)"; \
+ fi; \
+ else \
+ if test "$$xpass" -eq 0; then \
+ banner="$$failed of $$all $$tests failed"; \
+ else \
+ if test "$$xpass" -eq 1; then passes=pass; else passes=passes;
fi; \
+ banner="$$failed of $$all $$tests did not behave as expected
($$xpass unexpected $$passes)"; \
+ fi; \
+ fi; \
+## DASHES should contain the largest line of the banner.
+ dashes="$$banner"; \
+ skipped=""; \
+ if test "$$skip" -ne 0; then \
+ if test "$$skip" -eq 1; then \
+ skipped="($$skip test was not run)"; \
+ else \
+ skipped="($$skip tests were not run)"; \
+ fi; \
+ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$skipped"; \
+ fi; \
+ report=""; \
+ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+ report="Please report to $(PACKAGE_BUGREPORT)"; \
+ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$report"; \
+ fi; \
+ dashes=`echo "$$dashes" | sed s/./=/g`; \
+ if test "$$failed" -eq 0; then \
+ col="$$grn"; \
+ else \
+ col="$$red"; \
+ fi; \
+## Multi line coloring is problematic with "less -R", so we really need
+## to color each line individually.
+ echo "$${col}$$dashes$${std}"; \
+ echo "$${col}$$banner$${std}"; \
+ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
+ test -z "$$report" || echo "$${col}$$report$${std}"; \
+ echo "$${col}$$dashes$${std}"; \
+ test "$$failed" -eq 0; \
+ else :; fi
diff --git a/lib/am/texi-vers.am b/lib/am/texi-vers.am
index c930f20..78c107d 100644
--- a/lib/am/texi-vers.am
+++ b/lib/am/texi-vers.am
@@ -27,11 +27,7 @@ am__dist_common += %VTEXI% %STAMPVTI%
## (Not configure.ac, because not all setups define the version number
## in this file.)
%STAMPVTI%: %TEXI% $(top_srcdir)/configure
-## It is wrong to have %STAMPVTI% dependent on %DIRSTAMP%, because
-## %STAMPVTI% is distributed and %DIRSTAMP% isn't: a distributed file
-## should never be dependent upon a non-distributed built file.
-## Therefore we ensure that %DIRSTAMP% exists in the rule.
-?DIRSTAMP? test -f %DIRSTAMP% || $(MAKE) %DIRSTAMP%
+ @$(am__ensure_target_dir_exists)
@(set `$(SHELL) %MDDIR%mdate-sh $<`; \
echo "@set UPDATED $$1 $$2 $$3"; \
echo "@set UPDATED-MONTH $$2 $$3"; \
diff --git a/lib/am/texibuild.am b/lib/am/texibuild.am
index 088b857..4fb196b 100644
--- a/lib/am/texibuild.am
+++ b/lib/am/texibuild.am
@@ -14,14 +14,9 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
-
?GENERIC_INFO?%%DEST_SUFFIX%: %%SOURCE_SUFFIX%
?!GENERIC_INFO?%DEST_INFO_PREFIX%%DEST_SUFFIX%: %SOURCE_INFO% %DEPS%
-## It is wrong to have 'info' files dependent on %DIRSTAMP%, because
-## 'info' files are distributed and %DIRSTAMP% isn't: a distributed file
-## should never be dependent upon a non-distributed built file.
-## Therefore we ensure that %DIRSTAMP% exists in the rule.
-?!INSRC??DIRSTAMP? @test -f %DIRSTAMP% || $(MAKE) %DIRSTAMP%
+?!INSRC? @$(am__ensure_target_dir_exists)
## Back up the info files before running makeinfo. This is the cheapest
## way to ensure that
## 1) If the texinfo file shrinks (or if you start using --no-split),
@@ -57,8 +52,9 @@
INFO_DEPS += %DEST_INFO_PREFIX%%DEST_SUFFIX%
?GENERIC?%.dvi: %%SOURCE_SUFFIX%
-?!GENERIC?%DEST_PREFIX%.dvi: %SOURCE% %DEPS% %DIRSTAMP%
-
%AM_V_TEXI2DVI%TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+?!GENERIC?%DEST_PREFIX%.dvi: %SOURCE% %DEPS%
+ %AM_V_TEXI2DVI%$(am__ensure_target_dir_exists) && \
+ TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
## Must set MAKEINFO like this so that version.texi will be found even
## if it is in srcdir (-I $(srcdir) is set in %MAKEINFOFLAGS%).
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS)
%MAKEINFOFLAGS%' \
@@ -70,8 +66,9 @@ INFO_DEPS += %DEST_INFO_PREFIX%%DEST_SUFFIX%
$(TEXI2DVI) %TEXIQUIET% --clean -o $@ $< %TEXIDEVNULL%
?GENERIC?%.pdf: %%SOURCE_SUFFIX%
-?!GENERIC?%DEST_PREFIX%.pdf: %SOURCE% %DEPS% %DIRSTAMP%
-
%AM_V_TEXI2PDF%TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+?!GENERIC?%DEST_PREFIX%.pdf: %SOURCE% %DEPS%
+ %AM_V_TEXI2PDF%$(am__ensure_target_dir_exists) && \
+ TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
## Must set MAKEINFO like this so that version.texi will be found even
## if it is in srcdir (-I $(srcdir) is set in %MAKEINFOFLAGS%).
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS)
%MAKEINFOFLAGS%' \
@@ -83,7 +80,8 @@ INFO_DEPS += %DEST_INFO_PREFIX%%DEST_SUFFIX%
$(TEXI2PDF) %TEXIQUIET% --clean -o $@ $< %TEXIDEVNULL%
?GENERIC?%.html: %%SOURCE_SUFFIX%
-?!GENERIC?%DEST_PREFIX%.html: %SOURCE% %DEPS% %DIRSTAMP%
+?!GENERIC?%DEST_PREFIX%.html: %SOURCE% %DEPS%
+ %SILENT%$(am__ensure_target_dir_exists)
## When --split (the default) is used, makeinfo will output a
## directory. However it will not update the time stamp of a
## previously existing directory, and when the names of the nodes
@@ -106,8 +104,6 @@ INFO_DEPS += %DEST_INFO_PREFIX%%DEST_SUFFIX%
fi
## If we are using the generic rules, we need separate dependencies.
-## (Don't wonder about %DIRSTAMP% here, this is used only by non-generic
-## rules.)
if %?GENERIC_INFO%
%DEST_INFO_PREFIX%%DEST_SUFFIX%: %SOURCE_REAL% %DEPS%
endif %?GENERIC_INFO%
diff --git a/t/stdinc.sh b/t/all-progs.sh
similarity index 60%
copy from t/stdinc.sh
copy to t/all-progs.sh
index ec99483..3b8050a 100755
--- a/t/stdinc.sh
+++ b/t/all-progs.sh
@@ -14,49 +14,49 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Test to make sure the standard include order is stable.
-# Report by Kent Boortz.
+# Test internal automake variable $(am__all_progs).
-required=cc
. ./defs || Exit 1
cat >> configure.ac << 'END'
-AC_PROG_CC
-AC_CONFIG_HEADERS([sub/config.h])
-AC_CONFIG_FILES([sub/bar.h])
+AC_SUBST([CC], ['whocares'])
+AC_SUBST([EXEEXT], [''])
AC_OUTPUT
END
cat > Makefile.am << 'END'
-bin_PROGRAMS = foo
-foo_SOURCES = foo.c
-BUILT_SOURCES = bar.h
-END
+AUTOMAKE_OPTIONS = no-dependencies
-mkdir sub
+check_PROGRAMS = p1
+check_SCRIPTS = x1
-cat >foo.c <<'END'
-#include <config.h>
-#include <bar.h>
-int main() { return bar (); }
-END
-cat >bar.h <<'END'
-int bar () { return 0; }
-END
-cat >sub/bar.h.in <<'END'
-choke me
+EXTRA_PROGRAMS = p2
+EXTRA_SCRIPTS = x2
+
+bin_PROGRAMS = p3
+bin_SCRIPTS = x3
+
+noinst_PROGRAMS = p4
+noinst_SCRIPTS = x4
+
+mydir = $(prefix)
+my_PROGRAMS = p5
+my_SCRIPTS = x5
+
+.PHONY: debug test
+debug:
+ @echo BEG: $(am__all_progs) :END
+test: debug
+ test '$(sort $(am__all_progs))' = 'p1 p2 p3 p4 p5'
END
$ACLOCAL
$AUTOCONF
-$AUTOHEADER
$AUTOMAKE
-mkdir build
-cd build
-../configure -C
-$MAKE
+./configure
+$MAKE test
+$MAKE test EXEEXT=.exe
+$MAKE test EXEEXT=.bin
-cd ..
-./configure -C
-$MAKE
+:
diff --git a/t/auxdir.sh b/t/auxdir.sh
index f2abfd7..be113d9 100755
--- a/t/auxdir.sh
+++ b/t/auxdir.sh
@@ -24,20 +24,15 @@ AC_INIT([$me], [1.0])
AC_CONFIG_AUX_DIR([./.])
AM_INIT_AUTOMAKE
AC_CONFIG_FILES([Makefile])
-AM_PATH_PYTHON
END
-cat > Makefile.am << 'END'
-python_PYTHON = foo.py
-END
-
-cp "$am_scriptdir/py-compile" .
+: > Makefile.am
# The "././" prefix confuses Automake into thinking it is doing a
# subdir build. Yes, this is hacky.
$ACLOCAL
$AUTOMAKE ././Makefile
-grep '/\./\./py-compile' Makefile.in
+grep '^am__config_aux_dir = \$(top_srcdir)/\./\.$' Makefile.in
:
diff --git a/t/auxdir6.sh b/t/auxdir6.sh
index a6d68fd..57f4d95 100755
--- a/t/auxdir6.sh
+++ b/t/auxdir6.sh
@@ -27,25 +27,19 @@ AC_INIT([$me], [1.0])
AC_CONFIG_AUX_DIR([auxdir])
AM_INIT_AUTOMAKE
AC_CONFIG_FILES([Makefile subdir/Makefile])
-AM_PATH_PYTHON
END
mkdir subdir auxdir
-cat > Makefile.am << 'END'
-python_PYTHON = foo.py
-END
-
-cp Makefile.am subdir/Makefile.am
-
+: > Makefile.am
+: > subdir/Makefile.am
: > auxdir/install-sh
: > auxdir/missing
-: > auxdir/py-compile
$ACLOCAL
$AUTOMAKE
-$FGREP '$(top_srcdir)/auxdir/py-compile' Makefile.in
-$FGREP '$(top_srcdir)/auxdir/py-compile' subdir/Makefile.in
+grep '^am__config_aux_dir = \$(top_srcdir)/auxdir$' Makefile.in
+grep '^am__config_aux_dir = \$(top_srcdir)/auxdir$' subdir/Makefile.in
:
diff --git a/t/auxdir7.sh b/t/auxdir7.sh
index bdf571e..6eba079 100755
--- a/t/auxdir7.sh
+++ b/t/auxdir7.sh
@@ -26,23 +26,17 @@ AC_INIT([$me], [1.0])
AC_CONFIG_AUX_DIR([.])
AM_INIT_AUTOMAKE
AC_CONFIG_FILES([Makefile subdir/Makefile])
-AM_PATH_PYTHON
END
mkdir subdir
-cat > Makefile.am << 'END'
-python_PYTHON = foo.py
-END
-
-cp Makefile.am subdir/Makefile.am
-
-: > py-compile
+: > Makefile.am
+: > subdir/Makefile.am
$ACLOCAL
$AUTOMAKE
-$FGREP '$(top_srcdir)/py-compile' Makefile.in
-$FGREP '$(top_srcdir)/py-compile' subdir/Makefile.in
+grep '^am__config_aux_dir = \$(top_srcdir)$' Makefile.in
+grep '^am__config_aux_dir = \$(top_srcdir)$' subdir/Makefile.in
:
diff --git a/t/auxdir8.sh b/t/auxdir8.sh
index 21c346e..9f4f76d 100755
--- a/t/auxdir8.sh
+++ b/t/auxdir8.sh
@@ -25,23 +25,17 @@
cat >> configure.ac << 'END'
AC_CONFIG_FILES([subdir/Makefile])
-AM_PATH_PYTHON
END
mkdir subdir
-cat > Makefile.am << 'END'
-python_PYTHON = foo.py
-END
-
-cp Makefile.am subdir/Makefile.am
-
-: > py-compile
+: > Makefile.am
+: > subdir/Makefile.am
$ACLOCAL
$AUTOMAKE
-$FGREP '$(top_srcdir)/py-compile' Makefile.in
-$FGREP '$(top_srcdir)/py-compile' subdir/Makefile.in
+grep '^am__config_aux_dir = \$(top_srcdir)$' Makefile.in
+grep '^am__config_aux_dir = \$(top_srcdir)$' subdir/Makefile.in
:
diff --git a/t/check5.sh b/t/check5.sh
index 5650428..2e5e792 100755
--- a/t/check5.sh
+++ b/t/check5.sh
@@ -32,9 +32,15 @@ check-local:
test -f one$(EXEEXT)
test -f two$(EXEEXT)
touch ok
-.PHONY: print-tests
-print-tests:
- echo BEG: $(TESTS) :END
+prepare-for-fake-exeext:
+ rm -f ok
+ mv -f one$(EXEEXT) one.bin
+ mv -f two$(EXEEXT) two.bin
+post-check-for-fake-exeext:
+ test -f ok
+ test ! -f one$(EXEEXT)
+ test ! -f two$(EXEEXT)
+.PHONY: prepare-for-fake-exeext post-check-for-fake-exeext
END
$ACLOCAL
@@ -50,13 +56,15 @@ END
cp one.c two.c
./configure
+
$MAKE check
test -f ok
-$MAKE EXEEXT=.bin print-tests >stdout || { cat stdout; Exit 1; }
-cat stdout
-$FGREP 'BEG: one.bin two.bin :END' stdout
-# No am__EXEEXT_* variable is needed.
-grep '_EXEEXT_[1-9]' Makefile.in && Exit 1
-$FGREP 'TESTS = $(check_PROGRAMS)' Makefile.in
+
+$MAKE prepare-for-fake-exeext
+$MAKE check EXEEXT=.bin
+$MAKE post-check-for-fake-exeext
+
+# No TESTS rewriting has taken place.
+grep '^TESTS = \$(check_PROGRAMS)$' Makefile.in
:
diff --git a/t/check7.sh b/t/check7.sh
index 5e4cafb..184ceb4 100755
--- a/t/check7.sh
+++ b/t/check7.sh
@@ -30,11 +30,22 @@ TESTS = $(XFAIL_TESTS)
XFAIL_TESTS = a b c d
check_PROGRAMS = a c d
check_SCRIPTS = b
+EXTRA_PROGRAMS = new old
EXTRA_DIST = $(check_SCRIPTS)
-.PHONY: print-xfail-tests
-print-xfail-tests:
- @echo BEG: $(XFAIL_TESTS) :END
+prepare-for-fake-exeext:
+ rm -f out.new out.old
+ touch a.fake c.fake d.fake
+ mv -f new$(EXEEXT) new.fake
+ mv -f old$(EXEEXT) old.fake
+post-check-for-fake-exeext:
+ test -f new.fake
+ test -f old.fake
+ test ! -f new
+ test ! -f new$(EXEEXT)
+ test ! -f old
+ test ! -f old$(EXEEXT)
+.PHONY: prepare-for-fake-exeext post-check-for-fake-exeext
END
cat > b <<'END'
@@ -54,6 +65,26 @@ END
cp a.c c.c
cp a.c d.c
+cat > new.c <<'END'
+#include <stdio.h>
+int main (void)
+{
+ FILE *fp = fopen ("out.new", "w");
+ fprintf (fp, "%s!\n", "Hello, Brave New World");
+ return (fclose (fp) != 0);
+}
+END
+
+cat > old.c <<'END'
+#include <stdio.h>
+int main (void)
+{
+ FILE *fp = fopen ("out.old", "w");
+ fprintf (fp, "%s!\n", "Hello, Europe");
+ return (fclose (fp) == 0);
+}
+END
+
$ACLOCAL
$AUTOCONF
$AUTOMAKE -a
@@ -61,11 +92,15 @@ $AUTOMAKE -a
./configure
$MAKE check
-if test x"$am_serial_tests" = x"yes"; then
- $MAKE EXEEXT=.bin print-xfail-tests >stdout || { cat stdout; Exit 1; }
- cat stdout
- $FGREP 'BEG: a.bin b c.bin d.bin :END' stdout
-fi
+$MAKE check TESTS='old new' XFAIL_TESTS=old
+grep 'Hello, Brave New World!' out.new
+grep 'Hello, Europe!' out.old
+
+$MAKE prepare-for-fake-exeext
+$MAKE check TESTS='old new' EXEEXT=.fake XFAIL_TESTS=old
+$MAKE post-check-for-fake-exeext
+grep 'Hello, Brave New World!' out.new
+grep 'Hello, Europe!' out.old
$MAKE distcheck
diff --git a/t/distcom-subdir.sh b/t/distcom-subdir.sh
index 46e516a..20aa8a5 100755
--- a/t/distcom-subdir.sh
+++ b/t/distcom-subdir.sh
@@ -22,6 +22,7 @@
cat >> configure.ac << 'END'
AC_CONFIG_FILES([subdir/Makefile])
AC_PROG_CC
+AC_PROG_FGREP
AC_OUTPUT
END
@@ -32,14 +33,18 @@ END
rm -f depcomp
mkdir subdir
-: > subdir/Makefile.am
+cat > subdir/Makefile.am << 'END'
+.PHONY: test-distcommon
+test-distcommon:
+ echo ' ' $(am__dist_common) ' ' | $(FGREP) ' $(top_srcdir)/depcomp '
+END
$ACLOCAL
$AUTOCONF
$AUTOMAKE
test ! -f depcomp
-cat > subdir/Makefile.am << 'END'
+cat >> subdir/Makefile.am << 'END'
bin_PROGRAMS = foo
END
@@ -47,28 +52,8 @@ END
$AUTOMAKE -a subdir/Makefile
test -f depcomp
-
-# FIXME: the logic of this check and other similar ones in other
-# FIXME: 'distcom*.test' files should be factored out in a common
-# FIXME: subroutine in 'defs'...
-sed -n -e "
- /^am__dist_common =.*\\\\$/ {
- :loop
- p
- n
- t clear
- :clear
- s/\\\\$/\\\\/
- t loop
- s/$/ /
- s/[$tab ][$tab ]*/ /g
- p
- n
- }" subdir/Makefile.in > dc.txt
-cat dc.txt
-$FGREP ' $(top_srcdir)/depcomp ' dc.txt
-
./configure
+(cd subdir && $MAKE test-distcommon)
$MAKE distdir
test -f $distdir/depcomp
diff --git a/t/distcom2.sh b/t/distcom2.sh
index 141cd79..76ded06 100755
--- a/t/distcom2.sh
+++ b/t/distcom2.sh
@@ -72,10 +72,12 @@ for opt in '' --no-force; do
cat dc.txt # For debugging.
cat subdir/dc.txt # Likewise.
- $FGREP ' $(top_srcdir)/depcomp ' subdir/dc.txt
- # The 'compile' script will be listed in the am__dist_common of the top-level
- # Makefile because it's required in configure.ac (by AM_PROG_CC_C_O).
- $FGREP ' $(top_srcdir)/compile ' dc.txt || $FGREP ' compile ' dc.txt
+ $FGREP ' $(am__config_aux_dir)/depcomp ' subdir/dc.txt
+ # The 'compile' script will be listed in the am__dist_common of
+ # the top-level Makefile because it's required in configure.ac
+ # (by AM_PROG_CC_C_O).
+ $FGREP ' $(am__config_aux_dir)/compile ' dc.txt \
+ || $FGREP ' compile ' dc.txt
done
diff --git a/t/ensure-dir-exists.sh b/t/ensure-dir-exists.sh
new file mode 100755
index 0000000..d47d22f
--- /dev/null
+++ b/t/ensure-dir-exists.sh
@@ -0,0 +1,70 @@
+#! /bin/sh
+# Copyright (C) 2012 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test Automake-provided internal macro 'am__ensure_dir_exists'.
+
+am_create_testdir=empty
+. ./defs || Exit 1
+
+cp "$am_amdir"/header-vars.am . \
+ || fatal_ "fetching makefile fragment headers-vars.am"
+
+# Filter out Automake comments and things that would need configure
+# substitutions.
+LC_ALL=C $EGREP -v '(^##|address@hidden@)' header-vars.am > defn.mk
+rm -f header-vars.am
+
+cat > Makefile << 'END'
+include ./defn.mk
+
+files = x/1 x/2 x/3
+
+all: $(files)
+.PHONY: all
+
+sanity-check:
+ $(warning $(call am__ensure_dir_exists,x))
+ $(if $(filter $(call am__ensure_dir_exists,x),:MKDIR_P:),, \
+ $(error am__ensure_dir_exists does not contain $$(MKDIR_P)))
+.PHONY: sanity-check
+
+$(files):
+ $(call am__ensure_dir_exists,x)
+ echo dummy > $@
+END
+
+# Sanity check.
+$MAKE sanity-check MKDIR_P=:MKDIR_P:
+
+# Basic usage.
+$MAKE MKDIR_P='mkdir -p'
+test -f x/1
+test -f x/2
+test -f x/3
+
+# Mkdir is not called uselessly.
+rm -rf x
+mkdir x
+$MAKE MKDIR_P=false
+
+# Mkdir is not called too many times.
+rm -rf x
+$MAKE MKDIR_P=mkdir
+test -f x/1
+test -f x/2
+test -f x/3
+
+:
diff --git a/t/exeext4.sh b/t/exeext4.sh
index a8595e3..9d64b70 100755
--- a/t/exeext4.sh
+++ b/t/exeext4.sh
@@ -37,18 +37,18 @@ if COND
BAZ = baz $(DEP)
endif
bin_PROGRAMS = $(programs) @programs@ prg3 $(BAR) $(BAZE)
+sbin_PROGRAMS = prg4 $(BAZ)
EXTRA_PROGRAMS = prg1 prg2 prg3
-TESTS = prg1 prg3 prg4 $(BAZ)
.PHONY: test-cond test-nocond
test-nocond:
is $(bin_PROGRAMS) == prg1.x prg2.x prg1.x prg2.x prg3.x
is $(EXTRA_PROGRAMS) == prg1.x prg2.x prg3.x
- is $(TESTS) == prg1.x prg3.x prg4
+ is $(sbin_PROGRAMS) == prg4.x
test-cond:
is $(bin_PROGRAMS) == prg1.x prg2.x prg1.x prg2.x prg3.x bar.x baz.x
is $(EXTRA_PROGRAMS) == prg1.x prg2.x prg3.x
- is $(TESTS) == prg1.x prg3.x prg4 baz.x bar.x
+ is $(sbin_PROGRAMS) == prg4.x baz.x bar.x
is $(BAR) $(BAZ) == bar baz bar
END
diff --git a/t/internals.tap b/t/internals.tap
index f6ea954..44b8912 100755
--- a/t/internals.tap
+++ b/t/internals.tap
@@ -19,7 +19,7 @@
am_create_testdir=empty
. ./defs || Exit 1
-plan_ 4
+plan_ 6
cp "$am_amdir"/header-vars.am . \
|| fatal_ "fetching makefile fragment headers-vars.am"
@@ -34,6 +34,9 @@ rm -f header-vars.am
cat > Makefile << 'END'
include ./defn.mk
+lo = abcdefghijklmnopqrstuvwxyz
+up = ABCDEFGHIJKLMNOPQRSTUVWXYZ
+
default:
@echo Please select an explicit test; exit 1
.PHONY: default
@@ -104,11 +107,50 @@ test-strip-suffixes:
= 'foo.b bar'
test '$(call am__strip_suffixes, .b.a .a, foo.b.a bar.a)' \
= 'foo bar'
+
+.PHONY: test-tolower
+test-tolower:
+
+.PHONY: test-toupper
+test-toupper:
+ test '$(call am__toupper,a)' = A
+ test '$(call am__toupper,A)' = A
+ test '$(call am__toupper,aba)' = ABA
+ test '$(call am__toupper,a b)' = 'A B'
+ test '$(call am__toupper, a B)' = ' A B'
+ test '$(call am__toupper,Ab )' = 'AB '
+ test '$(call am__toupper,A B c )' = 'A B C '
+ test '$(call am__toupper,0)' = 0
+ test '$(call am__toupper,0d)' = 0D
+ test '$(call am__toupper,@:&/?-)' = '@:&/?-'
+ test '$(call am__toupper,address@hidden)' = address@hidden
+ test '$(call am__toupper,zxzxzxZXZxzxzxzxzx)' = ZXZXZXZXZXZXZXZXZX
+ test '$(call am__toupper,$(lo))' = '$(up)'
+ test '$(call am__toupper,$(up))' = '$(up)'
+
+.PHONY: test-tolower
+test-tolower:
+ test '$(call am__tolower,A)' = a
+ test '$(call am__tolower,a)' = a
+ test '$(call am__tolower,ABA)' = aba
+ test '$(call am__tolower,A B)' = 'a b'
+ test '$(call am__tolower, A b)' = ' a b'
+ test '$(call am__tolower,aB )' = 'ab '
+ test '$(call am__tolower,a b C )' = 'a b c '
+ test '$(call am__tolower,0)' = 0
+ test '$(call am__tolower,0D)' = 0d
+ test '$(call am__tolower,@:&/?-)' = '@:&/?-'
+ test '$(call am__tolower,address@hidden)' = address@hidden
+ test '$(call am__tolower,ZXZXZXzxzXZXZXZXZX)' = zxzxzxzxzxzxzxzxzx
+ test '$(call am__tolower,$(up))' = '$(lo)'
+ test '$(call am__tolower,$(lo))' = '$(lo)'
END
command_ok_ am__strip_firstword $MAKE test-strip-firstword
command_ok_ am__strip_lastword $MAKE test-strip-lastword
command_ok_ am__uniq $MAKE test-uniq
command_ok_ am__test_strip_suffixes $MAKE test-strip-suffixes
+command_ok_ am__tolower $MAKE test-tolower
+command_ok_ am__toupper $MAKE test-toupper
:
diff --git a/t/parallel-tests-dynamic.sh b/t/parallel-tests-dynamic.sh
index c8b3b8f..625b5f6 100755
--- a/t/parallel-tests-dynamic.sh
+++ b/t/parallel-tests-dynamic.sh
@@ -15,7 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Check that dynamic content for $(TESTS) is supported, both when set from
-# inside the Makefile.am and when overriddend from the command line.
+# inside the Makefile.am and when overridden from the command line.
. ./defs || Exit 1
@@ -31,13 +31,18 @@ cat > ko <<'END'
exit 1
END
+cat > sk <<'END'
+#!/bin/sh
+exit 77
+END
+
cat > er << 'END'
#!/bin/sh
echo $0 should not be run >&2
exit 99
END
-chmod a+x ko ok
+chmod a+x ko ok sk
mkdir t
cp ok t/nosuffix
@@ -58,6 +63,9 @@ cp er t1.sh
cp er t9.sh
cp er tx98.sh
+cp sk fu.sh
+cp sk mu
+
cat > get-tests-list <<END
#!/bin/sh
echo "g1.sh ${tab}g2.sh "
@@ -71,7 +79,14 @@ cat > Makefile.am << 'END'
my_add_dirprefix = $(strip $(1))/$(strip $(2))
EXTRA_DIST = $(TESTS) get-tests-list
TEST_EXTENSIONS = .sh
-TESTS = $(wildcard $(srcdir)/t[0-9][0-9]*.sh)
+
+t1 = fu
+t2 = mux
+
+# Also try an empty match suffix, to ensure that the ':=' in there is
+# not confused by the parser with an immediate assignment operator.
+TESTS = $(t1:=.sh) $(t2:x=)
+TESTS += $(wildcard $(srcdir)/t[0-9][0-9]*.sh)
TESTS += $(shell $(srcdir)/get-tests-list)
TESTS += $(call my_add_dirprefix, t, nosuffix)
XFAIL_TESTS = $(wildcard $(srcdir)/t9[0-9]*.sh)
@@ -86,26 +101,28 @@ $AUTOMAKE -a
$MAKE check > stdout || { cat stdout; Exit 1; }
cat stdout
-count_test_results total=11 pass=9 fail=0 xpass=0 xfail=2 skip=0 error=0
-
-grep '^PASS: t/nosuffix$' stdout
-grep '^PASS: g1\.sh$' stdout
-grep '^PASS: g2\.sh$' stdout
-grep '^PASS: g3\.sh$' stdout
-grep '^PASS: g4\.sh$' stdout
-grep '^PASS: t00-foo\.sh' stdout
-grep '^PASS: t02\.sh' stdout
-grep '^PASS: t57_mu\.sh' stdout
-grep '^PASS: t7311\.sh' stdout
-grep '^XFAIL: t98S\.sh' stdout
-grep '^XFAIL: t99\.sh' stdout
+count_test_results total=13 pass=9 fail=0 xpass=0 xfail=2 skip=2 error=0
+
+grep '^PASS: t/nosuffix$' stdout
+grep '^PASS: g1\.sh$' stdout
+grep '^PASS: g2\.sh$' stdout
+grep '^PASS: g3\.sh$' stdout
+grep '^PASS: g4\.sh$' stdout
+grep '^PASS: t00-foo\.sh$' stdout
+grep '^PASS: t02\.sh$' stdout
+grep '^PASS: t57_mu\.sh$' stdout
+grep '^PASS: t7311\.sh$' stdout
+grep '^XFAIL: t98S\.sh$' stdout
+grep '^XFAIL: t99\.sh$' stdout
+grep '^SKIP: fu\.sh$' stdout
+grep '^SKIP: mu$' stdout
$MAKE mostlyclean
test "`find . -name *.log`" = ./config.log
$MAKE distcheck > stdout || { cat stdout; Exit 1; }
cat stdout
-count_test_results total=11 pass=9 fail=0 xpass=0 xfail=2 skip=0 error=0
+count_test_results total=13 pass=9 fail=0 xpass=0 xfail=2 skip=2 error=0
$MAKE check tests1='$(wildcard t00*.sh t98?.sh)' \
tests2='$(shell ./get-tests-list | sed 1d)' \
diff --git a/t/parallel-tests6.sh b/t/parallel-tests-internals.sh
similarity index 71%
copy from t/parallel-tests6.sh
copy to t/parallel-tests-internals.sh
index 94b464d..8614c5c 100755
--- a/t/parallel-tests6.sh
+++ b/t/parallel-tests-internals.sh
@@ -14,9 +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/>.
-# Check parallel-tests features:
-# - empty TESTS
-# See parallel-tests10.test for a similar issue.
+# Some internals of the parallel testsuite harness implementation.
. ./defs || Exit 1
@@ -26,6 +24,14 @@ END
cat > Makefile.am << 'END'
TESTS =
+.PHONY: test
+test:
+ test x'$(call am__tpfx,)' = x
+ test x'$(call am__tpfx,.test)' = x'TEST_'
+ test x'$(call am__tpfx,.sh5)' = x'SH5_'
+ test x'$(call am__tpfx,.x_y)' = x'X_Y_'
+ test x'$(call am__tpfx, )' = x
+ test x'$(call am__tpfx, .t )' = x'T_'
END
$ACLOCAL
@@ -33,10 +39,6 @@ $AUTOCONF
$AUTOMAKE -a
./configure
-$MAKE check >stdout || { cat stdout; Exit 1; }
-cat stdout
-for x in TOTAL PASS FAIL XPASS FAIL SKIP ERROR; do
- grep "^# $x: *0$" stdout
-done
+$MAKE test
-Exit 0
+:
diff --git a/t/posixsubst-tests.sh b/t/posixsubst-tests.sh
deleted file mode 100755
index 30d283a..0000000
--- a/t/posixsubst-tests.sh
+++ /dev/null
@@ -1,68 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Test that POSIX variable expansion '$(var:str=rpl)' works when used
-# with the TESTS special variable.
-
-# For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || Exit 1
-
-cat >> configure.ac << 'END'
-AC_OUTPUT
-END
-
-cat > Makefile.am << 'END'
-t1 = foo1 foo2
-t2 = barx
-t3 = bar2
-
-foo2.test barz:
- (echo '#!/bin/sh' && echo 'exit 0') > $@ && chmod a+x $@
-
-# Also try an empty match suffix, to ensure that the ':=' in there is
-# not confused by the parser with an unportable assignment operator.
-TESTS = $(t1:=.test) $(t2:x=y) $(t3:2=z)
-
-EXTRA_DIST = $(TESTS)
-MOSTLYCLEANFILES = *.out
-END
-
-cat > foo1.test <<'END'
-#!/bin/sh
-touch foo1.out
-test x"${TESTSUITE_OK-no}" = x"yes"
-END
-sed 's/foo1/bary/g' foo1.test > bary
-chmod +x foo1.test bary
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
-
-./configure
-$MAKE check >out 2>&1 && { cat out; Exit 1; }
-cat out
-ls -l
-grep '^FAIL: foo1\.test *$' out
-grep '^PASS: foo2\.test *$' out
-grep '^FAIL: bary *$' out
-grep '^PASS: barz *$' out
-test -f foo1.out
-test -f bary.out
-
-TESTSUITE_OK=yes $MAKE distcheck
-
-:
diff --git a/t/serial-tests.sh b/t/serial-tests.sh
index 3825f70..809c519 100755
--- a/t/serial-tests.sh
+++ b/t/serial-tests.sh
@@ -23,7 +23,7 @@ hasnt_parallel_tests ()
{
$EGREP -i 'test_suite_log|test_(logs|bases)|\.log.*:' $1 && Exit 1
grep 'recheck.*:' $1 && Exit 1
- grep '^check-TESTS: \$(TESTS)$' $1
+ grep '^check-TESTS: \$(am__cooked_tests)$' $1
}
has_parallel_tests ()
@@ -31,7 +31,7 @@ has_parallel_tests ()
$EGREP '(^| )check-TESTS.*:' $1
$EGREP '(^| )recheck.*:' $1
$EGREP '^\$\(TEST_SUITE_LOG\):.* \$\(am__test_logs\)( |$)' $1
- grep '^%.log %.trs *:.*%\.test' $1
+ grep '%\.log %\.trs *:' $1
}
mkdir one two
diff --git a/t/option-ng.sh b/t/spy-wildcard.sh
similarity index 67%
copy from t/option-ng.sh
copy to t/spy-wildcard.sh
index 3ad9fa7..83ebde7 100755
--- a/t/option-ng.sh
+++ b/t/spy-wildcard.sh
@@ -14,19 +14,23 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Automake-NG should recognize the (no-op) 'ng' option.
+# Check that the behaviour of the $(wildcard) builtin in corner cases
+# matches the assumptions done in our recipes.
. ./defs || Exit 1
-cat > configure.ac <<END
-AC_INIT([$me], [1.0])
-AM_INIT_AUTOMAKE([ng])
-AC_CONFIG_FILES([Makefile])
-END
+mkdir dir
+echo dummy > file
-echo AUTOMAKE_OPTIONS = ng > Makefile.am
+cat > Makefile <<'END'
+.PHONY: test
+test:
+ test x'$(wildcard dir)' = x'dir'
+ test x'$(wildcard file)' = x'file'
+ test x'$(wildcard dir/)' = x'dir/'
+ test x'$(wildcard file/.)' = x''
+END
-$ACLOCAL
-$AUTOMAKE
+$MAKE test
:
diff --git a/t/subobj-libtool.sh b/t/subobj-libtool.sh
new file mode 100755
index 0000000..366e999
--- /dev/null
+++ b/t/subobj-libtool.sh
@@ -0,0 +1,95 @@
+#! /bin/sh
+# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test of subdir objects with libtool.
+
+required='cc libtoolize'
+. ./defs || Exit 1
+
+cat >> configure.ac << 'END'
+AC_PROG_CC
+AM_PROG_CC_C_O
+AM_PROG_AR
+AC_PROG_LIBTOOL
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = subdir-objects
+noinst_LTLIBRARIES = libs/libfoo.la
+libs_libfoo_la_SOURCES = generic/1.c generic/2.c sub/subsub/3.c
+
+.PHONY: remake-single-object
+remake-single-object:
+ rm -rf generic
+ $(MAKE) generic/1.lo
+ test -f generic/1.lo
+ test ! -f generic/2.lo
+ rm -rf generic
+ $(MAKE) generic/2.lo
+ test ! -f generic/1.lo
+ test -f generic/2.lo
+ rm -rf sub generic
+ $(MAKE) sub/subsub/3.lo
+ test -f sub/subsub/3.lo
+ test ! -d generic
+END
+
+mkdir generic sub sub/subsub
+echo 'int one (void) { return 1; }' > generic/1.c
+echo 'int two (void) { return 2; }' > generic/2.c
+echo 'int three (void) { return 3; }' > sub/subsub/3.c
+
+libtoolize
+$ACLOCAL
+
+$AUTOMAKE --add-missing 2>stderr || { cat stderr >&2; Exit 1; }
+cat stderr >&2
+
+# Make sure compile is installed, and that Automake says so.
+grep 'install.*compile' stderr
+test -f compile
+
+grep '[^/][123]\.lo' Makefile.in && Exit 1
+
+$AUTOCONF
+
+mkdir build
+cd build
+../configure
+$MAKE
+
+test -d libs
+test -d generic
+test -d sub/subsub
+
+# The libraries and executables are not uselessly remade.
+: > xstamp
+$sleep
+echo dummy > libs/change-dir-timestamp
+echo dummy > generic/change-dir-timestamp
+echo dummy > sub/change-dir-timestamp
+echo dummy > sub/subsub/change-dir-timestamp
+$MAKE
+is_newest xstamp libs/libfoo.la
+
+$MAKE remake-single-object
+
+# VPATH builds must work also with dependency tracking disabled.
+# Also sanity check the distribution.
+$MAKE distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-dependency-tracking
+
+:
diff --git a/t/subobj.sh b/t/subobj.sh
index b7f6597..1265a43 100755
--- a/t/subobj.sh
+++ b/t/subobj.sh
@@ -16,30 +16,102 @@
# Test of subdir objects with C.
+required=cc
. ./defs || Exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
AM_PROG_CC_C_O
+AM_PROG_AR
+AC_PROG_RANLIB
+AC_OUTPUT
END
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = subdir-objects
-bin_PROGRAMS = wish
-wish_SOURCES = generic/a.c generic/b.c
+bin_PROGRAMS = progs/wish
+lib_LIBRARIES = libs/libhope.a
+progs_wish_SOURCES = generic/a.c generic/b.c
+libs_libhope_a_SOURCES = sub/sub2/foo.c
+
+.PHONY: remake-single-object
+remake-single-object:
+ rm -rf generic
+ $(MAKE) generic/a.$(OBJEXT)
+ test -f generic/a.$(OBJEXT)
+ test ! -f generic/b.$(OBJEXT)
+ rm -rf generic
+ $(MAKE) generic/b.$(OBJEXT)
+ test ! -f generic/a.$(OBJEXT)
+ test -f generic/b.$(OBJEXT)
+ rm -rf sub generic
+ $(MAKE) sub/sub2/foo.$(OBJEXT)
+ test -f sub/sub2/foo.$(OBJEXT)
+ test ! -d generic
+END
+
+mkdir generic sub sub/sub2
+cat > generic/a.c <<END
+int main (void)
+{
+ extern int i;
+ return i;
+}
+END
+echo 'int i = 0;' > generic/b.c
+
+cat > sub/sub2/foo.c <<'END'
+int answer (void)
+{
+ return 42;
+}
END
$ACLOCAL
$AUTOMAKE --add-missing 2>stderr || { cat stderr >&2; Exit 1; }
cat stderr >&2
+
# Make sure compile is installed, and that Automake says so.
grep 'install.*compile' stderr
test -f compile
-grep '^generic/a\.\$(OBJEXT):' Makefile.in
-grep '[^/]a\.\$(OBJEXT)' Makefile.in && Exit 1
+$EGREP '[^/](a|b|foo)\.\$(OBJEXT)' Makefile.in && Exit 1
+
+$AUTOCONF
+
+mkdir build
+cd build
+../configure
+$MAKE
+
+test -d progs
+test -d libs
+test -d generic
+test -d sub/sub2
+
+if test -f progs/wish; then
+ EXEEXT=
+elif test -f progs/wish.exe; then
+ EXEEXT=.exe
+else
+ fatal_ "couldn't determine extension of executables"
+fi
+
+# The libraries and executables are not uselessly remade.
+: > xstamp
+$sleep
+echo dummy > progs/change-dir-timestamp
+echo dummy > libs/change-dir-timestamp
+echo dummy > generic/change-dir-timestamp
+echo dummy > sub/change-dir-timestamp
+echo dummy > sub/sub2/change-dir-timestamp
+$MAKE
+is_newest xstamp progs/wish$EXEEXT libs/libhope.a
+
+$MAKE remake-single-object
-# Opportunistically test for a different bug.
-grep '^generic/b\.\$(OBJEXT):.*dirstamp' Makefile.in
+# Must work also with dependency tracking disabled.
+# Also sanity check the distribution.
+$MAKE distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-dependency-tracking
:
diff --git a/t/subobj6.sh b/t/subobj6.sh
deleted file mode 100755
index 2f902f2..0000000
--- a/t/subobj6.sh
+++ /dev/null
@@ -1,85 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Test of subdir make distclean rules.
-# From Robert Collins.
-
-required=cc
-. ./defs || Exit 1
-
-cat >> configure.ac << 'END'
-AM_PROG_CC_C_O
-AC_OUTPUT
-END
-
-cat > Makefile.am << 'END'
-AUTOMAKE_OPTIONS = subdir-objects
-bin_PROGRAMS = wish
-wish_SOURCES = generic/a.c
-
-test-all: all
- test -f generic/$(am__dirstamp)
-test-mostlyclean: mostlyclean
- test ! -f generic/a.o
-test-distclean: distclean
- test ! -f generic/$(am__dirstamp)
-END
-
-mkdir generic
-cat > generic/a.c << 'END'
-#include <stdio.h>
-int main ()
-{
- printf ("maude!\n");
- return 0;
-}
-END
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE --include-deps --copy --add-missing
-
-mkdir build
-cd build
-
-../configure
-$MAKE test-all
-$MAKE test-mostlyclean
-$MAKE test-distclean
-
-cd ..
-
-# Now test without the subdir.
-cat > Makefile.am << 'END'
-AUTOMAKE_OPTIONS = subdir-objects
-bin_PROGRAMS = wish
-wish_SOURCES = a.c
-END
-
-mv generic/a.c a.c
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE --include-deps --copy --add-missing
-
-mkdir build2
-cd build2
-
-../configure
-$MAKE
-$MAKE mostlyclean
-
-:
diff --git a/t/tap-bad-prog.tap b/t/tap-bad-prog.tap
index 2609329..ff7794a 100755
--- a/t/tap-bad-prog.tap
+++ b/t/tap-bad-prog.tap
@@ -29,9 +29,8 @@ AC_OUTPUT
END
cat > Makefile.am << 'END'
-LOG_DRIVER = $(srcdir)/tap-driver
-TEST_LOG_DRIVER = $(LOG_DRIVER)
-TESTS = none.test noread noexec.test
+TEST_LOG_DRIVER = $(srcdir)/tap-driver
+TESTS = none.test noread.test noexec.test
none.test:
END
@@ -41,12 +40,12 @@ echo 1..1
echo ok 1
END
-cp noexec.test noread
-chmod a-r noread
+cp noexec.test noread.test
+chmod a-r noread.test
$ACLOCAL
$AUTOCONF
-$AUTOMAKE
+$AUTOMAKE -a
./configure
@@ -72,10 +71,10 @@ else
fi
desc="non-readable test is reported"
-if test -r noread; then
+if test -r noread.test; then
skip_ -r "any file is readable" "$desc"
else
- command_ok_ "$desc" -- grep '^ERROR: noread' stdout
+ command_ok_ "$desc" -- grep '^ERROR: noread\.test' stdout
fi
# Check that no spurious test result is reported. This is lower-priority
diff --git a/t/tap-basic.sh b/t/tap-basic.sh
index 60a3c7f..09901c7 100755
--- a/t/tap-basic.sh
+++ b/t/tap-basic.sh
@@ -46,8 +46,6 @@ ok.test:
echo 'ok 3 # SKIP' >>address@hidden
cat address@hidden ;: For debugging.
mv -f address@hidden $@
-
-LOG_DRIVER = false # Dummy but required.
END
cat > success.test << 'END'
@@ -74,6 +72,13 @@ ok 19 - nineteen # SKIP
ok 20 twenty twenty # SKIP
END
+cat > test-driver <<'END'
+#!/bin/sh
+echo "$0: required by Automake, but should never be actually used" >&2
+exit 1
+END
+chmod a+x test-driver
+
$ACLOCAL
$AUTOCONF
$AUTOMAKE
diff --git a/t/tap-common-setup.sh b/t/tap-common-setup.sh
index b4026d5..f76ce3b 100755
--- a/t/tap-common-setup.sh
+++ b/t/tap-common-setup.sh
@@ -18,14 +18,7 @@
. ./defs || Exit 1
-cat >> configure.ac << 'END'
-# FIXME: must define this otherwise automake will require the presence
-# FIXME: of the 'test-driver' script. This issue should be documented
-# FIXME: in the manual ...
-AC_SUBST([LOG_DRIVER],
- ['$(error LOG_DRIVER should be never used) false'])
-AC_OUTPUT
-END
+echo AC_OUTPUT >> configure.ac
cat > Makefile.am << 'END'
TEST_LOG_DRIVER = $(srcdir)/tap-driver
@@ -33,10 +26,16 @@ TEST_LOG_COMPILER = cat
TESTS = all.test
END
+cat > test-driver <<'END'
+#!/bin/sh
+echo "$0: required by Automake, but should never be actually used" >&2
+exit 1
+END
+chmod a+x test-driver
+
$ACLOCAL
$AUTOCONF
$AUTOMAKE
-test ! -f test-driver
./configure
diff --git a/t/tap-diagnostic-custom.sh b/t/tap-diagnostic-custom.sh
index d1a4f98..afe0c00 100755
--- a/t/tap-diagnostic-custom.sh
+++ b/t/tap-diagnostic-custom.sh
@@ -31,7 +31,6 @@ my_log_driver = $(srcdir)/tap-driver
my_log_compiler = cat
TEST_EXTENSIONS =
TESTS =
-LOG_DRIVER = $(error LOG_DRIVER is dummy, required, never extended)
END
: > later.mk
@@ -78,7 +77,7 @@ done
$ACLOCAL
$AUTOCONF
-$AUTOMAKE
+$AUTOMAKE -a
./configure
diff --git a/t/tap-more.sh b/t/tap-more.sh
index 5949e15..014f347 100755
--- a/t/tap-more.sh
+++ b/t/tap-more.sh
@@ -40,6 +40,13 @@ TESTS = 1.test 2.test 3.test
EXTRA_DIST = $(TESTS) tap-driver
END
+cat > test-driver <<'END'
+#!/bin/sh
+echo "$0: required by Automake, but should never be actually used" >&2
+exit 1
+END
+chmod a+x test-driver
+
cat > 1.test <<'END'
#! /bin/sh
echo 1..2
diff --git a/t/tap-more2.sh b/t/tap-more2.sh
index b34e3c1..9ac5c11 100755
--- a/t/tap-more2.sh
+++ b/t/tap-more2.sh
@@ -77,7 +77,7 @@ END
$ACLOCAL
$AUTOCONF
-$AUTOMAKE
+$AUTOMAKE --add-missing
./configure
diff --git a/t/tap-recheck.sh b/t/tap-recheck.sh
index 2416c6a..e689c2c 100755
--- a/t/tap-recheck.sh
+++ b/t/tap-recheck.sh
@@ -81,7 +81,7 @@ chmod a+x *.test
$ACLOCAL
$AUTOCONF
-$AUTOMAKE
+$AUTOMAKE -a
do_recheck ()
{
diff --git a/t/test-driver-acsubst.sh b/t/test-driver-acsubst.sh
index e384ac7..06c9a11 100755
--- a/t/test-driver-acsubst.sh
+++ b/t/test-driver-acsubst.sh
@@ -26,6 +26,13 @@ cp "$am_testauxdir"/trivial-test-driver test-drivers/triv \
cp "$am_scriptdir"/test-driver test-drivers/dflt \
|| fatal_ "failed to fetch auxiliary script test-driver"
+cat > test-driver <<'END'
+#!/bin/sh
+echo "$0: required by Automake, but should never be actually used" >&2
+exit 1
+END
+chmod a+x test-driver
+
cat >> configure.ac <<'END'
AC_SUBST([LOG_DRIVER], ['${SHELL} test-drivers/triv'])
AC_SUBST([TEST_LOG_DRIVER], ['${SHELL} test-drivers/dflt'])
diff --git a/t/test-driver-cond.sh b/t/test-driver-cond.sh
index 5538105..3b941ed 100755
--- a/t/test-driver-cond.sh
+++ b/t/test-driver-cond.sh
@@ -79,13 +79,6 @@ chmod a+x foo bar.test baz.sh
$AUTOMAKE -a
test -f test-driver
-grep DRIVER Makefile.in || Exit 99 # For debugging.
-
-grep '^my_LOG_DRIVER *=' Makefile.in \
- && fatal_ 'unexpected $(my_LOG_DRIVER) in Makefile.in'
-
-grep '^TEST_LOG_DRIVER =.*\$(SHELL).*/test-driver' Makefile.in
-
$PERL -MTAP::Parser -e 1 \
|| skip_ "cannot import TAP::Parser perl module"
diff --git a/t/test-driver-create-log-dir.sh b/t/test-driver-create-log-dir.sh
index dc8e681..b748093 100755
--- a/t/test-driver-create-log-dir.sh
+++ b/t/test-driver-create-log-dir.sh
@@ -71,6 +71,13 @@ echo dummy2 > "$trs_file"
END
chmod a+x checkdir-driver
+cat > test-driver <<'END'
+#!/bin/sh
+echo "$0: required by Automake, but should never be actually used" >&2
+exit 1
+END
+chmod a+x test-driver
+
$ACLOCAL
$AUTOCONF
$AUTOMAKE
diff --git a/t/test-driver-custom-multitest.sh
b/t/test-driver-custom-multitest.sh
index 19acd98..291c95f 100755
--- a/t/test-driver-custom-multitest.sh
+++ b/t/test-driver-custom-multitest.sh
@@ -106,6 +106,13 @@ END
chmod a+x *.t
+cat > test-driver <<'END'
+#!/bin/sh
+echo "$0: required by Automake, but should never be actually used" >&2
+exit 1
+END
+chmod a+x test-driver
+
$ACLOCAL
$AUTOCONF
$AUTOMAKE
diff --git a/t/test-driver-custom-no-extra-driver.sh
b/t/test-driver-custom-no-extra-driver.sh
deleted file mode 100755
index 1d8553b..0000000
--- a/t/test-driver-custom-no-extra-driver.sh
+++ /dev/null
@@ -1,62 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Check that auxiliary script 'test-driver' doesn't get needlessly
-# installed or referenced if it's not used, i.e., if the user has
-# defined his own '*LOG_DRIVER' variables.
-
-. ./defs || Exit 1
-
-cat >> configure.ac <<'END'
-AC_PROG_CC
-AC_CONFIG_FILES([sub1/Makefile sub2/Makefile])
-AC_SUBST([LOG_DRIVER], ['unused but required by automake'])
-AC_OUTPUT
-END
-
-mkdir sub1 sub2
-
-cat > Makefile.am <<'END'
-SUBDIRS = sub1 sub2
-TEST_LOG_DRIVER = :
-TESTS = foo bar.test
-END
-
-cat > sub1/Makefile.am <<'END'
-TEST_EXTENSIONS = .x .sh .pl
-SH_LOG_DRIVER = dummy1
-PL_LOG_DRIVER = dummy2
-X_LOG_DRIVER = dummy3
-TESTS = a.pl b.sh c.x
-END
-
-cat > sub2/Makefile.am <<'END'
-TEST_EXTENSIONS = .bar
-BAR_LOG_DRIVER = y
-TESTS = 1 2.bar 3.test 4.t 5.tt $(check_PROGRAMS)
-check_PROGRAMS = p1 p2$(EXEEXT) p3.bar p4.suf
-END
-
-$ACLOCAL
-
-for opts in '' '--add-missing' '-a -c'; do
- $AUTOMAKE $opts
- $FGREP test-driver Makefile.in sub[12]/Makefile.in && Exit 1
- find . | $FGREP test-driver && Exit 1
- : For shells with busted 'set -e'.
-done
-
-:
diff --git a/t/test-driver-custom.sh b/t/test-driver-custom.sh
index ce4a7fc..3e22f97 100755
--- a/t/test-driver-custom.sh
+++ b/t/test-driver-custom.sh
@@ -115,6 +115,13 @@ cp 1.chk 4.c.chk
cp 1.chk 5.suf
cp 1.chk sub/test
+cat > test-driver <<'END'
+#!/bin/sh
+echo "$0: required by Automake, but should never be actually used" >&2
+exit 1
+END
+chmod a+x test-driver
+
$ACLOCAL
$AUTOCONF
$AUTOMAKE
diff --git a/t/test-driver-fail.sh b/t/test-driver-fail.sh
index f53e58f..1a4f59b 100755
--- a/t/test-driver-fail.sh
+++ b/t/test-driver-fail.sh
@@ -42,7 +42,7 @@ chmod a+x foo
$ACLOCAL
$AUTOCONF
-$AUTOMAKE
+$AUTOMAKE -a
./configure
diff --git a/t/test-driver-strip-vpath.sh b/t/test-driver-strip-vpath.sh
index 00acb7c..299c4a7 100755
--- a/t/test-driver-strip-vpath.sh
+++ b/t/test-driver-strip-vpath.sh
@@ -73,7 +73,7 @@ chmod a+x checkstrip-driver
$ACLOCAL
$AUTOCONF
-$AUTOMAKE
+$AUTOMAKE -a
cd ..
diff --git a/t/test-extensions-cond.sh b/t/test-extensions-cond.sh
index e081d79..d7f78db 100755
--- a/t/test-extensions-cond.sh
+++ b/t/test-extensions-cond.sh
@@ -14,56 +14,97 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Expose bug in conditional definition of TEST_EXTENSIONS.
+# Conditional definition of TEST_EXTENSIONS is supported.
. ./defs || Exit 1
cat >> configure.ac << 'END'
-AM_CONDITIONAL([COND], [:])
-AM_CONDITIONAL([COND2], [:])
+AC_CONFIG_FILES([sub/Makefile])
+AM_CONDITIONAL([COND1], [test x"$cond1" = x"yes"])
+AM_CONDITIONAL([COND2], [test x"$cond2" = x"yes"])
+AC_OUTPUT
END
-$ACLOCAL
+mkdir sub
-cat > 1.am << 'END'
-TESTS =
-if COND
-## lineno 4
-TEST_EXTENSIONS = .foo
+cat > Makefile.am << 'END'
+SUBDIRS = sub
+TESTS = foo.sh bar.test
+if COND1
+TEST_EXTENSIONS = .sh
endif
END
-cat > 2.am << 'END'
-TESTS =
-## lineno 3
-TEST_EXTENSIONS = .foo
-if COND
-# Do nothing.
+cat > sub/Makefile.am << 'END'
+TESTS = 1.sh 2.bar 3.x
+TEST_EXTENSIONS = .sh
+if COND1
+if !COND2
+TEST_EXTENSIONS += .x
+endif
else
TEST_EXTENSIONS += .bar
endif
END
-cat > 3.am << 'END'
-TESTS =
-if COND
-if !COND2
-TESTS = x
-else
-## lineno 7
-TEST_EXTENSIONS = .foo
-endif
-endif
+cat > foo.sh << 'END'
+#!/bin/sh
+exit 0
END
+chmod a+x foo.sh
+
+cp foo.sh bar.test
+cp foo.sh sub/1.sh
+cp foo.sh sub/2.bar
+cp foo.sh sub/3.x
+
+do_setup ()
+{
+ ./configure "$@"
+ $MAKE check
+ ls -l . sub
+}
+
+do_clean ()
+{
+ $MAKE clean
+ test "$(find . -name '*.log')" = ./config.log
+}
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+do_setup cond1=yes cond2=yes
+test -f foo.log
+test -f bar.test.log
+test -f sub/1.log
+test -f sub/2.bar.log
+test -f sub/3.x.log
+do_clean
+
+do_setup cond1=yes cond2=no
+test -f foo.log
+test -f bar.test.log
+test -f sub/1.log
+test -f sub/2.bar.log
+test -f sub/3.log
+do_clean
-: > test-driver
+do_setup cond1=no cond2=yes
+test -f foo.sh.log
+test -f bar.log
+test -f sub/1.log
+test -f sub/2.log
+test -f sub/3.x.log
+do_clean
-for i in 1 2 3; do
- AUTOMAKE_fails $i
- lineno=`sed -n 's/^## lineno //p' $i.am` \
- && test 0 -lt "$lineno" \
- || Exit 99
- grep "^$i\\.am:$lineno:.*TEST_EXTENSIONS.*conditional content" stderr
-done
+do_setup cond1=no cond2=no
+test -f foo.sh.log
+test -f bar.log
+test -f sub/1.log
+test -f sub/2.log
+test -f sub/3.x.log
+do_clean
:
diff --git a/t/test-extensions-dynamic.sh b/t/test-extensions-dynamic.sh
new file mode 100755
index 0000000..e2dbc7d
--- /dev/null
+++ b/t/test-extensions-dynamic.sh
@@ -0,0 +1,94 @@
+#! /bin/sh
+# Copyright (C) 2012 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# TEST_EXTENSIONS with contents dynamically determined at make time
+
+. ./defs || Exit 1
+
+cat >> configure.ac << 'END'
+AC_SUBST([suf], [.tap])
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+END
+
+mkdir sub
+
+cat > Makefile.am << 'END'
+SUBDIRS = sub
+TESTS = foo.sh bar.test baz.t1 mu.t1.t2 zardoz.tap
+TEST_EXTENSIONS = .test @suf@ $(foreach i,1 2,.t$(i))
+TEST_EXTENSIONS += $(subst &,.,$(call am__tolower,&SH))
+END
+
+cat > sub/Makefile.am << 'END'
+TESTS = 1.sh 2.bar 3
+TEST_EXTENSIONS = $(suffix $(TESTS))
+END
+
+cat > foo.sh << 'END'
+#!/bin/sh
+exit 0
+END
+chmod a+x foo.sh
+
+cp foo.sh bar.test
+cp foo.sh baz.t1
+cp foo.sh mu.t1.t2
+cp foo.sh zardoz.tap
+cp foo.sh sub/1.sh
+cp foo.sh sub/2.bar
+cp foo.sh sub/3
+
+do_setup ()
+{
+ $MAKE check ${1+"$@"}
+ ls -l . sub
+}
+
+do_clean ()
+{
+ $MAKE clean
+ test "$(find . -name '*.log')" = ./config.log
+}
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+./configure
+
+do_setup
+test -f foo.log
+test -f bar.log
+test -f baz.log
+test -f mu.t1.log
+test -f zardoz.log
+test -f sub/1.log
+test -f sub/2.log
+test -f sub/3.log
+
+do_clean
+
+do_setup TEST_EXTENSIONS='.sh .t2 $(subst o,e,.tost) ${suf}'
+test -f foo.log
+test -f bar.log
+test -f baz.t1.log
+test -f mu.t1.log
+test -f zardoz.log
+test -f sub/1.log
+test -f sub/2.bar.log
+test -f sub/3.log
+
+:
diff --git a/t/test-extensions-funny-chars.sh b/t/test-extensions-funny-chars.sh
new file mode 100755
index 0000000..e016112
--- /dev/null
+++ b/t/test-extensions-funny-chars.sh
@@ -0,0 +1,132 @@
+#! /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/>.
+
+# Make sure that Automake can handle "funny chars" in TEST_EXTENSIONS,
+# as long as they can be used in GNU make variable names.
+
+. ./defs || Exit 1
+
+fetch_tap_driver
+
+echo AC_OUTPUT >> configure.ac
+
+cat >> Makefile.am <<'END'
+TEST_EXTENSIONS = .@ .2 .f-o-o .l!Nu.x
+TESTS = foo.@ bar.f-o-o baz.2 zardoz.l!Nu.x
+XFAIL_TESTS = zardoz.l!Nu.x
address@hidden = $(SHELL)
+2_LOG_COMPILER = $(SHELL)
+F-O-O_LOG_DRIVER = $(srcdir)/tap-driver
+L!NU.X_LOG_COMPILER = false
+EXTRA_DIST = $(TESTS) tap-driver
+END
+
+touch foo.@ bar.f-o-o zardoz.l!Nu.x \
+ || skip_ "your file system doesn't support funny characters"
+
+# Try to ensure this file fails if executed directly.
+cat > foo.@ << 'END'
+#! /bin/false
+echo @K @K @K
+exit 0
+END
+cp foo.@ baz.2
+# We don't want them to be executable, either. So do this for
+# extra safety.
+chmod a-x foo.@ baz.2
+
+cat > bar.f-o-o << 'END'
+#! /bin/sh
+echo 1..4
+echo "ok - good"
+echo "ok 2 # SKIP"
+echo "not ok 3 # TODO"
+echo ok
+END
+chmod a+x bar.f-o-o
+
+cat > zardoz.l!Nu.x << 'END'
+#! /bin/sh
+echo Hello Zardoz
+exit 0
+END
+chmod a+x zardoz.l!Nu.x
+
+count_all ()
+{
+ count_test_results total=7 pass=4 fail=0 skip=1 xfail=2 xpass=0 error=0
+ grep '^PASS: address@hidden' stdout
+ grep '^PASS: baz\.2$' stdout
+ grep '^XFAIL: zardoz.l!Nu\.x$' stdout
+ grep '^PASS: bar\.f-o-o 1 - good' stdout
+ grep '^SKIP: bar\.f-o-o 2 # SKIP' stdout
+ grep '^XFAIL: bar\.f-o-o 3 # TODO' stdout
+ grep '^PASS: bar\.f-o-o 4$' stdout
+}
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+
+st=0; $MAKE check >stdout || st=$?
+cat stdout
+ls -l
+cat test-suite.log
+cat foo.log
+grep '@K @K @K' foo.log
+cat baz.log
+grep '@K @K @K' baz.log
+cat bar.log
+cat zardoz.log
+grep 'Hello Zardoz' zardoz.log && Exit 1
+test $st -eq 0 || Exit 1
+count_all
+
+$MAKE clean
+test ! -f test-suite.log
+test ! -f foo.log
+test ! -f bar.log
+test ! -f baz.log
+test ! -f zardoz.log
+
+st=0
+$MAKE check TESTS=zardoz L!NU.X_LOG_COMPILER=/bin/sh >stdout || st=$?
+cat stdout
+count_test_results total=1 pass=0 fail=0 skip=0 xfail=0 xpass=1 error=0
+cat test-suite.log
+test ! -f foo.log
+test ! -f bar.log
+test ! -f baz.log
+cat zardoz.log
+grep 'Hello Zardoz' zardoz.log
+test $st -gt 0 || Exit 1
+
+$MAKE recheck >stdout || { cat stdout; Exit 1; }
+cat stdout
+count_test_results total=1 pass=0 fail=0 skip=0 xfail=1 xpass=0 error=0
+grep '^XFAIL: zardoz.l!Nu\.x$' stdout
+
+$MAKE recheck >stdout || { cat stdout; Exit 1; }
+cat stdout
+count_test_results total=0 pass=0 fail=0 skip=0 xfail=0 xpass=0 error=0
+
+$MAKE distcheck >stdout || { cat stdout; Exit 1; }
+cat stdout
+count_all
+
+:
diff --git a/t/parallel-tests-once.sh b/t/test-extensions-invalid.sh
similarity index 63%
copy from t/parallel-tests-once.sh
copy to t/test-extensions-invalid.sh
index 51912fb..74058c6 100755
--- a/t/parallel-tests-once.sh
+++ b/t/test-extensions-invalid.sh
@@ -14,34 +14,32 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Tests shouldn't be run multiple times by a simple "make check" in a
-# clean directory. An early implementation of the '.trs' intermediate
-# files incurred a similar problem.
+# Make sure that invalid entries in TEST_EXTENSIONS are diagnosed at
+# make runtime. See automake bug#9400.
. ./defs || Exit 1
-cat >> configure.ac << 'END'
-AC_OUTPUT
-END
+echo AC_OUTPUT >> configure.ac
cat > Makefile.am << 'END'
-TESTS = foo.test
+TESTS =
+TEST_EXTENSIONS = mu x1 .foo _ x2
END
-cat > foo.test <<'END'
-#! /bin/sh
-test -f foo.run && Exit 1
-: > foo.run
-END
-chmod a+x foo.test
-
$ACLOCAL
$AUTOCONF
$AUTOMAKE -a
./configure
-$MAKE check
-test -f foo.run # Sanity check.
+$MAKE 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+for suf in mu x1 _ x2; do
+ $FGREP "invalid test extension: '$suf'" stderr
+done
+
+# Verify that we don't report valid suffixes, even if intermixed
+# with invalid ones.
+grep 'invalid.*extension.*foo' stderr && Exit 1
:
diff --git a/t/test-extensions.sh b/t/test-extensions.sh
deleted file mode 100755
index 481d1e3..0000000
--- a/t/test-extensions.sh
+++ /dev/null
@@ -1,70 +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/>.
-
-# Make sure that Automake diagnose invalid entries in TEST_EXTENSIONS,
-# and do not diagnose valid (albeit more unusual) ones.
-# See automake bug#9400.
-
-. ./defs || Exit 1
-
-cat >> configure.ac <<'END'
-AC_OUTPUT
-END
-
-$ACLOCAL
-$AUTOCONF
-
-valid_extensions='sh T t1 _foo BAR x_Y_z _'
-
-echo TESTS = > Makefile.am
-echo " $valid_extensions" \
- | sed -e 's/ / ./g' -e 's/^/TEST_EXTENSIONS =/' >> Makefile.am
-cat Makefile.am # For debugging.
-
-$AUTOMAKE -a
-
-grep -i 'log' Makefile.in # For debugging.
-
-for lc in $valid_extensions; do
- uc=`echo $lc | tr '[a-z]' '[A-Z]'`
- grep "^${uc}_LOG_DRIVER =" Makefile.in
- grep "^%\.log %\.trs *:.*%\.${lc}" Makefile.in
-done
-
-# The produced Makefile is not broken.
-./configure
-$MAKE all check
-
-cat > Makefile.am << 'END'
-TESTS = foo.test bar.sh
-TEST_EXTENSIONS = .test mu .x-y a-b .t.1 .sh .6c .0 .11 .= @suf@
address@hidden@
-TEST_EXTENSIONS += .= .t33 address@hidden _&_
-END
-
-AUTOMAKE_fails
-for suf in mu .x-y a-b .t.1 .6c .0 .11 @suf@ address@hidden@ '.=' '_&_'; do
- suf2=`printf '%s\n' "$suf" | sed -e 's/\./\\./'`
- $EGREP "^Makefile\.am:2:.*invalid test extension.* $suf2( |$)" stderr
-done
-
-# Verify that we accept valid suffixes, even if intermixed with
-# invalid ones.
-$EGREP '\.(sh|test|t33)' stderr && Exit 1
-
-# Verify that we don't try to handle invalid suffixes.
-$EGREP '(LOG_COMPILER|non-POSIX var|bad character)' stderr && Exit 1
-
-:
diff --git a/t/test-metadata-global-log.sh b/t/test-metadata-global-log.sh
index 019a1e6..7faeb50 100755
--- a/t/test-metadata-global-log.sh
+++ b/t/test-metadata-global-log.sh
@@ -23,7 +23,6 @@
. ./defs || Exit 1
cat >> configure.ac << 'END'
-AC_SUBST([LOG_DRIVER], ['ignored but required by autoamke, sigh!'])
AC_OUTPUT
END
@@ -128,7 +127,7 @@ echo TESTS = *.test >> Makefile.am
$ACLOCAL
$AUTOCONF
-$AUTOMAKE
+$AUTOMAKE -a
./configure
diff --git a/t/test-metadata-global-result.sh b/t/test-metadata-global-result.sh
index 3d8759a..cbd0cce 100755
--- a/t/test-metadata-global-result.sh
+++ b/t/test-metadata-global-result.sh
@@ -69,7 +69,7 @@ have_result ()
$ACLOCAL
$AUTOCONF
-$AUTOMAKE
+$AUTOMAKE -a
./configure
diff --git a/t/test-metadata-recheck.sh b/t/test-metadata-recheck.sh
index 8874745..a09c84f 100755
--- a/t/test-metadata-recheck.sh
+++ b/t/test-metadata-recheck.sh
@@ -138,7 +138,7 @@ chmod a+x dummy-driver
$ACLOCAL
$AUTOCONF
-$AUTOMAKE
+$AUTOMAKE -a
./configure
diff --git a/t/test-metadata-results.sh b/t/test-metadata-results.sh
index ca69b93..6fcdbb3 100755
--- a/t/test-metadata-results.sh
+++ b/t/test-metadata-results.sh
@@ -80,7 +80,7 @@ count_test_results ()
$ACLOCAL
$AUTOCONF
-$AUTOMAKE
+$AUTOMAKE --add-missing
./configure
diff --git a/t/vartypo2.sh b/t/vartypo2.sh
index 9b52df6..9c1b6d7 100755
--- a/t/vartypo2.sh
+++ b/t/vartypo2.sh
@@ -31,8 +31,6 @@ libfoo_la_SOURCES = unused
nodist_libfoo_la_SOURCES = unused
EXTRA_libfoo_la_SOURCES = unused
libfoo_la_LIBADD = unused
-libfoo_la_DEPENDENCIES = unused
-EXTRA_libfoo_la_DEPENDENCIES = unused
END
libtoolize
@@ -48,14 +46,9 @@ AUTOMAKE_fails --add-missing
# Makefile.am:2: library has `libfoo_la' as canonical name (possible typo)
# Makefile.am:4: warning: variable `libfoo_la_LIBADD' is defined but no
program or
# Makefile.am:4: library has `libfoo_la' as canonical name (possible typo)
-# Makefile.am:6: warning: variable `EXTRA_libfoo_la_DEPENDENCIES' is defined
but no program or
-# Makefile.am:6: library has `libfoo_la' as canonical name (possible typo)
-# Makefile.am:5: warning: variable `libfoo_la_DEPENDENCIES' is defined but no
program or
-# Makefile.am:5: library has `libfoo_la' as canonical name (possible typo)
-
grep 'as canonical' stderr | grep -v ' .libfoo_la. ' && Exit 1
-test `grep 'variable.*is defined but' stderr | wc -l` = 6
+test `grep 'variable.*is defined but' stderr | wc -l` = 4
# If we add a global -Wnone, all warnings should disappear.
$AUTOMAKE -Wnone
diff --git a/t/vartypos.sh b/t/vartypos.sh
index eb924cc..d176d04 100755
--- a/t/vartypos.sh
+++ b/t/vartypos.sh
@@ -29,15 +29,11 @@ nodist_foo_SOURCES = unused
EXTRA_foo_SOURCES = unused
foo_LDADD = unused
foo_LDFLAGS = unused
-foo_DEPENDENCIES = unused
-EXTRA_foo_DEPENDENCIES = unused
libfoo_a_SOURCES = unused
nodist_libfoo_a_SOURCES = unused
EXTRA_libfoo_a_SOURCES = unused
libfoo_a_LIBADD = unused
-libfoo_a_DEPENDENCIES = unused
-EXTRA_libfoo_a_DEPENDENCIES = unused
END
$ACLOCAL
@@ -62,18 +58,10 @@ AUTOMAKE_fails -Wno-extra-portability
# Makefile.am:4: library has 'foo' as canonical name (possible typo)
# Makefile.am:5: warning: variable 'foo_LDFLAGS' is defined but no program or
# Makefile.am:5: library has 'foo' as canonical name (possible typo)
-# Makefile.am:14: warning: variable 'EXTRA_libfoo_a_DEPENDENCIES' is defined
but no program or
-# Makefile.am:14: library has 'libfoo_a' as canonical name (possible typo)
-# Makefile.am:7: warning: variable 'EXTRA_foo_DEPENDENCIES' is defined but no
program or
-# Makefile.am:7: library has 'foo' as canonical name (possible typo)
-# Makefile.am:6: warning: variable 'foo_DEPENDENCIES' is defined but no
program or
-# Makefile.am:6: library has 'foo' as canonical name (possible typo)
-# Makefile.am:13: warning: variable 'libfoo_a_DEPENDENCIES' is defined but no
program or
-# Makefile.am:13: library has 'libfoo_a' as canonical name (possible typo)
grep 'as canonical' stderr | grep -v ' .foo. ' | grep -v ' .libfoo_a. ' \
&& Exit 1
-test `grep 'variable.*is defined but' stderr | wc -l` = 13
+test `grep 'variable.*is defined but' stderr | wc -l` = 9
# If we add a global -Wnone, all warnings should disappear.
$AUTOMAKE -Wnone
diff --git a/t/yacc-auxdir.sh b/t/yacc-auxdir.sh
index 1b494e8..534abbd 100755
--- a/t/yacc-auxdir.sh
+++ b/t/yacc-auxdir.sh
@@ -50,7 +50,7 @@ test -f aux1/ylwrap
test ! -f ylwrap
test ! -f sub/ylwrap
grep -i 'ylwrap' Makefile.in sub/Makefile.in # For debugging.
-$FGREP '$(top_srcdir)/aux1/ylwrap' Makefile.in
-$FGREP '$(top_srcdir)/aux1/ylwrap' sub/Makefile.in
+$FGREP '$(am__config_aux_dir)/ylwrap' Makefile.in
+$FGREP '$(am__config_aux_dir)/ylwrap' sub/Makefile.in
:
hooks/post-receive
--
GNU Automake
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.12-306-g879ae21,
Stefano Lattarini <=