[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.11-1
From: |
Stefano Lattarini |
Subject: |
[Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.11-1875-gd5e4bc2 |
Date: |
Thu, 09 Feb 2012 19:43:01 +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=d5e4bc2a07ff82288ef79c8f3959618506b6a1ac
The branch, ng/master has been updated
via d5e4bc2a07ff82288ef79c8f3959618506b6a1ac (commit)
via 7898eaf2aeeeddf5e7fe6797064b4e732960b129 (commit)
via 9ac0278a5ba1b15f790ba146a319212ddf8c3439 (commit)
via c1875ea6374417be1b38acb9a4013d6586c9c5c6 (commit)
via 44d95be08f8d4ee82d34c74e1bcde76460b93ee4 (commit)
via b1d998fb6f51d6126bb4f66df7aa323202bbf77e (commit)
via 3974270e2819447efdd3f4749c8f0f910bc9388c (commit)
via 9dfdc96a81f384d8cbfb9d87212db1aec0a22d25 (commit)
via e36b1ad1209fc6dc7b7128b5baef6fa44fdb5d1f (commit)
via 0eccd77f93de84c56f5045f8cc5a4fa74c55afe9 (commit)
via 6fca3afa13f5b9ccdc9990e769793b0d9f31f5db (commit)
via 81193035cee80eab1dca5d34d2a8f5f011bc4f57 (commit)
via 1e2ced5c2e6a6be7c45349dc728ba2012eb6aa0a (commit)
via 887ededc571638e14143b478d6683f6ce4e68e29 (commit)
via 96401cb96cb4494023c59850d9f6a2912df22c24 (commit)
via 5066c1b5019b7de419a7b4703c26cb79ee9c713d (commit)
via f5f838a2eba1bb26a755762665095ae76fe59a9e (commit)
via 947ce0ed641ca226c632a3c05adfc068b802c518 (commit)
via dec3c38232bb9006f02c6ca2a04d62e8f5b01125 (commit)
via 21f979352aa120457b09e4487f5e23a72d8c3dce (commit)
via d7dca5af7aa33024228e7bc21a86383ded4ab2bc (commit)
via ce2c543e2ebaf419906073ce3070ce12784e2d64 (commit)
via a66a0be80e976b66cd87dbd1aebaf15c3e34068b (commit)
via 3522166d467ae99be7440f1e4842b9383c3ec736 (commit)
via 2506b3935b6e890f6d2a5b80234a9a91ab6515e9 (commit)
via ea4f1a91ac1c11a91a21169125b7ed931a4ab7fe (commit)
via d029740b347df2f4792b56d402e9368e8b741c2a (commit)
via d2d18dca6f34c36881b54f45c598e6bbf622be83 (commit)
via da0964eb751461516bda1a38b8423cb412b601d6 (commit)
via d51da57f66d5ad66d1edfe3898baa0bef625f4e1 (commit)
via 6b819187e01cfa365a5bf3b122074c7da28fb8e1 (commit)
via 87f2058a5d83a1f256eaf95a9e345dd61ff959d9 (commit)
via 2077a04427bae2945635bf870817b3e21aae5f4d (commit)
via dde91c5484e045882198d656fcfda7e9c11d7858 (commit)
via 85cadc4e7738b84cc107b2f7a2adad5a2fa29005 (commit)
via c3e4962a9819b260a61e156f2105b58558af6396 (commit)
from e5b964c4ddac632d53138e9e483f105839514fe7 (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 d5e4bc2a07ff82288ef79c8f3959618506b6a1ac
Author: Stefano Lattarini <address@hidden>
Date: Thu Feb 9 20:37:05 2012 +0100
[ng] maintcheck: fix real and spurious warnings
This failures have been introduced by the recent merging of
master.
* lib/am/check.am: Don't use '$(AM_MAKEFLAGS)' in recursive make
invocations.
* tests/make-dryrun.test: Likewise. Also, avoid code to determine
whether $MAKE is GNU make or supports the required make features:
we can assume that unconditionally.
* lib/am/header-vars.am: Remove references to NetBSD and Solaris
make from the comments.
commit 7898eaf2aeeeddf5e7fe6797064b4e732960b129
Merge: e5b964c 9ac0278
Author: Stefano Lattarini <address@hidden>
Date: Thu Feb 9 20:07:06 2012 +0100
Merge branch 'master' into ng/master
* master: (29 commits)
tests: avoid wrong skips in dist-formats.tap
tests: few tweakings and cosmetic changes
tests: remove a couple of redundant 'set -e' calls
tests: check if 'compress' is real or fake
depcomp tests: avoid spurious failures with 'dashXmstdout' depmode
depcomp: try to prevent whitespace regressions
depcomp: recognize tabs as whitespace in the dashmstdout mode
depcomp: quote 'like this', not `like this'
tests: check the depmodes 'msvisualcpp' and 'msvcmsys'
tests: better way to compare lists in Makefile rules
tests: improve and rework tests on dependency tracking
tests: fix a timestamp-related spurious failures
dryrun: fix regression with '$(am__make_dryrun)'
test defs: avoid spurious XPASS results with NetBSD make
cosmetics: few whitespace fixlets
cosmetics: various typofixes
cosmetics: convert encoding from ISO-8859 to UTF-8 in some tests
test defs: remove obsolete requirement 'rst2html'
tests: workaround for shells with broken 'set -e'
cosmetics: fix a typo in comments
...
-----------------------------------------------------------------------
Summary of changes:
.gitignore | 1 +
ChangeLog.01 | 4 +-
ChangeLog.02 | 4 +-
ChangeLog.04 | 2 +-
ChangeLog.11 | 4 +-
ChangeLog.96 | 16 +-
ChangeLog.98 | 24 +-
THANKS | 2 +
contrib/README | 3 +-
doc/automake.texi | 4 +-
lib/am/check.am | 90 +++---
lib/am/distdir.am | 14 +-
lib/am/header-vars.am | 17 +
lib/am/lisp.am | 7 +-
lib/depcomp | 44 ++--
lib/tap-driver.pl | 59 +++-
tests/Makefile.am | 2 +-
tests/acloca16.test | 3 +-
tests/aclocal5.test | 2 +
tests/add-missing.tap | 4 +-
tests/ar-lib5b.test | 4 +-
tests/block.test | 6 +-
tests/bsource.test | 3 +-
tests/check-no-test-driver.test | 1 +
tests/check12.test | 7 +-
tests/check8.test | 4 +-
tests/colneq2.test | 6 +-
tests/commen11.test | 7 +-
tests/comment7.test | 14 +-
tests/comment8.test | 5 +-
tests/compile_f90_c_cxx.test | 12 +-
tests/compile_f_c_cxx.test | 11 +-
tests/cond-basic.test | 5 +-
tests/cond11.test | 7 +-
tests/cond16.test | 4 +-
tests/cond18.test | 6 +-
tests/cond19.test | 12 +-
tests/cond22.test | 4 +-
tests/cond31.test | 6 +-
tests/cond32.test | 5 +-
tests/cond38.test | 4 +-
tests/cond4.test | 4 +-
tests/cond43.test | 8 +-
tests/cond6.test | 17 +-
tests/conffile-leading-dot.test | 2 -
tests/cygnus-no-dist.test | 4 +-
tests/defs | 30 +-
tests/defs-static.in | 2 +-
tests/depcomp.sh | 390 ++++++++++++++++++++++
tests/depcomp3.test | 63 ----
tests/depcomp4.test | 59 ----
tests/depcomp5.test | 69 ----
tests/depcomp6.test | 110 ------
tests/depcomp7.test | 126 -------
tests/depcomp8a.test | 4 +-
tests/depcomp8b.test | 4 +-
tests/depend2.test | 54 ---
tests/depmod.tap | 209 ------------
tests/destdir.test | 3 +-
tests/dist-formats.tap | 21 +-
tests/exeext4.test | 50 ++--
tests/extra-programs-empty.test | 4 +-
tests/fort2.test | 3 +-
tests/gen-testsuite-part | 77 ++++-
tests/is | 54 +++
tests/java-mix.test | 5 +-
tests/lex-lib-external.test | 3 +-
tests/lex-noyywrap.test | 5 +-
tests/lex3.test | 5 +-
tests/list-of-tests.mk | 8 +-
tests/ltinstloc.test | 4 +-
tests/{objext-pr10128.test => make-dryrun.test} | 61 ++--
tests/missing.test | 3 +-
tests/missing2.test | 5 +-
tests/nodef.test | 3 +-
tests/nodef2.test | 3 +-
tests/nodep2.test | 10 +-
tests/objext-pr10128.test | 4 +-
tests/parallel-tests-dry-run-1.test | 5 +-
tests/parallel-tests-dry-run-2.test | 1 +
tests/parallel-tests-extra-programs.test | 2 +-
tests/parallel-tests-unreadable.test | 3 +-
tests/parallel-tests2.test | 5 +-
tests/pluseq3.test | 6 +-
tests/programs-primary-rewritten.test | 8 +-
tests/python5.test | 2 +-
tests/subobjname.test | 10 +-
tests/subst4.test | 3 +-
tests/substre2.test | 15 +-
tests/substref.test | 19 +-
tests/tagsub.test | 6 +-
tests/tap-bad-prog.tap | 35 ++-
tests/tap-fancy2.test | 2 +-
tests/test-driver-custom-multitest-recheck2.test | 4 +-
tests/test-driver-custom-no-extra-driver.test | 3 +-
tests/test-logs-repeated.test | 4 +-
tests/test-metadata-recheck.test | 1 +
tests/txinfo21.test | 2 +-
tests/werror3.test | 3 +-
tests/yacc-basic.test | 1 +
100 files changed, 983 insertions(+), 1082 deletions(-)
delete mode 100644 lib/am/comp-vars.am
create mode 100755 tests/depcomp.sh
delete mode 100755 tests/depcomp3.test
delete mode 100755 tests/depcomp4.test
delete mode 100755 tests/depcomp5.test
delete mode 100755 tests/depcomp6.test
delete mode 100755 tests/depcomp7.test
delete mode 100755 tests/depend2.test
delete mode 100755 tests/depmod.tap
create mode 100755 tests/is
copy tests/{objext-pr10128.test => make-dryrun.test} (51%)
diff --git a/.gitignore b/.gitignore
index 46607dc..c95a193 100644
--- a/.gitignore
+++ b/.gitignore
@@ -53,6 +53,7 @@ Makefile
/tests/testsuite-part.am
/tests/*-w.tap
/tests/*-w.test
+/tests/depcomp-*.tap
/tests/*.dir
/tests/*.log
/tests/*.trs
diff --git a/ChangeLog.01 b/ChangeLog.01
index d3150b2..2bd9d47 100644
--- a/ChangeLog.01
+++ b/ChangeLog.01
@@ -1436,7 +1436,7 @@
* m4/auxdir.m4: More comments.
2001-07-31 Richard Boulton <address@hidden>
- Raja R Harinath <address@hidden>
+ Raja R Harinath <address@hidden>
* automake.in (variable_conditions_sub): Remove @parent_conds
argument. This was old logic - duplicate or impossible
@@ -1634,7 +1634,7 @@
* lib/am/tags.am (GTAGS): Added GTAGS_ARGS. From Shigio Yamaguchi.
2001-07-19 Tom Tromey <address@hidden>
- Alexandre Duret-Lutz <address@hidden>
+ Alexandre Duret-Lutz <address@hidden>
Fix for ccnoco.test, subobj8.test:
* m4/Makefile.am (m4data_DATA): Added auxdir.m4.
diff --git a/ChangeLog.02 b/ChangeLog.02
index 7e5caa7..45a7c67 100644
--- a/ChangeLog.02
+++ b/ChangeLog.02
@@ -2238,7 +2238,7 @@
Reported by Braden N. McDaniel.
2002-05-08 Charles Wilson <address@hidden>
- Alexandre Duret-Lutz <address@hidden>
+ Alexandre Duret-Lutz <address@hidden>
* lib/am/progs.am (clean-%DIR%PROGRAMS): If Libtool is used, clean
both `program$(EXEEXT)' and `program'; needed under Cygwin.
@@ -3146,7 +3146,7 @@
2002-01-06 Raja R Harinath <address@hidden>
* automake.in (handle_languages): Emit an automake
- internal variable 'am__depfiles_maybe'.
+ internal variable 'am__depfiles_maybe'.
* lib/am/configure.am (%MAKEFILE%): Use am__depfiles_maybe.
* lib/am/configure.am (%MAKEFILE%): Pass `depfiles' to
diff --git a/ChangeLog.04 b/ChangeLog.04
index 5dfcd9e..ee393ca 100644
--- a/ChangeLog.04
+++ b/ChangeLog.04
@@ -1549,7 +1549,7 @@
(generate_makefile): Likewise.
* tests/nodist3.test: Ensure that DIST_SOURCES is not created,
and that dist target does not exist.
- Reported by Tom Fitzsimmons.
+ Reported by Tom Fitzsimmons.
2004-01-02 Alexandre Duret-Lutz <address@hidden>
diff --git a/ChangeLog.11 b/ChangeLog.11
index 50b37ec..9c2af31 100644
--- a/ChangeLog.11
+++ b/ChangeLog.11
@@ -415,7 +415,7 @@
(posixsubst-ltlibraries.log): Likewise.
* tests/defs: Adjust the path of the included `get.sh' scripts
generated by `libtool-macros.test' and `gettext-macros.test'.
- * aclocal.m4: Delete, it's auto-generated now.
+ * aclocal.m4: Delete, it's auto-generated now.
* configure: Likewise.
* Makefile.in: Likewise.
* doc/Makefile.in: Likewise.
@@ -7109,7 +7109,7 @@
* tests/yflags.test: Likewise.
* tests/yflags-force-conditional.test: Likewise.
* tests/lflags2.test: Simplify so that it doesn't require a
- C++ compiler anymore.
+ C++ compiler anymore.
* tests/yflags2.test: Likewise.
* tests/autohdrdry.test (configure.in): Remove unneeded call
to `AC_PROG_CC'.
diff --git a/ChangeLog.96 b/ChangeLog.96
index 07f71c2..c721146 100644
--- a/ChangeLog.96
+++ b/ChangeLog.96
@@ -172,7 +172,7 @@ Tue Dec 3 11:29:01 1996 Gordon Matzigkeit
<address@hidden>
* compile-kr.am: Quote arguments to echo.
* progs.am: Fix up problems when LIBTOOL is not defined (by
- setting shell variable instprog to the installation program).
+ setting shell variable instprog to the installation program).
* aclocal.in (scan_file): Allow the acinclude.m4 file to override
any other macro files (but still prevent multiple definitions
@@ -194,7 +194,7 @@ Tue Dec 3 10:40:48 1996 Tom Tromey <address@hidden>
Mon Dec 2 13:51:11 1996 Gordon Matzigkeit <address@hidden>
* automake.in (get_object_extension): Unshift ansi2knr onto the
- all target, so that it builds before any other targets.
+ all target, so that it builds before any other targets.
[de_ansi_objects]: Delete, since unshifting ansi2knr is an easier
solution.
@@ -306,7 +306,7 @@ Fri Nov 15 18:58:04 1996 Tom Tromey <address@hidden>
* tags.am (tags-recursive): Removed.
(TAGS): Depend on @DIRS@, @address@hidden Use @CONFIG@ in rule.
(ID): From tags-subd.am.
-
+
* aclocal.in (obsolete_macros): Include AM_FUNC_FNMATCH.
* automake.in (scan_configure): Recognize AC_FUNC_FNMATCH.
* m4/fnmatch.m4: Removed (now in autoconf).
@@ -1311,7 +1311,7 @@ Tue Jun 18 10:53:54 1996 Tom Tromey <address@hidden>
* automake.in (handle_tests): Don't directly generate site.exp.
Sun Jun 16 22:21:16 1996 Harlan Stenn <address@hidden>
-
+
* automake.in: Treat an initial `#' on a word in AUTOMAKE_OPTIONS
as a comment start. Add support for a dist-tarZ target.
@@ -1572,8 +1572,8 @@ Thu Apr 25 18:40:06 1996 Tom Tromey <address@hidden>
Tue Apr 23 17:57:13 1996 Andreas Schwab <address@hidden>
* doc/mdate-sh: Extract the last field from the date output, not
- the sixth, which will fail when the timezone name has more than
- one word or is missing.
+ the sixth, which will fail when the timezone name has more than
+ one word or is missing.
Wed Apr 24 20:29:26 1996 Tom Tromey <address@hidden>
@@ -2125,9 +2125,9 @@ Wed Feb 7 18:00:29 1996 Tom Tromey <address@hidden>
Give error if appropriate install macro not seen.
(handle_subdirs): Ensure $seen_gettext before requiring
gettext-specific files.
- (handle_configure): Automatically rebuild
+ (handle_configure): Automatically rebuild
- From Jim Meyering:
+ From Jim Meyering:
* automake.in (handle_source_transform): Use \W when quoting
regexp. When blah_SOURCES not explicitly defined, still create
entry in %deps.
diff --git a/ChangeLog.98 b/ChangeLog.98
index 1fcc56c..717b7f5 100644
--- a/ChangeLog.98
+++ b/ChangeLog.98
@@ -122,7 +122,7 @@ Fri Dec 11 10:23:17 1998 Matthew D. Langston
<address@hidden>
1998-12-20 Thomas Tanner <address@hidden>
* automake.in (handle_libraries, handle_ltlibraries): relax the
- name checking to not enforce `^lib.*' for the sake of building libtool
+ name checking to not enforce `^lib.*' for the sake of building libtool
modules.
1998-12-21 Tom Tromey <address@hidden>
@@ -301,7 +301,7 @@ Thu Oct 8 15:00:57 1998 Matthew D. Langston
<address@hidden>
* automake.in: Registered the ppf77 language (`.F' extension) for
preprocessed Fortran 77.
-
+
* automake.in: Registered the ratfor language (`.r' extension).
* automake.in: Registered Fortran 77 header files with the "header
@@ -525,7 +525,7 @@ Tue Sep 29 00:10:22 1998 Tom Tromey <address@hidden>
* automake.in: New pattern: INCLUDE_PATTERN.
(read_am_file): Make AM_FILE a local filehandle.
- For INCLUDE_PATTERN, store included paths on @include_stack and call
+ For INCLUDE_PATTERN, store included paths on @include_stack and call
read_am_file with argument.
(handle_configure): When printing the dependencies for
Makefile.in, print the items on include_stack (if any) as
@@ -533,7 +533,7 @@ Tue Sep 29 00:10:22 1998 Tom Tromey <address@hidden>
* automake.texi: Make a command index `cm' that goes into the
concept index. Put if, endif, else, and include in the command index.
- (Include): Show usage of include directive.
+ (Include): Show usage of include directive.
Mon Sep 28 00:03:45 1998 Tom Tromey <address@hidden>
@@ -663,8 +663,8 @@ Mon Sep 14 00:55:12 1998 Per Cederqvist <address@hidden>
Fix for Dynix 3.1.1.
* automake.in (handle_yacc_lex_cxx): Transform "# " to "#line";
- some compilers (such as /bin/cc on Dynix 3.1.1) don't accept the
- output from the preprocessor.
+ some compilers (such as /bin/cc on Dynix 3.1.1) don't accept the
+ output from the preprocessor.
Tue Aug 25 18:40:51 1998 Tom Tromey <address@hidden>
@@ -744,7 +744,7 @@ Fri Jul 17 07:37:20 1998 H.J. Lu (address@hidden)
Fri Jul 17 11:58:27 1998 Ian Lance Taylor <address@hidden>
* automake.in: Use $(AM_MAKEFLAGS) in every invocation of $(MAKE).
- * subdirs.am: Likewise.
+ * subdirs.am: Likewise.
Thu Jul 16 18:09:03 1998 Ian Lance Taylor <address@hidden>
@@ -825,7 +825,7 @@ Sun Apr 5 13:58:24 1998 Tom Tromey <address@hidden>
* Released 1.3.
* automake.in (handle_options): Correctly handle trailing alpha
- version letter or lack thereof. Test version3.test.
+ version letter or lack thereof. Test version3.test.
* automake.in (am_conf_line_warning): Perl 4 fixlet; typo fix.
@@ -846,7 +846,7 @@ Fri Apr 3 15:43:46 1998 Doug Evans <address@hidden>
* automake.in (handle_configure): Fix setting of colon_infile
in case where multiple files are used to build Makefile.
[ Test colon5.test ]
-
+
Fri Apr 3 13:07:58 1998 Tom Tromey <address@hidden>
* ansi2knr.c, texinfo.tex: New versions from respective
@@ -1424,7 +1424,7 @@ Tue Aug 5 14:44:10 1997 Ian Lance Taylor
<address@hidden>
Mon Aug 4 14:52:08 1997 Ian Lance Taylor <address@hidden>
* automake.in ($RULE_PATTERN): Accept $ in body of rule name.
- (handle_programs): Don't append $(EXEEXT) if the
+ (handle_programs): Don't append $(EXEEXT) if the
program name contains '.'.
(am_install_var): When rewriting _PROGRAMS, don't append $(EXEEXT)
if the program names contains '.'. Also, handle conditionals.
@@ -1529,7 +1529,7 @@ Sat Feb 22 16:05:24 1997 Gordon Matzigkeit
<address@hidden>
need compile-kr.am. Delete it.
* automake.in (handle_yacc_lex_cxx, get_object_extension): Use
- _.c, _.o, _.lo instead of ._c, ._o, .l_o for de-ansification.
+ _.c, _.o, _.lo instead of ._c, ._o, .l_o for de-ansification.
* ansi2knr.c (main): Parse our arguments a little differently so
that we don't create null output files when we can't read the
@@ -2058,7 +2058,7 @@ Wed Feb 26 08:41:11 1997 Gordon Matzigkeit
<address@hidden>
to do to upgrade the support.
* automake.in, ltlib-clean.am, ltlib.am, ltlibrary.am: Revamped
- libtool support to use the _LTLIBRARIES primary.
+ libtool support to use the _LTLIBRARIES primary.
Wed Feb 26 00:20:39 1997 Tom Tromey <address@hidden>
diff --git a/THANKS b/THANKS
index fa1d4ac..3d1f75a 100644
--- a/THANKS
+++ b/THANKS
@@ -3,6 +3,7 @@ It would not be what it is today without the invaluable help of
these
people:
Adam J. Richter address@hidden
+Adam Sampson address@hidden
Adrian Bunk address@hidden
Akim Demaille address@hidden
Alan Modra address@hidden
@@ -196,6 +197,7 @@ Klaus Reichl address@hidden
Krzysztof Żelechowski address@hidden
L. Peter Deutsch address@hidden
Ladislav Strojil address@hidden
+Larry Daniel address@hidden
Larry Jones address@hidden
Lars Hecking address@hidden
Lars J. Aas address@hidden
diff --git a/contrib/README b/contrib/README
index bbef72f..a4d7eeb 100644
--- a/contrib/README
+++ b/contrib/README
@@ -14,7 +14,7 @@ There are several reasons for which a feature can be kept in
contrib:
core (as doing so too early would later force us to continue the
support for backward-compatibility, even if the features proves
flawed or fails to attract widespread use).
-
+
2. The APIs or overall design of the feature are still unstable, and
need on-field testing to iron warts and usability bugs, or uncover
potential flaws.
@@ -24,4 +24,3 @@ There are several reasons for which a feature can be kept in
contrib:
remove it from the Automake core, but cannot remove it altogether,
for the sake of those still-existing usage. So it gets moved in
contrib.
-
diff --git a/doc/automake.texi b/doc/automake.texi
index 0ef66da..6861725 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -8974,7 +8974,7 @@ The parallel (or concurrent) test harness is enabled by
the Automake option
scripts output in @file{.log} files, concurrent execution of tests with
@code{make -j}, specification of inter-test dependencies, lazy reruns of
tests that have not completed in a prior run, and hard errors for exceptional
-failures.
+failures.
This harness is still somewhat experimental and may undergo changes in
order to satisfy additional portability requirements.
@@ -12318,7 +12318,7 @@ user counterpart.
has neither @code{AM_} nor per-target cousin.
Finally you should not think that the existence of a per-target
-variable implies the existance of an @code{AM_} variable or of a user
+variable implies the existence of an @code{AM_} variable or of a user
variable. For instance, the @code{mumble_LDADD} per-target variable
overrides the makefile-wide @code{LDADD} variable (which is not a user
variable), and @code{mumble_LIBADD} exists only as a per-target
diff --git a/lib/am/check.am b/lib/am/check.am
index c6d9a18..8df0c6a 100644
--- a/lib/am/check.am
+++ b/lib/am/check.am
@@ -129,36 +129,6 @@ am__set_TESTS_bases = \
rm -f $< $@
$(MAKE) $<
-# Helper recipe used by $(TEST_SUITE_LOG) below, to avoid problems with
-# "make -n". Break this recipe in multiple shell invocations too, to
-# really work as expected with "make -n".
-am--redo-logs:
- @rm -f $$redo_logs
- @rm -f $$redo_results
-## The use of the `am__remaking_logs' environment variable below is
-## required to ensure that we don't go into an infinite recursion in
-## case a test log in $(TEST_LOGS) is the same as $(TEST_SUITE_LOG).
-## Yes, this has already happened in practice. Sigh!
- @if test -n "$$am__remaking_logs"; then \
- echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
- "recursion detected" >&2; \
- else \
- am__remaking_logs=yes $(MAKE) $$redo_logs; \
- fi;
-## Sanity check: each unreadable or non-existent test result file should
-## has been properly remade at this point, as should the corresponding log
-## file.
- @st=0; \
- errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
- for i in $$redo_bases; do \
- test -f $$i.trs && test -r $$i.trs \
- || { echo "$$errmsg $$i.trs"; st=1; }; \
- test -f $$i.log && test -r $$i.log \
- || { echo "$$errmsg $$i.log"; st=1; }; \
- done; \
- test $$st -eq 0
-.PHONY: am--redo-logs
-
$(TEST_SUITE_LOG): $(TEST_LOGS)
@$(am__set_TESTS_bases); \
## Helper shell function, tells whether a path refers to an existing,
@@ -178,12 +148,35 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
## tests in order to re-create them.
redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
-## The exported variables are needed by the helper hook.
- redo_bases="$$redo_bases" \
- redo_logs="$$redo_logs" \
- redo_results="$$redo_results" \
- $(MAKE) am--redo-logs || exit 1; \
- else :; fi;
+ if $(am__make_dryrun); then :; else \
+## Break "rm -f" into two calls to minimize the possibility of exceeding
+## command line length limits.
+ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
+ fi; \
+ fi; \
+## Use a trick to to ensure that we don't go into an infinite recursion
+## in case a test log in $(TEST_LOGS) is the same as $(TEST_SUITE_LOG).
+## Yes, this has already happened in practice. Sigh!
+ if test -n "$$am__remaking_logs"; then \
+ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
+ "recursion detected" >&2; \
+ else \
+ am__remaking_logs=yes $(MAKE) $$redo_logs; \
+ fi; \
+ if $(am__make_dryrun); then :; else \
+## Sanity check: each unreadable or non-existent test result file should
+## has been properly remade at this point, as should the corresponding log
+## file.
+ st=0; \
+ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
+ for i in $$redo_bases; do \
+ test -f $$i.trs && test -r $$i.trs \
+ || { echo "$$errmsg $$i.trs"; st=1; }; \
+ test -f $$i.log && test -r $$i.log \
+ || { echo "$$errmsg $$i.log"; st=1; }; \
+ done; \
+ test $$st -eq 0 || exit 1; \
+ fi
## We need a new subshell to work portably with "make -n", since the
## previous part of the recipe contained a $(MAKE) invocation.
@$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
@@ -335,7 +328,7 @@ check-TESTS recheck:
## we rely on .PHONY to work portably.
@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
@ws='[ ]'; \
- list=''; $(am__set_TESTS_bases); \
+ log_list='' trs_list=''; $(am__set_TESTS_bases); \
for i in $$bases; do \
## If running a "make recheck", we must only consider tests that had an
## unexpected outcome (FAIL or XPASS) in the earlier run. In particular,
@@ -353,21 +346,26 @@ check-TESTS recheck:
## definition can be problematic. In this particular case, trailing white
## space was known to cause a segmentation fault on Solaris 10 XPG4 make:
## <http://lists.gnu.org/archive/html/bug-automake/2010-08/msg00004.html>
- if test -z "$$list"; then list=$$i.log; else list="$$list $$i.log";
fi; \
+ if test -z "$$log_list"; then \
+ log_list="$$i.log"; \
+ else \
+ log_list="$$log_list $$i.log"; \
+ fi; \
+ if test -z "$$trs_list"; then \
+ trs_list="$$i.trs"; \
+ else \
+ trs_list="$$trs_list $$i.trs"; \
+ fi; \
done; \
## Under "make recheck", remove the .log and .trs files associated
## with the files to recheck, so that those will be rerun by the
## "make test-suite.log" recursive invocation below. But use a proper
## hack to avoid extra files removal when running under "make -n".
- if test $@ = recheck && test -n "$$list"; then \
- { \
- echo 'am--clean: am--clean-log am--clean-trs'; \
- echo 'am--clean-log: ; rm -f $$(am__logs)'; \
- echo 'am--clean-trs: ; rm -f $$(am__logs:.log=.trs)'; \
- } | $(MAKE) -f - am--clean am__logs="$$list" \
- || exit 1; \
+ if test $@ != recheck || $(am__make_dryrun); then :; else \
+ test -z "$$log_list" || rm -f $$log_list; \
+ test -z "$$trs_list" || rm -f $$trs_list; \
fi; \
- $(MAKE) $(TEST_SUITE_LOG) TEST_LOGS="$$list"
+ $(MAKE) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"
## Recheck must depend on $(check_SCRIPTS), $(check_PROGRAMS), etc.
recheck: %CHECK_DEPS%
diff --git a/lib/am/comp-vars.am b/lib/am/comp-vars.am
deleted file mode 100644
index e69de29..0000000
diff --git a/lib/am/distdir.am b/lib/am/distdir.am
index 2bcd238..503bb06 100644
--- a/lib/am/distdir.am
+++ b/lib/am/distdir.am
@@ -238,19 +238,13 @@ endif %?TOPDIR_P%
## at the top level do the right thing. If we're in the topmost
## directory, then we use `distdir' instead of `top_distdir'; this lets
## us work correctly with an enclosing package.
-##
-## Split the loop for the directory creation and the one for recursion,
-## so that with GNU make -n, only the latter is executed.
if %?SUBDIRS%
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
- test -d "$(distdir)/$$subdir" \
- || $(MKDIR_P) "$(distdir)/$$subdir" \
- || exit 1; \
- fi; \
- done
- @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
diff --git a/lib/am/header-vars.am b/lib/am/header-vars.am
index 425a6b2..1bfc5ae 100644
--- a/lib/am/header-vars.am
+++ b/lib/am/header-vars.am
@@ -30,6 +30,23 @@ am__vpath_rewrite = \
## a vendor make.
## DESTDIR =
+## Shell code that determines whether make is running in "dry mode"
+## ("make -n") or not. Useful in rules that invoke make recursively, and
+## are thus executed also with "make -n" -- because, say, their recipes
+## contain the "$(MAKE)" string or starts with the '+' modifier.
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ for am__flg in : $(MAKEFLAGS); do \
+ case $$am__flg in \
+ :) ;; \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done; \
+ test $$am__dry = yes; \
+ }
+
## Some derived variables that have been found to be useful.
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
diff --git a/lib/am/lisp.am b/lib/am/lisp.am
index cefb87b..9df9e23 100644
--- a/lib/am/lisp.am
+++ b/lib/am/lisp.am
@@ -52,12 +52,7 @@ $(am__ELCFILES): elc-stamp
##
## If `make -n' is called, do not execute any command in the recipe that
## changes the tree; however, invoke the recursive make for debuggability.
- @dry=; for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=*|--*);; \
- *n*) dry=:;; \
- esac; \
- done; \
+ @if $(am__make_dryrun); then dry=:; else dry=; fi; \
if test "$(EMACS)" != no && test ! -f $@; then \
## If `make -j' is used and more than one file has been erased, several
## processes can execute this block. We have to make sure that only
diff --git a/lib/depcomp b/lib/depcomp
index ff4e08f..2c30282 100755
--- a/lib/depcomp
+++ b/lib/depcomp
@@ -1,10 +1,10 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
-scriptversion=2011-12-04.11; # UTC
+scriptversion=2012-02-03.15; # UTC
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010,
-# 2011 Free Software Foundation, Inc.
+# 2011, 2012 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -57,6 +57,12 @@ EOF
;;
esac
+# A tabulation character.
+tab=' '
+# A newline character.
+nl='
+'
+
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
@@ -162,8 +168,7 @@ gcc)
## typically no way to rebuild the header). We avoid this by adding
## dummy dependencies for each header file. Too bad gcc doesn't do
## this for us directly.
- tr ' ' '
-' < "$tmpdepfile" |
+ tr ' ' "$nl" < "$tmpdepfile" |
## Some versions of gcc put a space before the ':'. On the theory
## that the space means something, we add a space to the output as
## well. hp depmode also adds that space, but also prefixes the VPATH
@@ -205,16 +210,13 @@ sgi)
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
# the IRIX cc adds comments like '#:fec' to the end of the
# dependency line.
- tr ' ' '
-' < "$tmpdepfile" \
+ tr ' ' "$nl" < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
- tr '
-' ' ' >> "$depfile"
+ tr "$nl" ' ' >> "$depfile"
echo >> "$depfile"
# The second pass generates a dummy entry for each header file.
- tr ' ' '
-' < "$tmpdepfile" \
+ tr ' ' "$nl" < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
>> "$depfile"
else
@@ -263,8 +265,7 @@ aix)
# Do two passes, one to just change these to
# '$object: dependent.h' and one to simply 'dependent.h:'.
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
- # That's a tab and a space in the [].
- sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+ sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >>
"$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
@@ -407,8 +408,7 @@ tru64)
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
- # That's a tab and a space in the [].
- sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+ sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >>
"$depfile"
else
echo "#dummy" > "$depfile"
fi
@@ -443,11 +443,11 @@ msvc7)
p
}' | $cygpath_u | sort -u | sed -n '
s/ /\\ /g
-s/\(.*\)/ \1 \\/p
+s/\(.*\)/'"$tab"'\1 \\/p
s/.\(.*\) \\/\1:/
H
$ {
- s/.*/ /
+ s/.*/'"$tab"'/
G
p
}' >> "$depfile"
@@ -502,11 +502,10 @@ dashmstdout)
# in the target name. This is to cope with DOS-style filenames:
# a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
"$@" $dashmflag |
- sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
+ sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :'
> "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
- tr ' ' '
-' < "$tmpdepfile" | \
+ tr ' ' "$nl" < "$tmpdepfile" | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
@@ -562,8 +561,7 @@ makedepend)
# makedepend may prepend the VPATH from the source file name to the object.
# No need to regex-escape $object, excess matching of '.' is harmless.
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
- sed '1,2d' "$tmpdepfile" | tr ' ' '
-' | \
+ sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
@@ -652,8 +650,8 @@ msvisualcpp)
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u >
"$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
- sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >>
"$depfile"
- echo " " >> "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >>
"$depfile"
+ echo "$tab" >> "$depfile"
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
diff --git a/lib/tap-driver.pl b/lib/tap-driver.pl
index b6566ad..ecc2c0c 100755
--- a/lib/tap-driver.pl
+++ b/lib/tap-driver.pl
@@ -1,5 +1,5 @@
#! /usr/bin/env perl
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# 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
@@ -32,7 +32,7 @@ use strict;
use Getopt::Long ();
use TAP::Parser;
-my $VERSION = '2011-09-07.15'; # UTC
+my $VERSION = '2012-02-01.19'; # UTC
my $ME = "tap-driver.pl";
@@ -122,6 +122,7 @@ sub colored ($$);
sub copy_in_global_log ();
sub decorate_result ($);
sub extract_tap_comment ($);
+sub finish ();
sub get_global_test_result ();
sub get_test_exit_message ();
sub get_test_results ();
@@ -132,7 +133,8 @@ sub is_null_string ($);
sub main (@);
sub must_recheck ();
sub report ($;$);
-sub start (@);
+sub setup_io ();
+sub setup_parser (@);
sub stringify_result_obj ($);
sub testsuite_error ($);
sub trap_perl_warnings_and_errors ();
@@ -244,7 +246,7 @@ sub trap_perl_warnings_and_errors ()
}
}
-sub start (@)
+sub setup_io ()
{
# Redirect stderr and stdout to a temporary log file. Save the
# original stdout stream, since we need it to print testsuite
@@ -257,14 +259,27 @@ sub start (@)
trap_perl_warnings_and_errors;
open STDOUT, ">&LOG" or die "$ME: redirecting stdout: $!\n";
open STDERR, ">&LOG" or die "$ME: redirecting stderr: $!\n";
- $parser = TAP::Parser->new ({ exec => address@hidden, merge => $cfg{merge}
});
+}
+
+sub setup_parser (@)
+{
+ local $@ = '';
+ eval { $parser = TAP::Parser->new ({exec => address@hidden, merge =>
$cfg{merge}}) };
+ if ($@ ne '')
+ {
+ # Don't use the error message in $@ as set by TAP::Parser, since
+ # currently it's both too generic (at the point of being basically
+ # useless) and quite long.
+ report "ERROR", "- couldn't execute test script";
+ finish;
+ }
}
sub get_test_exit_message ()
{
my $wstatus = $parser->wait;
# Watch out for possible internal errors.
- die "$ME: couldn't get the exit ststus of the TAP producer"
+ die "$ME: couldn't get the exit status of the TAP producer"
unless defined $wstatus;
# Return an undefined value if the producer exited with success.
return unless $wstatus;
@@ -272,17 +287,17 @@ sub get_test_exit_message ()
# by a signal.
use POSIX qw (WIFEXITED WEXITSTATUS WIFSIGNALED WTERMSIG);
if (WIFEXITED ($wstatus))
- {
- return sprintf "exited with status %d", WEXITSTATUS ($wstatus);
- }
+ {
+ return sprintf "exited with status %d", WEXITSTATUS ($wstatus);
+ }
elsif (WIFSIGNALED ($wstatus))
- {
+ {
return sprintf "terminated by signal %d", WTERMSIG ($wstatus);
- }
+ }
else
- {
- return "terminated abnormally";
- }
+ {
+ return "terminated abnormally";
+ }
}
sub stringify_result_obj ($)
@@ -379,7 +394,7 @@ sub handle_tap_result ($)
my $test_result = stringify_result_obj $result_obj;
my $string = $result_obj->number;
-
+
my $description = $result_obj->description;
$string .= " $description"
unless is_null_string $description;
@@ -460,9 +475,17 @@ sub extract_tap_comment ($)
return "";
}
+sub finish ()
+{
+ write_test_results;
+ close LOG or die "$ME: closing $log_file: $!\n";
+ exit 0;
+}
+
sub main (@)
{
- start @_;
+ setup_io;
+ setup_parser @_;
while (defined (my $cur = $parser->next))
{
@@ -510,9 +533,7 @@ sub main (@)
testsuite_error $msg if $msg;
}
}
- write_test_results;
- close LOG or die "$ME: closing $log_file: $!\n";
- exit 0;
+ finish;
}
# ----------- #
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 65c1089..becef59 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -30,7 +30,7 @@ TAP_LOG_DRIVER = AM_TAP_AWK='$(AWK)' $(SHELL)
$(top_srcdir)/lib/tap-driver.sh
AM_TAP_LOG_DRIVER_FLAGS = --merge
-EXTRA_DIST = ChangeLog-old
+EXTRA_DIST = is ChangeLog-old
TESTS = ## Will be updated later.
diff --git a/tests/acloca16.test b/tests/acloca16.test
index 3300856..1d897ed 100755
--- a/tests/acloca16.test
+++ b/tests/acloca16.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2004, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2011, 2012 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -32,4 +32,5 @@ EOF
$ACLOCAL -I m4
grep m4/some.m4 aclocal.m4 && Exit 1
+
:
diff --git a/tests/aclocal5.test b/tests/aclocal5.test
index ab06607..430b364 100755
--- a/tests/aclocal5.test
+++ b/tests/aclocal5.test
@@ -46,6 +46,7 @@ $MAKE
# updated, even from a sub-directory. Check that AU_ALIAS is
# recognized. Change the definition of AM_TEST to check that its new
# definition is used.
+$sleep # Modified configure dependencies must be newer than config.status.
echo 'AU_ALIAS([AM_TEST], [AC_SUBST])' > m4/moredefs.m4
cd sub
$MAKE
@@ -59,6 +60,7 @@ test -f $me-1.0/m4/moredefs.m4
# Change the definition of AM_TEST to check that its new definition is
# used. Check that AC_DEFUN_ONCE is caught.
+$sleep # Modified configure dependencies must be newer than config.status.
echo 'AC_DEFUN_ONCE([AM_TEST], [AC_SUBST(__$1__)])' > m4/moredefs.m4
$MAKE
grep 'm4/moredefs\.m4' aclocal.m4
diff --git a/tests/add-missing.tap b/tests/add-missing.tap
index 4f5d682..49dc8bb 100755
--- a/tests/add-missing.tap
+++ b/tests/add-missing.tap
@@ -166,7 +166,7 @@ check_ ()
# not told to install them, it should complain and error out,
# and also give a useful suggestion.
AUTOMAKE_fails -d "$pfx missing files, automake fails"
- for f in $files; do
+ for f in $files; do
command_ok_ \
"$pfx warn about missing file $f" \
grep "required file ['\`]$build_aux/$f' not found" stderr
@@ -189,7 +189,7 @@ check_ ()
test -f $build_aux/$f
done
# Automake should inform about which files it's installing.
- for f in $files; do
+ for f in $files; do
command_ok_ \
"$pfx report installation of $f" \
grep ": installing ['\`]$build_aux/$f'$" stderr
diff --git a/tests/ar-lib5b.test b/tests/ar-lib5b.test
index 09742ca..f697e3c 100755
--- a/tests/ar-lib5b.test
+++ b/tests/ar-lib5b.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# 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
@@ -66,7 +66,7 @@ case " $* " in
# configure tests.
*' -OUT:'*) exit 0;;
# This means that $* looks like a command-line for `ar'. We have to
- # exit with failure here, to accomodate the two following ortoghonal
+ # exit with failure here, to accommodate the two following ortoghonal
# scenarios:
# 1. when `lib' is tested by configure, this will tell that it does
# not use the ar(1) interface, so that the `ar-lib' script will
diff --git a/tests/block.test b/tests/block.test
index 0eda190..f645c09 100755
--- a/tests/block.test
+++ b/tests/block.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2010, 2011 Free Software Foundation,
-# Inc.
+# Copyright (C) 1996, 2001, 2002, 2010, 2011, 2012 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Make sure block comments are not double-spaced.
-# Report from François Pinard.
+# Report from François Pinard.
. ./defs || Exit 1
diff --git a/tests/bsource.test b/tests/bsource.test
index 38f8a43..d50c1d5 100755
--- a/tests/bsource.test
+++ b/tests/bsource.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2003, 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
@@ -28,4 +28,5 @@ END
$ACLOCAL
$AUTOMAKE
grep 'install-recursive' Makefile.in && Exit 1
+
:
diff --git a/tests/check-no-test-driver.test b/tests/check-no-test-driver.test
index 9406917..19ba34c 100755
--- a/tests/check-no-test-driver.test
+++ b/tests/check-no-test-driver.test
@@ -29,6 +29,7 @@ for opts in '' '-a' '--add-missing --copy'; do
$AUTOMAKE $opts
$FGREP 'test-driver' Makefile.in && Exit 1
find . | $FGREP 'test-driver' && Exit 1
+ : For shells with busted 'set -e'.
done
:
diff --git a/tests/check12.test b/tests/check12.test
index be4d84e..88235f8 100755
--- a/tests/check12.test
+++ b/tests/check12.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011, 2012 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -100,7 +100,7 @@ END
cat >> Makefile.am <<'END'
check-local:
case $$CHECKLOCAL_EXIT_STATUS in \
- 0) echo 'check-local succeded :-)';; \
+ 0) echo 'check-local succeeded :-)';; \
*) echo 'check-local failed :-(';; \
esac >local.log
exit $$CHECKLOCAL_EXIT_STATUS
@@ -143,7 +143,7 @@ for vpath in : false; do
else
:
fi
- grep 'check-local succeded :-)' local.log
+ grep 'check-local succeeded :-)' local.log
cp -f config.status config-status.sav
@@ -202,6 +202,7 @@ for vpath in : false; do
grep '^FAIL: b$' test-suite.log
grep '^b\.test: exit status: 23$' test-suite.log
grep '^a\.test' test-suite.log && Exit 1
+ : For shells with busted 'set -e'.
else :; fi
grep 'check-local failed :-(' local.log
diff --git a/tests/check8.test b/tests/check8.test
index 97ed250..5476f36 100755
--- a/tests/check8.test
+++ b/tests/check8.test
@@ -65,8 +65,8 @@ $AUTOCONF
$AUTOMAKE -a
./configure
-$MAKE check AM_COLOR_TESTS=always >stdout 2>stderr &&
- { cat stdout; cat stderr >&2; Exit 1; }
+AM_COLOR_TESTS=always $MAKE check >stdout 2>stderr \
+ && { cat stdout; cat stderr >&2; Exit 1; }
cat stdout
cat stderr >&2
grep 'XPASS.* foo$' stdout
diff --git a/tests/colneq2.test b/tests/colneq2.test
index 8f408eb..fe117c9 100755
--- a/tests/colneq2.test
+++ b/tests/colneq2.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2010, 2011 Free Software Foundation,
-# Inc.
+# Copyright (C) 1996, 2001, 2002, 2010, 2011, 2012 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@ t = a b c
EXTRA_DIST = $(t:=.test)
.PHONY: test
test:
- test x'$(EXTRA_DIST)' = x'a.test b.test c.test'
+ is $(EXTRA_DIST) == a.test b.test c.test
END
$ACLOCAL
diff --git a/tests/commen11.test b/tests/commen11.test
index b092d39..f355cc3 100755
--- a/tests/commen11.test
+++ b/tests/commen11.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2005, 2009, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2009, 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
@@ -35,6 +35,7 @@ mkdir foo
$ACLOCAL
AUTOMAKE_fails
-grep 3.*backslash stderr
-grep 7.*backslash stderr
+grep '^Makefile\.am:3:.*backslash' stderr
+grep '^Makefile\.am:7:.*backslash' stderr
+
:
diff --git a/tests/comment7.test b/tests/comment7.test
index 7d869de..26854a1 100755
--- a/tests/comment7.test
+++ b/tests/comment7.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2006, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2006, 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
@@ -42,12 +42,12 @@ test `grep '@address@hidden' Makefile.in | wc -l` = 1
# Make sure the right definition follows each comment.
sed -n '/^#.*VAR.*COND_TRUE/ {
- n
- p
- }' Makefile.in |
+ n
+ p
+ }' Makefile.in |
grep '@address@hidden = foo'
sed -n '/^#.*VAR.*COND_FALSE/ {
- n
- p
- }' Makefile.in |
+ n
+ p
+ }' Makefile.in |
grep '@address@hidden = bar'
diff --git a/tests/comment8.test b/tests/comment8.test
index a9d6eaa..b2b12fe 100755
--- a/tests/comment8.test
+++ b/tests/comment8.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2004, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2011, 2012 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -36,8 +36,9 @@ if COND2
VAR += val2 # com2
endif COND2
+.PHONY: test
test:
- test "`echo $(VAR)`" = 'valA valB val1 valC val2'
+ is $(VAR) == valA valB val1 valC val2
EOF
$ACLOCAL
diff --git a/tests/compile_f90_c_cxx.test b/tests/compile_f90_c_cxx.test
index ec593ca..b38f67d 100755
--- a/tests/compile_f90_c_cxx.test
+++ b/tests/compile_f90_c_cxx.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1998, 1999, 2001, 2002, 2010, 2011 Free Software
+# Copyright (C) 1998, 1999, 2001, 2002, 2010, 2011, 2012 Free Software
# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
@@ -35,10 +35,10 @@ END
$ACLOCAL
$AUTOMAKE
-# Look for the macros at the beginning of rules. Be careful, as there
-# are literal tabs at the beginning of the search strings.
-$FGREP ' $(COMPILE)' Makefile.in
-$FGREP ' $(CXXCOMPILE)' Makefile.in
-$FGREP ' $(FCCOMPILE)' Makefile.in
+# Look for the macros at the beginning of rules.
+tab=
+$FGREP "$tab\$(COMPILE)" Makefile.in
+$FGREP "$tab\$(CXXCOMPILE)" Makefile.in
+$FGREP "$tab\$(FCCOMPILE)" Makefile.in
:
diff --git a/tests/compile_f_c_cxx.test b/tests/compile_f_c_cxx.test
index e3b51a4..aaa5abd 100755
--- a/tests/compile_f_c_cxx.test
+++ b/tests/compile_f_c_cxx.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1998, 1999, 2001, 2002, 2010, 2011 Free Software
+# Copyright (C) 1998, 1999, 2001, 2002, 2010, 2011, 2012 Free Software
# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
@@ -39,10 +39,9 @@ END
$ACLOCAL
$AUTOMAKE
-# Look for the macros at the beginning of rules. Be careful, as there
-# are literal tabs at the beginning of the search strings.
-$FGREP ' $(COMPILE)' Makefile.in
-$FGREP ' $(CXXCOMPILE)' Makefile.in
-$FGREP ' $(F77COMPILE)' Makefile.in
+# Look for the macros at the beginning of rules.
+$FGREP "$tab\$(COMPILE)" Makefile.in
+$FGREP "$tab\$(CXXCOMPILE)" Makefile.in
+$FGREP "$tab\$(F77COMPILE)" Makefile.in
:
diff --git a/tests/cond-basic.test b/tests/cond-basic.test
index 2866aa6..5a64000 100755
--- a/tests/cond-basic.test
+++ b/tests/cond-basic.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010, 2011, 2012 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -36,7 +37,7 @@ $ACLOCAL
$AUTOMAKE
grep 'address@hidden@target: true' Makefile.in
-grep 'address@hidden@ action' Makefile.in
+grep "address@hidden@${tab}action" Makefile.in
grep 'address@hidden@target: false' Makefile.in
:
diff --git a/tests/cond11.test b/tests/cond11.test
index 89ab482..90cbde3 100755
--- a/tests/cond11.test
+++ b/tests/cond11.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2003, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 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
@@ -40,9 +41,9 @@ LDADD = $(SUBSTVAR) $(foolibs)
.PHONY: test1 test2
test1:
- test faz.la = $(foo_DEPENDENCIES)
+ is faz.la == $(foo_DEPENDENCIES)
test2:
- test -z "`echo $(foo_DEPENDENCIES)`"
+ is "" == $(foo_DEPENDENCIES)
END
: > config.guess
diff --git a/tests/cond16.test b/tests/cond16.test
index 4efcbbd..7c4a264 100755
--- a/tests/cond16.test
+++ b/tests/cond16.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 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
@@ -43,7 +43,7 @@ hell_SOURCES = $(var:=)
.PHONY: test
test:
- test "`echo $(hell_SOURCES) $(hell_OBJECTS)`" = "foo.c foo.o"
+ is $(hell_SOURCES) $(hell_OBJECTS) == foo.c foo.o
END
$ACLOCAL
diff --git a/tests/cond18.test b/tests/cond18.test
index 366dfd0..fa04d56 100755
--- a/tests/cond18.test
+++ b/tests/cond18.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 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
@@ -48,8 +48,8 @@ helldl_SOURCES = $(var3)
.PHONY: test
test:
- test x"`echo $(helldl_SOURCES) $(helldl_OBJECTS)`" = \
- x"dlmain.c foo.c dlmain.obj foo.obj"
+ is $(helldl_SOURCES) $(helldl_OBJECTS) == \
+ dlmain.c foo.c dlmain.obj foo.obj
bin_PROGRAMS = helldl
END
diff --git a/tests/cond19.test b/tests/cond19.test
index a73ce32..17ead91 100755
--- a/tests/cond19.test
+++ b/tests/cond19.test
@@ -48,11 +48,9 @@ endif
helldl_SOURCES = $(var3:.c=1.c) $(var4:.c=2.c)
-got = `echo $(helldl_SOURCES) $(helldl_OBJECTS)`
-
.PHONY: test
test:
- test x"$(exp)" = x"$(got)"
+ is $(exp) == $(helldl_SOURCES) $(helldl_OBJECTS)
END
$ACLOCAL
@@ -60,12 +58,12 @@ $AUTOCONF
$AUTOMAKE -a -i
CONDITION1=true CONDITION2=true ./configure
-$MAKE exp='dlmaina1.c dlmainb2.c dlmaina1.o dlmainb2.o' test
+$MAKE test exp='dlmaina1.c dlmainb2.c dlmaina1.o dlmainb2.o'
CONDITION1=true CONDITION2=false ./configure
-$MAKE exp='dlmainb1.c dlmaina2.c dlmainb1.o dlmaina2.o' test
+$MAKE test exp='dlmainb1.c dlmaina2.c dlmainb1.o dlmaina2.o'
CONDITION1=false CONDITION2=true ./configure
-$MAKE exp='dlmaina1.c dlmainb2.c dlmaina1.o dlmainb2.o' test
+$MAKE test exp='dlmaina1.c dlmainb2.c dlmaina1.o dlmainb2.o'
CONDITION1=false CONDITION2=false ./configure
-$MAKE exp='dlmainb1.c dlmaina2.c dlmainb1.o dlmaina2.o' test
+$MAKE test exp='dlmainb1.c dlmaina2.c dlmainb1.o dlmaina2.o'
:
diff --git a/tests/cond22.test b/tests/cond22.test
index 72120eb..cc46745 100755
--- a/tests/cond22.test
+++ b/tests/cond22.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2011, 2012 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -57,7 +57,7 @@ targ_SOURCES = $(SONE) $(STWO) $(STHREE) $(STHREE2)
.PHONY: test
test:
- test "`echo $(targ_OBJECTS)`" = "one.oo two.oo three.oo three2.oo"
+ is $(targ_OBJECTS) == one.oo two.oo three.oo three2.oo
END
$ACLOCAL
diff --git a/tests/cond31.test b/tests/cond31.test
index b94820e..69b8fc1 100755
--- a/tests/cond31.test
+++ b/tests/cond31.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2003, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2003, 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
@@ -38,9 +38,9 @@ endif
.PHONY: test1 test2
test1:
- test "`echo $(a_DEPENDENCIES)`" = "c0.o c1.o"
+ is $(a_DEPENDENCIES) == c0.o c1.o
test2:
- test "`echo $(a_DEPENDENCIES)`" = "c0.o c2.o c3.la"
+ is $(a_DEPENDENCIES) == c0.o c2.o c3.la
EOF
$ACLOCAL
diff --git a/tests/cond32.test b/tests/cond32.test
index b1faba2..738903a 100755
--- a/tests/cond32.test
+++ b/tests/cond32.test
@@ -50,9 +50,8 @@ endif
a_LDADD = $(BAR)
endif
-got = `echo $(a_DEPENDENCIES)`
test:
- test "$(exp)" = "$(got)"
+ is $(exp) == $(a_DEPENDENCIES)
.PHONY: test
EOF
@@ -61,7 +60,7 @@ $AUTOCONF
$AUTOMAKE
./configure
-$MAKE test exp='foo.o nonsense.a'
+$MAKE test exp='foo.o nonsense.a'
./configure two=yes three=
$MAKE test exp='bar.o'
diff --git a/tests/cond38.test b/tests/cond38.test
index 8638dae..bc313b8 100755
--- a/tests/cond38.test
+++ b/tests/cond38.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2005, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2005, 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
@@ -49,7 +49,7 @@ endif
.PHONY: test
test:
- test "`echo $(SUBDIRS)`" = 'a b c d e f g h iXYZ jZYX'
+ is $(SUBDIRS) == a b c d e f g h iXYZ jZYX
EOF
mkdir a b c d e f g h iXYZ jZYX
diff --git a/tests/cond4.test b/tests/cond4.test
index 57a4042..40dfa2f 100755
--- a/tests/cond4.test
+++ b/tests/cond4.test
@@ -40,11 +40,9 @@ endif
targ_SOURCES = main.c $(OPT1) $(OPT2)
-got = `echo $(targ_OBJECTS)`
-
.PHONY: test
test:
- test x"$(exp)" = x"$(got)"
+ is $(exp) == $(targ_OBJECTS)
END
$ACLOCAL
diff --git a/tests/cond43.test b/tests/cond43.test
index aafb46b..6a30511 100755
--- a/tests/cond43.test
+++ b/tests/cond43.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2008, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2008, 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
@@ -22,7 +22,7 @@ cat >>configure.in <<'END'
AM_CONDITIONAL([COND1], [:])
AM_CONDITIONAL([COND2], [:])
AM_COND_IF([COND1],
- AM_COND_IF([COND2], [:])
+ AM_COND_IF([COND2], [:])
)
AC_OUTPUT
END
@@ -34,8 +34,8 @@ AUTOMAKE_fails
$EGREP '^configure\.in:7:.* missing m4 quoting.*macro depth 2( |$)' stderr
sed '/.AM_COND_IF/{
- s/^/[/
- s/$/]/
+ s/^/[/
+ s/$/]/
}' < configure.in > configure.int
mv -f configure.int configure.in
rm -rf autom4te*.cache
diff --git a/tests/cond6.test b/tests/cond6.test
index 60436ab..3080320 100755
--- a/tests/cond6.test
+++ b/tests/cond6.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002, 2010, 2011 Free Software Foundation,
-# Inc.
+# Copyright (C) 1998, 2001, 2002, 2010, 2011, 2012 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -39,9 +39,9 @@ endif
a b c d e f g h:
touch $@
-.PHONY: print-data
-print-data:
- echo BEG: $(help_DATA) :END
+.PHONY: test
+test:
+ is $(help_DATA) == a b c d e f g h
END
@@ -54,17 +54,16 @@ $AUTOMAKE
rm -rf autom4te*.cache
echo AC_OUTPUT >> configure.in
+touch aclocal.m4 # Avoid unnecessary firing the remake rules.
$AUTOCONF
$AUTOMAKE Makefile
./configure --prefix="`pwd`/_inst"
-$MAKE print-data >stdout || { cat stdout; Exit 1; }
-cat stdout
-grep '^BEG: a b c d e f g h :END$' stdout
+$MAKE test
$MAKE install
-for x in a b c d e f g h; do
+for x in a b c d e f g h; do
test -f _inst/Help/$x
done
diff --git a/tests/conffile-leading-dot.test b/tests/conffile-leading-dot.test
index d1306be..ff582db 100755
--- a/tests/conffile-leading-dot.test
+++ b/tests/conffile-leading-dot.test
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat > configure.in << END
AC_INIT([$me], [1.0])
AM_INIT_AUTOMAKE
diff --git a/tests/cygnus-no-dist.test b/tests/cygnus-no-dist.test
index acb5ec6..47beef6 100755
--- a/tests/cygnus-no-dist.test
+++ b/tests/cygnus-no-dist.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011, 2012 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -51,7 +51,7 @@ mkdir sub1 sub2
: > sub1/Makefile.am
cat > sub2/Makefile.am <<'END'
# The `-Wall' after `cygnus' should ensure no warning gets
-# unintentionally disabled. We are particularily interested
+# unintentionally disabled. We are particularly interested
# in override warnings, for when (below) we add the `distdir'
# target.
AUTOMAKE_OPTIONS = cygnus -Wall
diff --git a/tests/defs b/tests/defs
index 7d285a2..9b54045 100644
--- a/tests/defs
+++ b/tests/defs
@@ -663,6 +663,10 @@ do
cscope --version </dev/null \
|| skip_all_ "required program \`cscope' not available"
;;
+ cygpath)
+ echo "$me: running cygpath --version"
+ cygpath --version || skip_all_ "cygpath not available"
+ ;;
etags)
# Exuberant Ctags will create a TAGS file even
# when asked for --help or --version. (Emacs's etags
@@ -772,6 +776,14 @@ do
|| skip_all_ "cannot find a makeinfo program that groks the" \
"\`--html' option"
;;
+ mingw)
+ uname_s=`uname -s || echo UNKNOWN`
+ echo "$me: system name: $uname_s"
+ case $uname_s in
+ MINGW*) ;;
+ *) skip_all_ "this test requires MSYS in MinGW mode" ;;
+ esac
+ ;;
non-root)
# Skip this test case if the user is root.
# We try to append to a read-only file to detect this.
@@ -794,7 +806,12 @@ do
fi
;;
native)
- cross_compiling && skip_all_ "doesn't work in cross-compile mode"
+ # Don't use "&&" here, to avoid a bug of 'set -e' present in
+ # some (even relatively recent) versions of the BSD shell.
+ # We add the dummy "else" branch for extra safety.
+ if cross_compiling; then
+ skip_all_ "doesn't work in cross-compile mode"
+ else :; fi
;;
python)
# Python doesn't support --version, it has -V
@@ -817,17 +834,6 @@ do
fi
unset ro_dir_temp create_status
;;
- rst2html)
- # Try the variants that are tried in check.am.
- while :; do
- for r2h in $RST2HTML rst2html rst2html.py; do
- echo "$me: running $r2h --version"
- $r2h --version && break 2
- done
- skip_all_ "no proper rst2html program found"
- done
- unset r2h
- ;;
runtest)
# DejaGnu's runtest program. We rely on being able to specify
# the program on the runtest command-line. This requires
diff --git a/tests/defs-static.in b/tests/defs-static.in
index b79e399..79484a9 100644
--- a/tests/defs-static.in
+++ b/tests/defs-static.in
@@ -144,7 +144,7 @@ SHELL=${AM_TESTSUITE_SHELL-'@SHELL@'}; export SHELL
# User can override various tools used. Prefer overriding specific for
# that automake testsuite, if they are available.
-PERL=${AM_TESTUITE_PERL-${PERL-'@PERL@'}}
+PERL=${AM_TESTSUITE_PERL-${PERL-'@PERL@'}}
MAKE=${AM_TESTSUITE_MAKE-${MAKE-'make'}}
AUTOCONF=${AM_TESTSUITE_AUTOCONF-${AUTOCONF-'@am_AUTOCONF@'}}
AUTOM4TE=${AM_TESTSUITE_AUTOM4TE-${AUTOM4TE-'@am_AUTOM4TE@'}}
diff --git a/tests/depcomp.sh b/tests/depcomp.sh
new file mode 100755
index 0000000..67db770
--- /dev/null
+++ b/tests/depcomp.sh
@@ -0,0 +1,390 @@
+#! /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/>.
+
+# Check dependency tracking in various flavours.
+# Contains both libtool and non-libtool case.
+# Sourced by the various (autogenerated) 'depcomp*.tap' tests.
+# Examples of reported failures that motivated those test are
+# listed below.
+
+# -------------------------------------------------------------------------
+
+# <http://lists.gnu.org/archive/html/automake-patches/2011-04/msg00028.html>
+#
+# Here's the bug: makedepend will prefix VPATH to the object file name,
+# thus the second make will invoke depcomp with object='../../src/foo.o',
+# causing errors such as:
+#
+# touch: cannot touch `../../src/.deps/foo.TPo': No such file or directory
+# makedepend: error: cannot open "../../src/.deps/foo.TPo"
+# ../../depcomp: line 560: ../../src/.deps/foo.TPo: No such file or directory
+
+# -------------------------------------------------------------------------
+
+# <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8473>
+# <http://lists.gnu.org/archive/html/automake-patches/2011-04/msg00079.html>
+#
+# Here's the bug: hp depmode will prefix VPATH to the object file name,
+# thus the second gmake will invoke depcomp with object='../../src/foo.o',
+# causing errors such as (broken on multiple lines for clarity):
+#
+# cpp: "", line 0: error 4066: Cannot create
+# "../../gllib/.deps/nonblocking.TPo" file for
+# "-M../../gllib/.deps/nonblocking.TPo" option.
+# (No such file or directory[errno=2])
+#
+
+# -------------------------------------------------------------------------
+
+# <http://lists.gnu.org/archive/html/automake-patches/2011-04/msg00140.html>
+# <http://lists.gnu.org/archive/html/automake-patches/2011-05/msg00019.html>
+#
+# A partial failure of an earlier version of this test; some bad
+# post-processing of the `*.Po' files led to the following broken
+# contents of `src/sub/.deps/subfoo.Po':
+#
+# > sub/subfoo.o: ../../depmod-data.dir/src/sub/subfoo.c \
+# > ../../depmod-data.dir/src/foo.h
+# > ../../depmod-data.dir/src/sub/subfoo.c \:
+# > ../../depmod-data.dir/src/foo.h:
+#
+# which caused make to die with an error like:
+#
+# "sub/.deps/subfoo.Po:3: *** missing separator. Stop."
+
+# -------------------------------------------------------------------------
+
+am_create_testdir=empty
+. ./defs || Exit 1
+
+ocwd=`pwd` || fatal_ "cannot get current working directory"
+longpath=this-is/a-path/which-has/quite-a/definitely/truly/long_long_name
+cachevar=am_cv_CC_dependencies_compiler_type
+
+srctree=depmod-1.0
+mkdir $srctree
+cd $srctree
+
+cd_top ()
+{
+ cd "$ocwd" || fatal_ "cannot chdir back to top directory"
+}
+
+delete ()
+{
+ test -f "$1" || fatal_ "$1: file does not exist"
+ rm -f "$1" || fatal_ "$1: couldn't remove"
+}
+
+edit ()
+{
+ file=$1; shift
+ sed "$@" <"$file" > t && mv -f t "$file" \
+ || fatal_ "$file: editing of file failed"
+}
+
+rewrite ()
+{
+ file=$1; shift
+ "$@" > "$file" || fatal_ "$file: couldn't rewrite"
+}
+
+setup_srcdir ()
+{
+ srcdir=$1 # This is intended to be global.
+ mkdir -p "$srcdir" \
+ || fatal_ "couldn't create source directory '$srcdir'"
+ cp -pR "$ocwd/$srctree"/* "$srcdir"/ \
+ || fatal_ "couldn't populate source directory '$srcdir'"
+}
+
+
+check_no_depfiles ()
+{
+ find . -name '*.Plo' -o -name '*.Po' | grep . && return 1
+ return 0
+}
+
+check_distclean ()
+{
+ # "make distcleancheck" can only run from a VPATH build.
+ if test $vpath = no; then
+ make_ok distclean && check_no_depfiles
+ else
+ $MAKE distcleancheck
+ fi
+}
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AC_CONFIG_AUX_DIR([build-aux])
+AM_INIT_AUTOMAKE
+AC_PROG_CC
+AM_PROG_CC_C_O
+AM_PROG_AR
+`if test $depcomp_with_libtool = yes; then
+ echo AC_PROG_LIBTOOL
+else
+ echo AC_PROG_RANLIB
+fi`
+AC_CONFIG_FILES([Makefile src/Makefile])
+AC_OUTPUT
+END
+
+mkdir build-aux sub src src/sub2
+
+case $depcomp_with_libtool in
+ yes)
+ plan_ 84
+ po=Plo objext=lo a=la
+ normalized_target=libfoo_la
+ LIBPRIMARY=LTLIBRARIES LINKADD=LIBADD
+ echo lib_LTLIBRARIES = libfoo.la >> Makefile.am
+ make_ok ()
+ {
+ $MAKE ${1+"$@"} >output 2>&1 || { cat output; return 1; }
+ cat output
+ $FGREP 'unknown directive' output && return 1
+ rm -f output
+ # Checks for stray files possibly left around by less common
+ # depmodes.
+ find . -name '*.[ud]' | grep . && return 1
+ return 0
+ }
+ ;;
+ no)
+ plan_ 28
+ po=Po objext='$(OBJEXT)' a=a
+ normalized_target=foo
+ LIBPRIMARY=LIBRARIES LINKADD=LDADD
+ echo bin_PROGRAMS = foo >> Makefile.am
+ make_ok ()
+ {
+ $MAKE ${1+"$@"}
+ }
+ ;;
+ *)
+ fatal_ "invalid value '$depcomp_with_libtool' for variable" \
+ "\$depcomp_with_libtool"
+ ;;
+esac
+
+cat >> Makefile.am <<END
+SUBDIRS = src
+# We include subfoo only to be sure that the munging in depcomp
+# doesn't remove too much from the object file name.
+${normalized_target}_SOURCES = foo.c sub/subfoo.c foo.h sub/subfoo.h
+${normalized_target}_${LINKADD} = src/libbaz.$a
+
+.PHONY: grep-test
+grep-test:
+## For debugging.
+ cat \$(DEPDIR)/foo.$po || :
+ cat \$(DEPDIR)/subfoo.$po || :
+ cat src/\$(DEPDIR)/baz.$po || :
+ cat src/sub2/\$(DEPDIR)/sub2foo.$po || :
+## Checks done here.
+ grep '^foo.$objext.*:' \$(DEPDIR)/foo.$po
+ grep '^subfoo\.$objext.*:' \$(DEPDIR)/subfoo.$po
+ grep '^baz\.$objext.*:' src/\$(DEPDIR)/baz.$po
+ grep '^sub2/sub2foo\.$objext.*:' src/sub2/\$(DEPDIR)/sub2foo.$po
+END
+
+cat > src/Makefile.am <<END
+AUTOMAKE_OPTIONS = subdir-objects
+noinst_${LIBPRIMARY} = libbaz.$a
+# We include sub2foo only to be sure that the munging in depcomp
+# doesn't remove too much from the object file name.
+libbaz_${a}_SOURCES = baz.c sub2/sub2foo.c baz.h sub2/sub2foo.h
+END
+
+cat > foo.c <<'END'
+#include "foo.h"
+#include "src/baz.h"
+#include <stdlib.h>
+int main (void)
+{
+ printf ("foo bar\n");
+ exit (EXIT_SUCCESS + subfoo () + baz ());
+}
+END
+
+cat > foo.h <<'END'
+#include <stdio.h>
+#include "sub/subfoo.h"
+END
+
+cat > sub/subfoo.c <<'END'
+#include "sub/subfoo.h"
+int subfoo (void) { return 0; }
+END
+
+echo '/* empty */' > src/sub2/sub2foo.h
+
+cat > sub/subfoo.h <<'END'
+#include <stdio.h>
+extern int subfoo (void);
+END
+
+cat > src/baz.c <<'END'
+#include "baz.h"
+int baz (void) { return 0; }
+END
+
+cat > src/baz.h <<'END'
+extern int baz (void);
+END
+
+cat > src/sub2/sub2foo.c <<'END'
+#include "sub2foo.h"
+int sub2foo (void) { return 0; }
+END
+
+test $depcomp_with_libtool = no || libtoolize \
+ || fatal_ "libtoolize failed"
+$ACLOCAL && $AUTOCONF && $AUTOMAKE -a \
+ || fatal_ "autotools failed"
+test -f build-aux/depcomp \
+ || fatal_ "depcomp script not installed"
+
+case $depmode in
+ auto)
+ displayed_depmode='..*' # At least one character long.
+ cfg_deptrack=--enable-dependency-tracking ;;
+ disabled)
+ displayed_depmode=none
+ cfg_deptrack=--disable-dependency-tracking ;;
+ *)
+ displayed_depmode="(cached) $depmode"
+ cfg_deptrack="$cachevar=$depmode"
+ # Sanity check: ensure the cache variable we force is truly
+ # used by configure.
+ $FGREP $cachevar configure \
+ || fatal_ "configure lacks required cache variable '$cachevar'";;
+esac
+
+cd_top
+
+do_test ()
+{
+ cd_top
+ if test $vpath = no; then
+ pfx="in-tree build"
+ else
+ pfx="$vpath VPATH"
+ fi
+ if test $# -gt 0; then
+ subdir=$1; shift
+ pfx="$pfx, $subdir"
+ test -d $subdir || mkdir $subdir || fatal_ "creating directory $subdir"
+ cd $subdir
+ fi
+ pfx="[$pfx]"
+ case $vpath in
+ simple)
+ mkdir -p vpath-simple/build
+ cd vpath-simple/build
+ setup_srcdir ..
+ ;;
+ long)
+ mkdir -p vpath-long/src vpath-long/wrk
+ cd vpath-long/wrk
+ setup_srcdir ../src/$longpath
+ ;;
+ absolute)
+ mkdir -p vpath-abs/build
+ cd vpath-abs/build
+ absdir="`(cd .. && pwd)`" || fatal_ "getting absolute directory"
+ setup_srcdir "$absdir/vpath-abs"
+ unset absdir
+ ;;
+ no)
+ mkdir intree
+ cd intree
+ setup_srcdir .
+ ;;
+ *)
+ fatal_ "invalid value '$vpath' for variable \$vpath"
+ ;;
+ esac
+
+ command_ok_ \
+ "$pfx configure" \
+ "$srcdir/configure" $cfg_deptrack ${1+"$@"} >stdout
+ cat stdout
+
+ command_ok_ \
+ "$pfx right depmode selected" \
+ grep "^checking dependency style .*\.\.\. $displayed_depmode$" stdout
+ rm -f stdout
+
+ command_ok_ "$pfx simple make" make_ok
+ # Some bugs in VPATH builds only kick in during a rebuild.
+ command_ok_ "$pfx clean & rebuild" eval '$MAKE clean && make_ok'
+
+ if test $depmode = disabled; then
+ command_ok_ "$pfx no dependency files generated" check_no_depfiles
+ r=ok \
+ && grep "[ $tab]depmode=none" Makefile \
+ && rewrite "$srcdir"/src/sub2/sub2foo.h echo 'choke me' \
+ && delete "$srcdir"/sub/subfoo.h \
+ && make_ok \
+ || r='not ok'
+ result_ "$r" "$pfx dependency tracking is truly disabled"
+ elif grep "[ $tab]depmode=none" Makefile; then
+ skip_row_ 2 -r "automatic dependency tracking couldn't be activated"
+ else
+ command_ok_ "$pfx generated $po files look correct" $MAKE grep-test
+ r=ok \
+ && : "Some checks in the subdir." \
+ && $sleep \
+ && : "Ensure rebuild rules really kick in." \
+ && rewrite "$srcdir"/src/sub2/sub2foo.h echo 'choke me' \
+ && cd src \
+ && not $MAKE \
+ && cd .. \
+ && : "Ensure the deleted header bug is fixed." \
+ && delete "$srcdir"/src/sub2/sub2foo.h \
+ && edit "$srcdir"/src/sub2/sub2foo.c -e 1d \
+ && cd src \
+ && make_ok \
+ && : "Now do similar checks for the parent directory." \
+ && cd .. \
+ && rewrite "$srcdir"/sub/subfoo.h echo 'choke me' \
+ && not $MAKE \
+ && delete "$srcdir"/sub/subfoo.h \
+ && edit "$srcdir"/sub/subfoo.c -e 1d \
+ && edit "$srcdir"/foo.h -e 2d \
+ && make_ok \
+ || r='not ok'
+ result_ "$r" "$pfx dependency tracking works"
+ fi
+
+ command_ok_ "$pfx make distclean" check_distclean
+ cd_top
+}
+
+for vpath in no simple long absolute; do
+ if test $depcomp_with_libtool = no; then
+ do_test
+ else
+ do_test default
+ do_test noshared --disable-shared
+ do_test nostatic --disable-static
+ fi
+done
+
+:
diff --git a/tests/depcomp3.test b/tests/depcomp3.test
deleted file mode 100755
index 058d7e9..0000000
--- a/tests/depcomp3.test
+++ /dev/null
@@ -1,63 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2003, 2010, 2011 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Make sure dashmstdout generates dependencies.
-
-required='gcc'
-. ./defs || Exit 1
-
-cat >> configure.in << 'END'
-AC_PROG_CC
-AM_PROG_CC_C_O
-AC_OUTPUT
-END
-
-cat > Makefile.am << 'END'
-AUTOMAKE_OPTIONS = subdir-objects
-check_PROGRAMS = prg
-prg_SOURCES = src/sub.c src/foo.h
-
-.PHONY: grepdeps
-grepdeps:
- grep 'src/sub\.$(OBJEXT).*:' src/$(DEPDIR)/sub.Po
-
-END
-
-mkdir src
-
-: > src/foo.h
-
-cat >src/sub.c <<EOF
-#include "foo.h"
-int
-main ()
-{
- return 0;
-}
-EOF
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
-
-# Sanity check: make sure the cache variable we force is used by configure.
-grep am_cv_CC_dependencies_compiler_type configure
-
-./configure am_cv_CC_dependencies_compiler_type=dashmstdout
-$MAKE check
-$MAKE grepdeps
-
-:
diff --git a/tests/depcomp4.test b/tests/depcomp4.test
deleted file mode 100755
index fc62990..0000000
--- a/tests/depcomp4.test
+++ /dev/null
@@ -1,59 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2003, 2010, 2011 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Test for PR 385: makedepend doesn't work with Libtool.
-
-required='libtoolize gcc makedepend'
-. ./defs || Exit 1
-
-cat >> configure.in << 'END'
-AC_PROG_CC
-AM_PROG_AR
-AC_PROG_LIBTOOL
-AC_OUTPUT
-END
-
-cat > Makefile.am << 'END'
-noinst_LTLIBRARIES = liba.la
-liba_la_SOURCES = a.c foo.h
-
-.PHONY: grepdeps
-grepdeps:
- grep 'a\.lo *:' ./$(DEPDIR)/a.Plo
-END
-
-: > foo.h
-
-cat >a.c <<EOF
-#include "foo.h"
-int a() { return 0; }
-EOF
-
-libtoolize --force
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
-
-# Sanity check: make sure the cache variable we force is used by configure.
-grep am_cv_CC_dependencies_compiler_type configure
-
-./configure am_cv_CC_dependencies_compiler_type=makedepend
-$MAKE >output 2>&1 || { cat output; Exit 1; }
-cat output
-grep 'unknown directive' output && Exit 1
-$MAKE grepdeps
-
-:
diff --git a/tests/depcomp5.test b/tests/depcomp5.test
deleted file mode 100755
index 586a98b..0000000
--- a/tests/depcomp5.test
+++ /dev/null
@@ -1,69 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2003, 2004, 2010, 2011 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Check icc's dependency mode.
-
-required='icc'
-. ./defs || Exit 1
-
-# Automake supports icc since version 7.0 through a dedicated depcomp mode.
-# icc 8.0 and greater understand gcc options, so depmode is set to gcc.
-if icc -V -help 2>&1 | grep 'Version 7'; then
- expect='depmode=icc'
-else
- expect='depmode=gcc'
-fi
-
-cat >> configure.in << 'END'
-AC_PROG_CC
-AM_PROG_CC_C_O
-AC_OUTPUT
-END
-
-cat > Makefile.am << 'END'
-AUTOMAKE_OPTIONS = subdir-objects
-check_PROGRAMS = prg
-prg_SOURCES = src/sub.c src/foo.h
-
-.PHONY: grepdeps
-grepdeps:
- grep 'src/sub\.$(OBJEXT).*:' src/$(DEPDIR)/sub.Po
-
-END
-
-mkdir src
-
-touch src/foo.h
-
-cat >src/sub.c <<EOF
-#include "foo.h"
-int
-main ()
-{
- return 0;
-}
-EOF
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
-
-./configure
-grep "$expect" Makefile
-$MAKE check
-$MAKE grepdeps
-
-:
diff --git a/tests/depcomp6.test b/tests/depcomp6.test
deleted file mode 100755
index 2d43c28..0000000
--- a/tests/depcomp6.test
+++ /dev/null
@@ -1,110 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2006, 2010, 2011 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Check dependency generation (non libtool case).
-
-required=cc
-. ./defs || Exit 1
-
-cat >> configure.in << 'END'
-AC_PROG_CC
-AM_PROG_CC_C_O
-AM_PROG_AR
-AC_PROG_RANLIB
-AC_CONFIG_FILES([sub2/Makefile])
-AC_OUTPUT
-END
-
-mkdir sub sub2 sub2/sub3
-
-cat >Makefile.am <<'END'
-SUBDIRS = sub2
-bin_PROGRAMS = foo
-foo_SOURCES = foo.c sub/bar.c foo.h sub/bar.h
-foo_LDADD = sub2/libbaz.a
-END
-
-cat >sub2/Makefile.am <<'END'
-AUTOMAKE_OPTIONS = subdir-objects
-noinst_LIBRARIES = libbaz.a
-libbaz_a_SOURCES = baz.c sub3/ba3.c baz.h sub3/ba3.h
-END
-
-cat >foo.c <<'END'
-#include "foo.h"
-#include "sub2/baz.h"
-#include <stdlib.h>
-int main (void) { printf ("foo"); return bar () + baz (); }
-END
-
-cat >foo.h <<'END'
-#include <stdio.h>
-#include "sub/bar.h"
-END
-
-cat >sub/bar.c <<'END'
-#include "sub/bar.h"
-int bar (void) { return 0; }
-END
-
-touch sub2/sub3/ba3.h
-
-cat >sub/bar.h <<'END'
-#include <stdio.h>
-extern int bar (void);
-END
-
-cat >sub2/baz.c <<'END'
-#include "baz.h"
-int baz (void) { return 0; }
-END
-
-cat >sub2/baz.h <<'END'
-extern int baz (void);
-END
-
-cat >sub2/sub3/ba3.c <<'END'
-#include "ba3.h"
-int ba3 (void) { return 0; }
-END
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
-
-./configure --enable-dependency-tracking
-$MAKE
-
-if grep 'depmode=none' Makefile; then
- skip_ "automatic dependency tracking couldn't be activated"
-fi
-
-cd sub2
-$sleep
-echo 'choke me' > sub3/ba3.h
-# Do not use `$MAKE && Exit 1' here, since even relatively-recent
-# versions of the BSD shell wrongly exit when the `errexit' shell
-# flag is active if a command within "&&" fails inside a compound
-# statement.
-if $MAKE; then Exit 1; else :; fi
-
-# Ensure the deleted header bug is fixed.
-rm -f sub3/ba3.h
-sed 1d sub3/ba3.c >sub3/ba3.t
-mv -f sub3/ba3.t sub3/ba3.c
-$MAKE
-
-:
diff --git a/tests/depcomp7.test b/tests/depcomp7.test
deleted file mode 100755
index f553894..0000000
--- a/tests/depcomp7.test
+++ /dev/null
@@ -1,126 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2006, 2007, 2010, 2011 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Check dependency generation (libtool case).
-
-required='cc libtoolize'
-. ./defs || Exit 1
-
-cat >> configure.in << 'END'
-AC_PROG_CC
-AM_PROG_CC_C_O
-AM_PROG_AR
-AM_PROG_LIBTOOL
-AC_CONFIG_FILES([sub2/Makefile])
-AC_OUTPUT
-END
-
-mkdir sub sub2 sub2/sub3
-
-cat >Makefile.am <<'END'
-SUBDIRS = sub2
-bin_PROGRAMS = foo
-foo_SOURCES = foo.c sub/bar.c foo.h sub/bar.h
-foo_LDADD = sub2/libbaz.la
-END
-
-cat >sub2/Makefile.am <<'END'
-AUTOMAKE_OPTIONS = subdir-objects
-noinst_LTLIBRARIES = libbaz.la
-libbaz_la_SOURCES = baz.c sub3/ba3.c baz.h sub3/ba3.h
-END
-
-cat >foo.c <<'END'
-#include "foo.h"
-#include "sub2/baz.h"
-#include <stdlib.h>
-int main (void) { printf ("foo"); return bar () + baz (); }
-END
-
-cat >foo.h <<'END'
-#include <stdio.h>
-#include "sub/bar.h"
-END
-
-cat >sub/bar.c <<'END'
-#include "sub/bar.h"
-int bar (void) { return 0; }
-END
-
-echo 'extern int x;' > sub2/sub3/ba3.h
-
-cat >sub/bar.h <<'END'
-#include <stdio.h>
-extern int bar (void);
-END
-
-cat >sub2/baz.c <<'END'
-#include "baz.h"
-int baz (void) { return 0; }
-END
-
-cat >sub2/baz.h <<'END'
-extern int baz (void);
-END
-
-cat >sub2/sub3/ba3.in <<'END'
-#include "ba3.h"
-int ba3 (void) { return 0; }
-END
-
-libtoolize
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
-
-st=0
-for staticshared in --disable-shared "" --disable-static; do
-
- cp sub2/sub3/ba3.in sub2/sub3/ba3.c
- ./configure --enable-dependency-tracking $staticshared
- $MAKE
-
- # If we cannot enable dependency tracking, perform only the most basic
- # checks, and don't consider this test to be PASSed but SKIPped, because
- # the main purpose of this test is exposing the depmode features.
- if grep 'depmode=none' Makefile; then
- st=77
- else
- cd sub2
- $sleep
- echo 'choke me' > sub3/ba3.h
- # Do not use `$MAKE && Exit 1' here, since even relatively-recent
- # versions of the BSD shell wrongly exit when the `errexit' shell
- # flag is active if a command within "&&" fails inside a compound
- # statement.
- if $MAKE; then Exit 1; else :; fi
-
- # Ensure the deleted header bug is fixed.
- rm -f sub3/ba3.h
- sed 1d sub3/ba3.in >sub3/ba3.c
- $MAKE
- cd ..
- fi
-
- $MAKE distclean
- test ! -f sub2/sub3/ba3.u
- test ! -f sub2/sub3/ba3.d
-
- echo 'extern int x;' > sub2/sub3/ba3.h
-
-done
-
-Exit $st
diff --git a/tests/depcomp8a.test b/tests/depcomp8a.test
index 2d9e809..222797d 100755
--- a/tests/depcomp8a.test
+++ b/tests/depcomp8a.test
@@ -24,6 +24,7 @@ required=cc
cat >> configure.in << 'END'
AC_PROG_CC
+#x AM_PROG_CC_C_O
AC_OUTPUT
END
@@ -60,7 +61,8 @@ DISTCHECK_CONFIGURE_FLAGS='--enable-dependency-tracking'
$MAKE distcheck
# Try again with subdir-objects option.
-echo AM_PROG_CC_C_O >> configure.in
+sed 's/#x //' configure.in >configure.int
+mv -f configure.int configure.in
echo AUTOMAKE_OPTIONS = subdir-objects >> Makefile.am
$ACLOCAL
diff --git a/tests/depcomp8b.test b/tests/depcomp8b.test
index 876f6aa..d4ee9c3 100755
--- a/tests/depcomp8b.test
+++ b/tests/depcomp8b.test
@@ -24,6 +24,7 @@ required='cc libtoolize'
cat >> configure.in << 'END'
AC_PROG_CC
+#x AM_PROG_CC_C_O
AM_PROG_AR
AC_PROG_LIBTOOL
AC_OUTPUT
@@ -55,7 +56,8 @@ DISTCHECK_CONFIGURE_FLAGS='--enable-dependency-tracking'
$MAKE distcheck
# Try again with subdir-objects option.
-echo AM_PROG_CC_C_O >> configure.in
+sed 's/#x //' configure.in >configure.int
+mv -f configure.int configure.in
echo AUTOMAKE_OPTIONS = subdir-objects >> Makefile.am
$ACLOCAL
diff --git a/tests/depend2.test b/tests/depend2.test
deleted file mode 100755
index ec949e3..0000000
--- a/tests/depend2.test
+++ /dev/null
@@ -1,54 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2010, 2011 Free
-# Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Test to make sure dependency tracking works with
-# --disable-dependency-tracking.
-# Report from Robert Boehne.
-
-required=cc
-. ./defs || Exit 1
-
-cat >> configure.in << 'END'
-AC_PROG_CC
-AC_OUTPUT
-END
-
-cat > Makefile.am << 'END'
-bin_PROGRAMS = hello
-END
-
-cat > hello.h << 'END'
-#include <stdio.h>
-END
-
-cat > hello.c << 'END'
-#include "hello.h"
-int main (int argc, char *argv[])
-{
- printf ("yeah, yeah\n");
- return 0;
-}
-END
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
-
-./configure --disable-dependency-tracking
-$MAKE
-
-:
diff --git a/tests/depmod.tap b/tests/depmod.tap
deleted file mode 100755
index b6af3ec..0000000
--- a/tests/depmod.tap
+++ /dev/null
@@ -1,209 +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 dependency tracking in various flavours works with VPATH
-# builds. Examples of reported failures follows ...
-
-# <http://lists.gnu.org/archive/html/automake-patches/2011-04/msg00028.html>
-#
-# Here's the bug: makedepend will prefix VPATH to the object file name,
-# thus the second make will invoke depcomp with object='../../src/foo.o',
-# causing errors such as:
-# touch: cannot touch `../../src/.deps/foo.TPo': No such file or directory
-# makedepend: error: cannot open "../../src/.deps/foo.TPo"
-# ../../depcomp: line 560: ../../src/.deps/foo.TPo: No such file or directory
-
-# <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8473>
-# <http://lists.gnu.org/archive/html/automake-patches/2011-04/msg00079.html>
-#
-# Here's the bug: hp depmode will prefix VPATH to the object file name,
-# thus the second gmake will invoke depcomp with object='../../src/foo.o',
-# causing errors such as (broken on multiple lines for clarity):
-# cpp: "", line 0: error 4066: Cannot create
-# "../../gllib/.deps/nonblocking.TPo" file for
-# "-M../../gllib/.deps/nonblocking.TPo" option.
-# (No such file or directory[errno=2])
-#
-
-# <http://lists.gnu.org/archive/html/automake-patches/2011-04/msg00140.html>
-# <http://lists.gnu.org/archive/html/automake-patches/2011-05/msg00019.html>
-#
-# A partial failure of an earlier version of this test; some bad
-# post-processing of the `*.Po' files led to the following broken
-# contents of `src/sub/.deps/subfoo.Po':
-# > sub/subfoo.o: ../../depmod-data.dir/src/sub/subfoo.c \
-# > ../../depmod-data.dir/src/foo.h
-# > ../../depmod-data.dir/src/sub/subfoo.c \:
-# > ../../depmod-data.dir/src/foo.h:
-# which caused make to die with an error like:
-# "sub/.deps/subfoo.Po:3: *** missing separator. Stop."
-
-required=cc
-. ./defs || Exit 99
-
-# Keep this in sync with the contents of depend.m4.
-all_depmodes=`\
- sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < "$am_scriptdir/depcomp" \
- | grep -v '^none$'` \
- && : Turn newlines and tabs into spaces, and strip extra whitespace. \
- && all_depmodes=`echo $all_depmodes` \
- && test -n "$all_depmodes" \
- || fatal_ "can't extract list of valid depmodes"
-
-# Allow the user to select a subset of the tests.
-if test $# -gt 0; then
- tested_depmodes=$*
- for depmode in $tested_depmodes; do
- case " $all_depmodes " in
- *" $depmode "*);;
- *) fatal_ "invalid user-specified depmode '$depmode'"
- esac
- done
- n=`for m in $tested_depmodes; do echo $m; done | wc -l`
- # We need to determine the TAP plan adaptively.
- # Per each valid depmode three kinds of VPATH, and per each of them
- # a test on "./configure" and one on "make & remake"; so there are
- # $n * 3 * 2 tests.
- plan_ `expr $n '*' 6`
- unset n
-else
- tested_depmodes=$all_depmodes
- # Prefer static TAP plan if possible, minimizes the chance of errors.
- plan_ 102
-fi
-
-ocwd=`pwd` || fatal_ "cannot get current working directory"
-
-srctree=depmod-1.0
-mkdir $srctree
-mv missing install-sh depcomp configure.in $srctree
-cd $srctree
-
-mkdir src src/sub
-
-cat >> configure.in << 'END'
-AC_CONFIG_FILES([src/Makefile])
-AC_PROG_CC
-AM_PROG_CC_C_O
-AC_OUTPUT
-END
-
-echo 'SUBDIRS = src' > Makefile.am
-
-cat > src/Makefile.am << 'END'
-AUTOMAKE_OPTIONS = subdir-objects
-bin_PROGRAMS = foo
-foo_SOURCES = foo.c foo.h sub/subfoo.c
-END
-
-echo 'extern int subfoo (void);' > src/foo.h
-
-cat > src/foo.c << 'END'
-#include "foo.h"
-int main (void)
-{
- return subfoo ();
-}
-END
-
-# We include subfoo only to be sure that we don't remove too much
-# from the object file name.
-cat > src/sub/subfoo.c << 'END'
-#include "foo.h"
-int subfoo (void)
-{
- return 0;
-}
-END
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
-
-# Sanity check: make sure the cache variable we force is used
-# by configure.
-grep am_cv_CC_dependencies_compiler_type configure \
- || fatal_ "configure lacks required cache variable"
-
-cd "$ocwd" || fatal_ "cannot chdir back to top directory"
-
-longpath=this-is/a-path/which-have/quite-a/long_long_name
-$srctree/install-sh -d $longpath || fatal_ "cannot create long path"
-cp -pR $srctree/* $longpath || fatal_ "cannot populate long path"
-cp -pR $srctree/* . || fatal_ "cannot populate top-level directory"
-
-for vpath in simple long absolute; do
- for depmode in $tested_depmodes; do
- case $vpath in
- simple)
- srcdir=..;;
- long)
- srcdir=../$longpath;;
- absolute)
- srcdir=$ocwd;;
- *)
- fatal_ "bad \$vpath value '$vpath'";;
- esac
-
- pfx="$depmode [$vpath VPATH]"
-
- mkdir $depmode-$vpath.d
- cd $depmode-$vpath.d
-
- if "$srcdir"/configure am_cv_CC_dependencies_compiler_type=$depmode
- then
- r0='ok'
- else
- r0='not ok'
- fi
- result_ "$r0" "$pfx configure" \
-
- # Do not fail with the first call to make fails, as the depmode
- # we've forced might not actually work, but we have overridden the
- # _AM_DEPENDENCIES tests.
- r1='not ok'
- if $MAKE; then
- # We must clean and rebuild, as the actual error only happens the
- # second time the objects are built because 'depcomp' has silently
- # messed up the .Po files the first time.
- $MAKE clean \
- && { e=0; $MAKE >output 2>&1 || e=1; cat output; test $e = 0; } \
- && { if grep 'src/[._]deps' output; then false; else :; fi; } \
- && r1='ok'
- result_ "$r1" "$pfx make & remake"
- else
- skip_ -r "can't force depmode" "$pfx make & remake"
- fi
-
- cd "$ocwd" || fatal_ "cannot chdir back to top directory"
-
- # Remove subdirectories for tests that have passed, to avoid ending up
- # with a too big test directory. This is especially important since,
- # on each and every system, at least some tests in this script are
- # expected to be skipped (which ones exactly depends on the system),
- # thus causing the test directory not to be removed when the script
- # terminates.
- if not am_keeping_testdirs && test "$r0,$r1" = ok,ok; then
- rm_rf_ $depmode-$vpath.d \
- || fatal_ "removing directory \`$depmode-$vpath.d'"
- else
- : For lesser shells with broken 'set -e'.
- fi
-
- done
-done
-
-:
diff --git a/tests/destdir.test b/tests/destdir.test
index 0633ce2..8fefbc2 100755
--- a/tests/destdir.test
+++ b/tests/destdir.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 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
@@ -46,4 +46,5 @@ $AUTOCONF
$AUTOMAKE -a
./configure
$MAKE distcheck && Exit 1
+
:
diff --git a/tests/dist-formats.tap b/tests/dist-formats.tap
index dd9d896..80be9c9 100755
--- a/tests/dist-formats.tap
+++ b/tests/dist-formats.tap
@@ -75,10 +75,27 @@ all_compressors=`
done | tr "$nl" ' '`
echo All compressors: $all_compressors
-# Assume gzip(1) is available on every reasonable portability target.
missing_compressors=`
for c in $all_compressors; do
- test $c = gzip || $c --version </dev/null >&2 && continue
+ case $c in
+ # Assume gzip(1) is available on every reasonable portability target.
+ gzip)
+ continue;;
+ # On Cygwin, as of 9/2/2012, 'compress' is provided by sharutils
+ # and is just a dummy script that is not able to actually compress
+ # (it can only decompress). So, check that the 'compress' program
+ # is actually able to compress input.
+ # Note that, at least on GNU/Linux, 'compress' does (and is
+ # documented to) exit with status 2 if the output is larger than
+ # the input after (attempted) compression; so we need to pass it
+ # an input that it can actually reduce in size when compressing.
+ compress)
+ for x in 1 2 3 4 5 6 7 8; do
+ echo aaaaaaaaaaaaaaa
+ done | $c -c >/dev/null && continue;;
+ *)
+ $c --version </dev/null >&2 && continue;;
+ esac
echo $c
done | tr "$nl" ' '`
echo Missing compressors: $missing_compressors
diff --git a/tests/exeext4.test b/tests/exeext4.test
index 1ee8016..9ce25fe 100755
--- a/tests/exeext4.test
+++ b/tests/exeext4.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2003, 2006, 2010, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006, 2010, 2011, 2012 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,18 +18,18 @@
# Make sure $(EXEEXT) is appended to programs and to tests that are
# programs, but not to @address@hidden
-required=cc
. ./defs || Exit 1
cat >> configure.in << 'END'
AM_CONDITIONAL([COND], [test -n "$cond"])
AC_SUBST([programs], ['prg1$(EXEEXT) prg2$(EXEEXT)'])
-AC_PROG_CC
+AC_SUBST([CC], [whocares])
AC_OUTPUT
END
cat > Makefile.am << 'END'
-EXEEXT = .bin
+AUTOMAKE_OPTIONS = no-dependencies
+EXEEXT = .x
if COND
BAR = bar
DEP = bar
@@ -39,42 +40,31 @@ bin_PROGRAMS = $(programs) @programs@ prg3 $(BAR) $(BAZE)
EXTRA_PROGRAMS = prg1 prg2 prg3
TESTS = prg1 prg3 prg4 $(BAZ)
-print-bin:
- @echo BEG: $(bin_PROGRAMS) :END
-print-extra:
- @echo BEG: $(EXTRA_PROGRAMS) :END
-print-tests:
- @echo BEG: $(TESTS) :END
-print-barbaz:
- @echo BEG: $(BAR) $(BAZ) :END
+.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
+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 $(BAR) $(BAZ) == bar baz bar
END
$ACLOCAL
$AUTOCONF
$AUTOMAKE --add-missing --copy
+
./configure
-$MAKE print-bin > output
-cat output
-$FGREP 'prg1.bin prg2.bin prg1.bin prg2.bin prg3.bin' output
-$MAKE print-extra > output
-cat output
-$FGREP 'prg1.bin prg2.bin prg3.bin' output
-$MAKE print-tests > output
-cat output
-$FGREP 'prg1.bin prg3.bin prg4' output
+$MAKE test-nocond
./configure cond=yes
-$MAKE print-bin > output
-cat output
-$FGREP 'prg1.bin prg2.bin prg1.bin prg2.bin prg3.bin bar.bin baz.bin' output
-$MAKE print-tests > output
-cat output
-$FGREP 'prg1.bin prg3.bin prg4 baz.bin bar.bin' output
-$MAKE print-barbaz > output
-cat output
-$FGREP 'bar baz bar' output
+$MAKE test-cond
# Only two am__EXEEXT_* variables are needed here: one for BAR, and one
# BAZ. The latter must use the former.
test 2 = `grep '__EXEEXT_. =' Makefile.in | wc -l`
grep 'am__EXEEXT_2 = .*am__EXEEXT_1' Makefile.in
+
+:
diff --git a/tests/extra-programs-empty.test b/tests/extra-programs-empty.test
index 992c5ee..e46e1ac 100755
--- a/tests/extra-programs-empty.test
+++ b/tests/extra-programs-empty.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2006, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006, 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
@@ -15,7 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Test that EXTRA_PROGRAMS doesn't get removed because it is empty.
-# This check hs been introduced in commit `Release-1-9-254-g9d0eaef'
+# This check has been introduced in commit `Release-1-9-254-g9d0eaef'
# into the former test `subst2.test'.
. ./defs || Exit 1
diff --git a/tests/fort2.test b/tests/fort2.test
index 10b00f3..0c7065d 100755
--- a/tests/fort2.test
+++ b/tests/fort2.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2006, 2008, 2010, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2008, 2010, 2011, 2012 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/tests/gen-testsuite-part b/tests/gen-testsuite-part
index b53b9f9..08835b7 100755
--- a/tests/gen-testsuite-part
+++ b/tests/gen-testsuite-part
@@ -3,7 +3,7 @@
# of the Automake testsuite. Also, automatically generate some more
# tests from them (for particular cases/setups only).
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# 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
@@ -23,6 +23,8 @@
use warnings FATAL => "all";
use strict;
use File::Basename ();
+use constant TRUE => 1;
+use constant FALSE => 0;
my $me = File::Basename::basename $0;
@@ -178,6 +180,11 @@ my %deps_extractor =
dist_prereqs => "tap-setup.sh",
nodist_prereqs => "tap-common-setup.log",
},
+ depcomp =>
+ {
+ line_matcher => qr/\bdepcomp\.sh\b/,
+ dist_prereqs => "depcomp.sh",
+ },
);
#--------------------------------------------------------------------------
@@ -272,8 +279,6 @@ print <<EOF;
## Autogenerated tests and their dependencies. ##
## --------------------------------------------- ##
-generated_TESTS =
-
EOF
# FIXME: the following is not really right, since cannot compose wrapping
@@ -297,8 +302,6 @@ while (my ($k, $g) = each %test_generators)
sub { write_wrapper_script $_[0], $wrapped_test,
$g->{shell_setup_code} },
0555;
- # Update generated makefile fragment to account for it.
- print "generated_TESTS += $wrapper_test\n";
# The generated test works by sourcing the original test, so that
# it has to be re-run every time that changes ...
print "$base-w.log: $wrapped_test\n";
@@ -312,6 +315,70 @@ while (my ($k, $g) = each %test_generators)
}
}
+print <<EOF;
+
+## ---------------------------------------------------- ##
+## Ad-hoc autogenerated tests and their dependencies. ##
+## ---------------------------------------------------- ##
+
+EOF
+
+print "## Tests on automatic dependency tracking (see 'depcomp.sh').\n";
+
+# Key: depmode, value: list of required programs.
+my %depmodes =
+ (
+ auto => ["cc"],
+ disabled => ["cc"],
+ makedepend => ["cc", "makedepend"],
+ dashmstdout => ["gcc"],
+ cpp => ["gcc"],
+# This is for older (pre-3.x) GCC versions. Newer versions
+# have depmode "gcc3".
+ gcc => ["gcc"],
+# This is for older (pre-7) msvc versions. Newer versions
+# have depmodes "msvc7" and "msvc7msys".
+ msvisualcpp => ["cl", "cygpath"],
+ msvcmsys => ["cl", "mingw"],
+ );
+
+foreach my $lt (TRUE, FALSE)
+ {
+ foreach my $m (keys %depmodes)
+ {
+ my @required =
+ (
+ @{$depmodes{$m}},
+ $lt ? ("libtoolize",) : (),
+ );
+ my @vars_init =
+ (
+ "depmode=$m",
+ "depcomp_with_libtool=" . ($lt ? "yes" : "no"),
+ );
+ my $base = "depcomp" . ($lt ? "-lt-" : "-") . $m;
+ # Register wrapper test as "autogenerated" ...
+ push @generated_tests, "$base.tap";
+ atomic_write ("$base.tap", sub
+ {
+ my $file_handle = shift;
+ print $file_handle unindent <<EOF;
+ #! /bin/sh
+ # Automatically generated test. DO NOT EDIT BY HAND!
+ @vars_init
+ required="@required"
+ . ./defs-static || exit '99'
+ . "\$testsrcdir/depcomp.sh"; exit "\$?"
+EOF
+ },
+ 0555);
+ }
+ }
+
+# Update generated makefile fragment to account for all the generated tests.
+print "generated_TESTS =\n";
+map { print "generated_TESTS += $_\n" } @generated_tests;
+
# The test scripts are scanned for automatic dependency generation *after*
# the generated tests have been created, so they too can be scanned. To
# do so correctly, we need to update the list in address@hidden' to make it
diff --git a/tests/is b/tests/is
new file mode 100755
index 0000000..1e1c0ce
--- /dev/null
+++ b/tests/is
@@ -0,0 +1,54 @@
+#! /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 that two whitespace-separated lists are equal.
+# Assumes the two lists are passed on the command line separated by
+# a '==' string.
+# This script is useful to test equality of lists in makefile rules,
+# in the face of variables defined through line-continuations,
+# automake rewrites and expansions of empty variables.
+
+set -e
+set -u
+
+# Initialize before unsetting, for shells (like older bash or Solaris
+# ksh) that fail to unset variables that are already unset.
+exp= got=; unset exp got
+seen_eqeq=no
+while test $# -gt 0; do
+ if test x"$1" = x"=="; then
+ if test $seen_eqeq = no; then
+ seen_eqeq=yes
+ else
+ echo "$0: more than one '==' argument seen on command line" >&2
+ exit 2
+ fi
+ else
+ if test $seen_eqeq = no; then
+ got=${got+"$got "}$1
+ else
+ exp=${exp+"$exp "}$1
+ fi
+ fi
+ shift
+done
+
+if test $seen_eqeq = no; then
+ echo "$0: no '==' argument seen on command line" >&2
+ exit 2
+fi
+
+test x"${exp-}" = x"${got-}"
diff --git a/tests/java-mix.test b/tests/java-mix.test
index 2bf4f72..44d8d83 100755
--- a/tests/java-mix.test
+++ b/tests/java-mix.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# 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
@@ -16,7 +16,8 @@
# Check that the JAVA primary can be used freely in the same Makefile.am
# with proper combinations of the `dist_', `nodist_' and `nobase_'
-# modifiers. Also check that `.java' files are not ditributed by default.
+# modifiers. Also check that `.java' files are not distributed by
+# default.
. ./defs || Exit 1
diff --git a/tests/lex-lib-external.test b/tests/lex-lib-external.test
index 5f04594..1fb0009 100755
--- a/tests/lex-lib-external.test
+++ b/tests/lex-lib-external.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# 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
@@ -69,6 +69,7 @@ $MAKE all
if cross_compiling; then :; else
echo GOOD | ./lexer
echo BAD | ./lexer && Exit 1
+ : For shells with busted 'set -e'.
fi
$MAKE distcheck
diff --git a/tests/lex-noyywrap.test b/tests/lex-noyywrap.test
index 9431970..98561f2 100755
--- a/tests/lex-noyywrap.test
+++ b/tests/lex-noyywrap.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2003, 2004, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2003, 2004, 2010, 2011, 2012 Free
+# Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -64,6 +64,7 @@ $MAKE
if cross_compiling; then :; else
echo GOOD | ./foo
echo BAD | ./foo && Exit 1
+ : For shells with busted 'set -e'.
fi
# Sanity check on distribution.
diff --git a/tests/lex3.test b/tests/lex3.test
index 46f0b9f..01d9651 100755
--- a/tests/lex3.test
+++ b/tests/lex3.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2003, 2004, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2003, 2004, 2010, 2011, 2012 Free
+# Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -67,6 +67,7 @@ $MAKE
if cross_compiling; then :; else
echo GOOD | ./foo
echo BAD | ./foo && Exit 1
+ : For shells with busted 'set -e'.
fi
# The generated file `foo.c' must be shipped.
diff --git a/tests/list-of-tests.mk b/tests/list-of-tests.mk
index da40dab..0347709 100644
--- a/tests/list-of-tests.mk
+++ b/tests/list-of-tests.mk
@@ -39,7 +39,6 @@ pm/Wrap.pl
handwritten_TESTS = \
get-sysconf.test \
$(perl_TESTS) \
-depmod.tap \
instspc.tap \
aclocal.test \
aclocal3.test \
@@ -323,11 +322,6 @@ deleted-m4.test \
depacl2.test \
depcomp.test \
depcomp2.test \
-depcomp3.test \
-depcomp4.test \
-depcomp5.test \
-depcomp6.test \
-depcomp7.test \
depcomp8a.test \
depcomp8b.test \
depcomp-recover.test \
@@ -337,7 +331,6 @@ depcomp-shuffle-sub.test \
depcomp-shuffle-sub-vpath.test \
depdist.test \
depend.test \
-depend2.test \
depend3.test \
depend4.test \
deprecated-acinit.test \
@@ -610,6 +603,7 @@ makej.test \
makej2.test \
maken.test \
maken3.test \
+make-dryrun.test \
makevars.test \
man.test \
man2.test \
diff --git a/tests/ltinstloc.test b/tests/ltinstloc.test
index 506ae8d..dd8f63c 100755
--- a/tests/ltinstloc.test
+++ b/tests/ltinstloc.test
@@ -1,5 +1,6 @@
#!/bin/sh
-# Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009, 2010, 2011, 2012 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -64,4 +65,5 @@ mv -f t Makefile.am
$AUTOMAKE
grep ' -rpath \$(libdir)/sub' Makefile.in
+
:
diff --git a/tests/objext-pr10128.test b/tests/make-dryrun.test
similarity index 51%
copy from tests/objext-pr10128.test
copy to tests/make-dryrun.test
index 120986c..ade314f 100755
--- a/tests/objext-pr10128.test
+++ b/tests/make-dryrun.test
@@ -14,45 +14,48 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Test for automake bug#10128: $(OBJEXT) redefinition causes
-# $(foo_OBJECTS) to be defined as empty.
+# Check that $(am__make_dryrun) works as expected.
. ./defs || Exit 1
+mkdir sub
+
echo AC_OUTPUT >> configure.in
cat > Makefile.am <<'END'
-LINK = echo >$@ Linked $@ from
-OBJEXT = fasl
-EXEEXT =
-
-noinst_PROGRAMS = foo zardoz
-foo_SOURCES = foo.lisp
-zardoz_SOURCES = mu1.lisp mu2.lisp
-
-## Un-commenting this is enough to make the test pass. Weird!
-##.lisp.o:
-
-.lisp.fasl:
- touch $@
-
-.PHONY: test
-test:
- test '$(foo_OBJECTS)' = 'foo.fasl'
- test '$(zardoz_OBJECTS)' = 'mu1.fasl mu2.fasl'
+all:
+ : Dummy, nothing to do.
+foo:
+ $(MAKE) all
+notdry:
+ @echo ":: $$MAKEFLAGS ::"; : For debugging.
+ $(am__make_dryrun) && exit 1; exit 0
+dry:
+ address@hidden ":: $$MAKEFLAGS ::"; : For debugging.
+ +$(am__make_dryrun) || exit 1; echo ok > from-dry-mode
END
$ACLOCAL
-$AUTOMAKE
$AUTOCONF
-
+$AUTOMAKE
./configure
-$MAKE test
-touch foo.lisp mu1.lisp mu2.lisp
-$MAKE all
-cat foo
-cat zardoz
-test "`cat foo`" = "Linked foo from foo.fasl"
-test "`cat zardoz`" = "Linked zardoz from mu1.fasl mu2.fasl"
+
+$MAKE notdry
+
+# Test against a known regressions. This was especially
+# heinous, since make running in normal mode was sometimes
+# mistaken for make running in dry mode.
+$MAKE notdry TESTS="n1.test n2.test"
+$MAKE notdry TESTS="n1 n2"
+$MAKE notdry TESTS="n1 n2"
+$MAKE notdry FOOFLAGS="-n -n -knf2 \\n --none -n"
+$MAKE notdry BARFLAGS="-n \"n\" '-n' --none -n"
+
+$MAKE -n dry
+test -f from-dry-mode
+rm -f from-dry-mode
+
+$MAKE --dry-run -k dry
+test -f from-dry-mode
:
diff --git a/tests/missing.test b/tests/missing.test
index 8e080eb..0ca5786 100755
--- a/tests/missing.test
+++ b/tests/missing.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2004, 2006, 2007, 2008, 2011 Free Software
+# Copyright (C) 2003, 2004, 2006, 2007, 2008, 2011, 2012 Free Software
# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
@@ -63,4 +63,5 @@ $MAKE
$sleep
touch aclocal.m4
$MAKE && Exit 1
+
:
diff --git a/tests/missing2.test b/tests/missing2.test
index 9844958..5df575e 100755
--- a/tests/missing2.test
+++ b/tests/missing2.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 2003, 2004, 2006, 2007, 2011 Free Software Foundation,
-# Inc.
+# Copyright (C) 2003, 2004, 2006, 2007, 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
@@ -55,4 +55,5 @@ $MAKE
$sleep
touch v.m4
$MAKE && Exit 1
+
:
diff --git a/tests/nodef.test b/tests/nodef.test
index cfcea39..e8389a0 100755
--- a/tests/nodef.test
+++ b/tests/nodef.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 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
@@ -54,4 +54,5 @@ $AUTOCONF
./configure
grep 'DEFS.*-DVERSION=\\"UnIqUe' output && Exit 1
+
:
diff --git a/tests/nodef2.test b/tests/nodef2.test
index 337c65f..4b5a431 100755
--- a/tests/nodef2.test
+++ b/tests/nodef2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2002, 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
@@ -50,4 +50,5 @@ $AUTOMAKE # Dummy call to make sure Automake grok
`no-define' silently.
./configure
grep 'DEFS.*-DVERSION=\\"UnIqUe' output && Exit 1
+
:
diff --git a/tests/nodep2.test b/tests/nodep2.test
index 840858e..f45ee2c 100755
--- a/tests/nodep2.test
+++ b/tests/nodep2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2006, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2006, 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
@@ -36,15 +36,9 @@ AM_PROG_UPC
AC_OUTPUT
END
-: > a.c
-: > b.cpp
-: > c.m
-: > d.S
-: > e.java
-: > f.upc
-
$ACLOCAL
$AUTOMAKE
grep DEPMODE Makefile.in && Exit 1
+
:
diff --git a/tests/objext-pr10128.test b/tests/objext-pr10128.test
index 120986c..e105635 100755
--- a/tests/objext-pr10128.test
+++ b/tests/objext-pr10128.test
@@ -38,8 +38,8 @@ zardoz_SOURCES = mu1.lisp mu2.lisp
.PHONY: test
test:
- test '$(foo_OBJECTS)' = 'foo.fasl'
- test '$(zardoz_OBJECTS)' = 'mu1.fasl mu2.fasl'
+ is $(foo_OBJECTS) == foo.fasl
+ is $(zardoz_OBJECTS) == mu1.fasl mu2.fasl
END
$ACLOCAL
diff --git a/tests/parallel-tests-dry-run-1.test
b/tests/parallel-tests-dry-run-1.test
index 4ed59f0..27e62a0 100755
--- a/tests/parallel-tests-dry-run-1.test
+++ b/tests/parallel-tests-dry-run-1.test
@@ -51,7 +51,10 @@ none_exist ()
{
st=0
for i in $*; do
- { test -r $i || test -f $i; } && { echo File $i found; st=1; }
+ if test -r $i || test -f $i; then
+ echo File $i found
+ st=1
+ fi
done
test $st -eq 0
}
diff --git a/tests/parallel-tests-dry-run-2.test
b/tests/parallel-tests-dry-run-2.test
index c81286e..1181689 100755
--- a/tests/parallel-tests-dry-run-2.test
+++ b/tests/parallel-tests-dry-run-2.test
@@ -83,6 +83,7 @@ for target in check recheck test-suite.log; do
make_n_ $target
grep '^:test-result: *FAIL' bar.trs
grep 'this is bad' foo.log test-suite.log && Exit 1
+ : For shells with busted 'set -e'.
done
chmod a-rw $files
diff --git a/tests/parallel-tests-extra-programs.test
b/tests/parallel-tests-extra-programs.test
index 5c5242c..00210eb 100755
--- a/tests/parallel-tests-extra-programs.test
+++ b/tests/parallel-tests-extra-programs.test
@@ -30,7 +30,7 @@ END
cat > Makefile.am << 'END'
TEST_EXTENSIONS = .bin .test
EXTRA_PROGRAMS =
-TESTS =
+TESTS =
END
#
diff --git a/tests/parallel-tests-unreadable.test
b/tests/parallel-tests-unreadable.test
index 2b4d077..425c31a 100755
--- a/tests/parallel-tests-unreadable.test
+++ b/tests/parallel-tests-unreadable.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# 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
@@ -70,6 +70,7 @@ for files in \
grep '^SKIP: bar' test-suite.log
grep '^barbarbar$' test-suite.log
$EGREP ':.*foo|foofoofoo' test-suite.log && Exit 1
+ : For shells with busted 'set -e'.
done
:
diff --git a/tests/parallel-tests2.test b/tests/parallel-tests2.test
index eadd68d..d0c3961 100755
--- a/tests/parallel-tests2.test
+++ b/tests/parallel-tests2.test
@@ -27,7 +27,10 @@ am_parallel_tests=yes
while :; do
for r2h in $RST2HTML rst2html rst2html.py; do
echo "$me: running $r2h --version"
- $r2h --version && break 2
+ # Don't use "&&" here, or a bug of 'set -e' present in some
+ # versions of the BSD shell will be triggered. We add the
+ # dummy "else" branch for extra safety.
+ if $r2h --version; then break 2; else :; fi
done
skip_all_ "no proper rst2html program found"
done
diff --git a/tests/pluseq3.test b/tests/pluseq3.test
index dea0023..394e6d3 100755
--- a/tests/pluseq3.test
+++ b/tests/pluseq3.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 1999, 2001, 2002, 2004, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1998, 1999, 2001, 2002, 2004, 2010, 2011, 2012 Free
+# Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -44,7 +44,7 @@ $ACLOCAL
$AUTOMAKE
grep 'address@hidden@data_DATA =
zarrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr \\$'
Makefile.in
-grep 'address@hidden@ doz$' Makefile.in
+grep "address@hidden@${tab}doz$" Makefile.in
grep 'address@hidden@data_DATA = dog$' Makefile.in
diff --git a/tests/programs-primary-rewritten.test
b/tests/programs-primary-rewritten.test
index e52bd56..2328bb6 100755
--- a/tests/programs-primary-rewritten.test
+++ b/tests/programs-primary-rewritten.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2006, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006, 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
@@ -40,9 +40,9 @@ baz = mau
.PHONY: test
test:
- test '$(check_PROGRAMS)' = a.bin
- test '$(bin_PROGRAMS)' = 'b.bin c'
- test '$(noinst_PROGRAMS)' = 'zardoz.bin maude.bin'
+ is $(check_PROGRAMS) == a.bin
+ is $(bin_PROGRAMS) == b.bin c
+ is $(noinst_PROGRAMS) == zardoz.bin maude.bin
END
$ACLOCAL
diff --git a/tests/python5.test b/tests/python5.test
index 8acbdfe..c67d92b 100755
--- a/tests/python5.test
+++ b/tests/python5.test
@@ -32,7 +32,7 @@ $ACLOCAL
$AUTOCONF
$AUTOMAKE --add-missing
-./configure >stdout 2>stderr && {
+./configure >stdout 2>stderr && {
cat stdout
cat stderr >&2
Exit 1
diff --git a/tests/subobjname.test b/tests/subobjname.test
index 3f6f8a0..e585141 100755
--- a/tests/subobjname.test
+++ b/tests/subobjname.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2010, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2010, 2011, 2012 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -60,12 +60,12 @@ grep '^am_d_OBJECTS = ' Makefile.in
# Now the actual test. Are both values equal?
cobj=`sed -n '/^am_c_OBJECTS = / {
- s/.* = \(.*\)$/\1/
- p
+ s/.* = \(.*\)$/\1/
+ p
}' Makefile.in`
dobj=`sed -n '/^am_d_OBJECTS = / {
- s/^.* = \(.*\)$/\1/
- p
+ s/^.* = \(.*\)$/\1/
+ p
}' Makefile.in`
test "$cobj" = "$dobj"
diff --git a/tests/subst4.test b/tests/subst4.test
index ffa2b3a..b86a20e 100755
--- a/tests/subst4.test
+++ b/tests/subst4.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2008, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2008, 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
@@ -40,4 +40,5 @@ $AUTOMAKE
./configure
$MAKE foo
test -f foo
+
:
diff --git a/tests/substre2.test b/tests/substre2.test
index ec92062..1935622 100755
--- a/tests/substre2.test
+++ b/tests/substre2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2010, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010, 2011, 2012 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,15 +17,15 @@
# Test for bug in variable substitution references, where
# undefined variables break later substitutions.
-required=cc
. ./defs || Exit 1
cat >> configure.in << 'END'
-AC_PROG_CC
+AC_SUBST([CC], [whocares])
AC_OUTPUT
END
cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = no-dependencies
foo = foo.a foo.b $(doesnt_exist)
bar = bar.a bar.b
@@ -36,16 +36,15 @@ bin_PROGRAMS = foo
foo_SOURCES = $(var2)
OBJEXT = obj
-echorule:
- @echo BEG: $(foo_OBJECTS) :END
+.PHONY: test
+test:
+ is $(foo_OBJECTS) == foo1.obj foo4.obj bar3.obj bar4.obj
END
$ACLOCAL
$AUTOCONF
$AUTOMAKE -a
./configure
-$MAKE echorule >output || { cat output; Exit 1; }
-cat output
-$FGREP 'BEG: foo1.obj foo4.obj bar3.obj bar4.obj :END' output
+$MAKE test
:
diff --git a/tests/substref.test b/tests/substref.test
index 7b30423..a3088b0 100755
--- a/tests/substref.test
+++ b/tests/substref.test
@@ -18,24 +18,24 @@
# pattern is null.
# Report from Richard Boulton.
-required=cc
. ./defs || Exit 1
cat >> configure.in << 'END'
-AC_PROG_CC
+AC_SUBST([CC], [whocares])
AC_OUTPUT
END
-cat > hello.c << 'END'
-END
+: > hello.c
cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = no-dependencies
var1 = dlmain
var2 = $(var1:=.)
helldl_SOURCES = $(var2:=c)
bin_PROGRAMS = helldl
-got:
- @echo $(helldl_SOURCES) $(helldl_OBJECTS) >got
+.PHONY: test
+test:
+ is $(helldl_SOURCES) $(helldl_OBJECTS) == dlmain.c dlmain.$(OBJEXT)
END
$ACLOCAL
@@ -43,12 +43,7 @@ $AUTOCONF
$AUTOMAKE -a
./configure
-
-objext=`sed -n -e 's/^OBJEXT = //p' < Makefile`
-echo dlmain.c dlmain.$objext >exp
-$MAKE got
-cat got
-diff exp got
+$MAKE test
# This is unrelated to the rest of this test. But while we are
# at it, make sure we don't use am__helldl_SOURCES_DIST here, since
diff --git a/tests/tagsub.test b/tests/tagsub.test
index ca29406..7d449ea 100755
--- a/tests/tagsub.test
+++ b/tests/tagsub.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 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
@@ -16,7 +16,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Test to make sure tags and subdirs work correctly. Bug report by
-# François Pinard, and later by Akim Demaille.
+# François Pinard, and later by Akim Demaille.
required=etags
. ./defs || Exit 1
diff --git a/tests/tap-bad-prog.tap b/tests/tap-bad-prog.tap
index 212633f..b02e51a 100755
--- a/tests/tap-bad-prog.tap
+++ b/tests/tap-bad-prog.tap
@@ -23,7 +23,7 @@ am_parallel_tests=yes
fetch_tap_driver
-plan_ 5
+plan_ 6
cat >> configure.in <<END
AC_OUTPUT
@@ -78,9 +78,36 @@ else
command_ok_ "$desc" -- grep '^ERROR: noread\.test' stdout
fi
-# Check that no spurious test results is reported. This is lower-priority
-# (and in fact the check currently fails.
-command_ok_ 'no spurious results' -D TODO -r 'still get "missing plan"' \
+# Check that no spurious test result is reported. This is lower-priority
+# (and in fact the check currently fails for our awk-based driver).
+directive=
+if test $am_tap_implementation = shell; then
+ directive=TODO
+else
+ # Older versions of IPC::Open3 (e.g., version 1.05 on perl 5.12.4 or
+ # version 1.0103 on perl 5.6.2) fail to properly trap errors in exec(2)
+ # calls in the child process; hence, the TAP driver cannot be properly
+ # informed of such error.
+ if $PERL -w -e '
+ use IPC::Open3 qw/open3/;
+ $@ = "";
+ eval { open3(*STDIN, *STDOUT, *STDERR, "am--no-such-command") };
+ $@ =~ m/\bopen3:.*am--no-such-command/
+ or die "Bad \$@ value: \"address@hidden"\n";
+ '; then
+ : # OK. IPC::Open3 should be good enough.
+ else
+ for s in '"missing plan" message' 'results'; do
+ skip_ -r "IPC::Open3 not good enough" "no spurious $s"
+ done
+ Exit 0
+ fi
+fi
+
+command_ok_ 'no spurious "missing plan" message' \
+ -D "$directive" -- not grep 'missing.* plan' stdout
+command_ok_ 'no spurious results' \
+ -D "$directive" -r 'still get "missing plan"' \
count_test_results total=3 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=3
:
diff --git a/tests/tap-fancy2.test b/tests/tap-fancy2.test
index b661146..8080861 100755
--- a/tests/tap-fancy2.test
+++ b/tests/tap-fancy2.test
@@ -113,7 +113,7 @@ total=`expr $pass + $fail + $xfail + $xpass + $skip`
# Even nastier! But accordingly to the specifics, it should still work.
for result in 'ok' 'not ok'; do
- echo "${result}{[(<#${tab}TODO>)]}" >> all.test
+ echo "${result}{[(<#${tab}TODO>)]}" >> all.test
done
echo "ok{[(<#${tab}SKIP>)]}" >> all.test
diff --git a/tests/test-driver-custom-multitest-recheck2.test
b/tests/test-driver-custom-multitest-recheck2.test
index 94d8d3b..9f15d0e 100755
--- a/tests/test-driver-custom-multitest-recheck2.test
+++ b/tests/test-driver-custom-multitest-recheck2.test
@@ -105,7 +105,7 @@ for vpath in : false; do
done
unset var
- : a.test was sucessfull the first time, no need to re-run it.
+ : a.test was successful the first time, no need to re-run it.
$MAKE TESTS=a.test recheck >stdout || { cat stdout; Exit 1; }
cat stdout
count_test_results total=0 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=0
@@ -167,7 +167,7 @@ for vpath in : false; do
rm -f *.run *.err *.ok
: Nothing should be rerun anymore, as all tests have been eventually
- : succesful.
+ : successful.
$MAKE recheck >stdout || { cat stdout; Exit 1; }
cat stdout
count_test_results total=0 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=0
diff --git a/tests/test-driver-custom-no-extra-driver.test
b/tests/test-driver-custom-no-extra-driver.test
index 1196e77..18a94e4 100755
--- a/tests/test-driver-custom-no-extra-driver.test
+++ b/tests/test-driver-custom-no-extra-driver.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# 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
@@ -58,6 +58,7 @@ 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/tests/test-logs-repeated.test b/tests/test-logs-repeated.test
index 5ab3461..0bec579 100755
--- a/tests/test-logs-repeated.test
+++ b/tests/test-logs-repeated.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# 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
@@ -32,7 +32,7 @@ TEST_EXTENSIONS = .sh .test .bar
TESTS = foo.sh mu.test foo.test foo.bar
.PHONY: verify
verify:
- test "`echo $(TEST_LOGS)`" = 'foo.log mu.log foo.log foo.log'
+ is $(TEST_LOGS) == foo.log mu.log foo.log foo.log
END
$ACLOCAL
diff --git a/tests/test-metadata-recheck.test b/tests/test-metadata-recheck.test
index f3a3ef5..1d34ff1 100755
--- a/tests/test-metadata-recheck.test
+++ b/tests/test-metadata-recheck.test
@@ -158,6 +158,7 @@ for iteration in 1 2; do
ls -l
for t in $rechecked; do test -f $t.run; done
find . -name 'n-*.run' | grep . && Exit 1
+ : For shells with busted 'set -e'.
done
:
diff --git a/tests/txinfo21.test b/tests/txinfo21.test
index 8db1f2d..18740ba 100755
--- a/tests/txinfo21.test
+++ b/tests/txinfo21.test
@@ -25,7 +25,7 @@ cat >>configure.in <<\EOF
AC_CONFIG_FILES([rec/Makefile])
# At the time of writing, Autoconf does not supplies any of these
-# definitions (and those below are purposedly not those of the standard).
+# definitions (and those below are purposely not those of the standard).
AC_SUBST([dvidir], ['${datadir}/${PACKAGE}/dvi'])
AC_SUBST([htmldir], ['${datadir}/${PACKAGE}/html'])
AC_SUBST([pdfdir], ['${datadir}/${PACKAGE}/pdf'])
diff --git a/tests/werror3.test b/tests/werror3.test
index 33ad6f7..86e39ec 100755
--- a/tests/werror3.test
+++ b/tests/werror3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011, 2012 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -44,4 +44,5 @@ AUTOMAKE_JOBS=2
export AUTOMAKE_JOBS
AUTOMAKE_run -Wno-error
grep 'VAR multiply defined' stderr
+
:
diff --git a/tests/yacc-basic.test b/tests/yacc-basic.test
index aef08c1..ee153f4 100755
--- a/tests/yacc-basic.test
+++ b/tests/yacc-basic.test
@@ -62,6 +62,7 @@ test -f parse.c
if cross_compiling; then :; else
echo a | ./foo
echo b | ./foo && Exit 1
+ : For shells with busted 'set -e'.
fi
# The generated file `parse.c' must be shipped.
hooks/post-receive
--
GNU Automake
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.11-1875-gd5e4bc2,
Stefano Lattarini <=