[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-commit] [SCM] GNU Automake branch, branch-1.11, updated. v1.11
From: |
Stefano Lattarini |
Subject: |
[Automake-commit] [SCM] GNU Automake branch, branch-1.11, updated. v1.11.1-180-gc3a6212 |
Date: |
Thu, 12 Aug 2010 11:50:51 +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=c3a6212d098eed1649526564fb5269245989f5af
The branch, branch-1.11 has been updated
via c3a6212d098eed1649526564fb5269245989f5af (commit)
via d0dd88f36a8ccc9b3c7b799b0e95b55c98fee40d (commit)
via 39584250af1d57402795753de4008a8afd87334b (commit)
via 9ca2fc96af5d85f26848619ef1024c4bbfa9ebed (commit)
via c8668e07d0dfa0ad17634f36fda26eeecd2d770d (commit)
via 755ebe3254f669cc35cc10d1100a92d058f54048 (commit)
via f9fe878b53bca8297dbb6df861a99632f2f9b5b3 (commit)
via 4a709b8a432a4e5619e526c4c313902c834770b4 (commit)
via 4e06cfe8844feb35ff8007511e0270fb8ac2bf3d (commit)
via a03bb70a8903b1726168f43a99f55732907aef00 (commit)
via 6328f148f51cf748a07981915adb6e4b06c6f7c9 (commit)
via c92e890ce35a5f8bbdebf47aab38ee7c0b8daa66 (commit)
via 22dfae32e71dee267c5231a79b24426b18e3dd5e (commit)
via fbab1c8830e2dc05f01a72bebf989ada34af49ae (commit)
via d628025fd4ad5ce662a24a818ae97f1af7c0a7d3 (commit)
via cd5520e4395eda08ee9db9df8f31f1140acd55fe (commit)
via 103367103228d5ae88df7aace5c87c5e82d82e11 (commit)
via 6d316dd0ee1b478baa85896b6f6e05dc8ae240e3 (commit)
from dc445e9108829b3aac20aae279b69f0121168d13 (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 c3a6212d098eed1649526564fb5269245989f5af
Merge: dc445e9 d0dd88f
Author: Stefano Lattarini <address@hidden>
Date: Wed Aug 11 20:31:28 2010 +0200
Merge branch 'maint' into branch-1.11
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 286 +++++++++++++++++++++++++++++++
HACKING | 7 +-
bootstrap | 42 +----
tests/Makefile.am | 9 +-
tests/Makefile.in | 9 +-
tests/acloca14.test | 16 ++-
tests/acloca18.test | 6 +-
tests/acloca19.test | 4 +-
tests/aclocal.test | 8 +-
tests/aclocal5.test | 4 +-
tests/aclocal6.test | 8 +-
tests/aclocal8.test | 4 +-
tests/all.test | 25 +--
tests/{all.test => all2.test} | 27 +--
tests/ar.test | 4 +-
tests/ar2.test | 8 +-
tests/asm.test | 77 ++++-----
tests/asm2.test | 95 +++++------
tests/asm3.test | 90 ++++------
tests/colon.test | 10 +-
tests/colon2.test | 26 ++-
tests/colon3.test | 36 +++--
tests/colon4.test | 16 +-
tests/colon5.test | 27 +++-
tests/colon6.test | 27 +++-
tests/colon7.test | 16 +-
tests/condd.test | 6 +-
tests/condhook.test | 13 +-
tests/{condhook.test => condhook2.test} | 16 ++-
tests/condinc2.test | 4 +-
tests/condman.test | 14 +-
tests/condman2.test | 17 ++-
tests/{ansi.test => condman3.test} | 56 ++++---
tests/confdeps.test | 2 +-
tests/conff.test | 4 +-
tests/conff2.test | 10 +-
tests/confh.test | 50 +++---
tests/confh4.test | 13 +-
tests/confh5.test | 15 +-
tests/{config.test => confh6.test} | 9 +-
tests/{conf2.test => confh7.test} | 20 ++-
tests/configure.test | 31 ++---
tests/confincl.test | 19 +-
tests/conflnk.test | 14 +-
tests/conflnk2.test | 13 +-
tests/conflnk3.test | 23 ++--
tests/conflnk4.test | 17 +-
tests/confsub.test | 14 +-
tests/confvar.test | 8 +-
tests/confvar2.test | 8 +-
tests/depcomp.test | 5 +-
tests/depcomp2.test | 9 +-
tests/depcomp3.test | 9 +-
tests/depcomp4.test | 9 +-
tests/depcomp5.test | 11 +-
tests/depcomp6.test | 13 +-
tests/depcomp7.test | 16 ++-
tests/fpinst2.test | 33 ----
tests/fpinstall.test | 33 ----
tests/pr2.test | 16 ++-
tests/pr204.test | 11 +-
tests/pr211.test | 21 ++-
tests/pr220.test | 15 ++-
tests/pr224.test | 29 ++--
tests/pr229.test | 6 +-
tests/pr243.test | 37 +++--
tests/pr266.test | 30 ++--
tests/pr279-2.test | 27 ++-
tests/pr279.test | 21 ++-
tests/pr287.test | 15 +-
tests/pr300-lib.test | 6 +-
tests/pr300-ltlib.test | 6 +-
tests/pr300-prog.test | 6 +-
tests/pr307.test | 27 +++-
tests/pr401.test | 4 +-
tests/pr401b.test | 4 +-
tests/pr401c.test | 4 +-
tests/pr72.test | 14 +-
tests/pr87.test | 27 ++--
tests/pr9.test | 48 ++++--
tests/prefix.test | 8 +-
tests/primary.test | 8 +-
tests/primary2.test | 7 +-
tests/primary3.test | 4 +-
tests/proginst.test | 9 +-
tests/subobj.test | 4 +-
tests/subobj10.test | 8 +-
tests/subobj2.test | 6 +-
tests/subobj3.test | 17 +-
tests/subobj4.test | 15 +-
tests/subobj5.test | 17 +-
tests/subobj6.test | 12 +-
tests/subobj7.test | 8 +-
tests/subobj8.test | 27 ++--
tests/subobj9.test | 23 ++--
tests/subobjname.test | 4 +-
96 files changed, 1228 insertions(+), 744 deletions(-)
copy tests/{all.test => all2.test} (64%)
copy tests/{condhook.test => condhook2.test} (77%)
copy tests/{ansi.test => condman3.test} (57%)
rename tests/{config.test => confh6.test} (84%)
rename tests/{conf2.test => confh7.test} (83%)
delete mode 100755 tests/fpinst2.test
delete mode 100755 tests/fpinstall.test
diff --git a/ChangeLog b/ChangeLog
index cebefd9..02d90fc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,289 @@
+2010-08-10 Stefano Lattarini <address@hidden>
+
+ Tweak and/or extend some `acloca*.test' tests.
+ * tests/aclocal8.test: Ensure verbose printing of captured
+ output.
+ * tests/aclocal.test: Likewise. Also, add trailing `:'
+ command.
+ * tests/acloca19.test: Likewise.
+ * tests/aclocal5.test: Add trailing `:' command, and prefer
+ `$me' over hard-coded test name.
+ * tests/aclocal6.test: Likewise.
+ * tests/aclocal18.test: Add trailing `:' command, and make
+ some grepping slighty stricter.
+ * tests/acloca14.test: Likewise. Also, prefer `diff' over
+ `cmp', and add some "cosmetic" blank lines.
+
+2010-08-09 Stefano Lattarini <address@hidden>
+
+ Tweak and extend tests `pr[!0-9]*.test'.
+ * tests/primary3.test: Add trailing `:' command.
+ * tests/primary.test: Make grepping of Automake's stderr stricter.
+ Also, add trailing `:' command, and cosmetic changes in spacing.
+ * tests/primary2.test: Likewise.
+ * tests/prefix.test: Enable `errexit' shell flags, and related
+ changes. Add a trailing `:' command.
+ * tests/proginst.test: Likewise.
+
+ Modernize, improve and extend tests for PR (`pr[0-9]*.test').
+ * tests/pr2.test: Add trailing `:' command.
+ * tests/pr229.test: Likewise.
+ * tests/pr401.test: Likewise.
+ * tests/pr401b.test: Likewise.
+ * tests/pr401c.test: Likewise.
+ * tests/pr300-prog.test: Likewise, plus cosmetic changes in
+ spacing.
+ * tests/pr300-lib.test: Likewise.
+ * tests/pr300-ltlib.test: Likewise, and ensure verbose printing
+ of captured make stdout.
+ * tests/pr211.test: Add trailing `:' command. Also, use the
+ `configure.in' stub created by ./defs, rather than writing it
+ from scratch.
+ * tests/pr204.test: Likewise, plus cosmetic spacing changes.
+ * tests/pr287.test: Likewise, and move setting of `errexit' shell
+ flag earlier in the script (just after inclusion of ./defs).
+ * tests/pr220.test: Make grepping of Automake's stderr stricter.
+ Also, add trailing `:' command, and cosmetic changes in spacing.
+ * tests/pr224.test: Move setting of `errexit' shell flag earlier
+ in the script (just after inclusion of ./defs). Do not export
+ `CC=gcc' to configure explicitly (it's already exported globally
+ in ./defs, since we have "gcc" in $required). Use the stub for
+ `configure.in' created by ./defs, rather than writing it from
+ scratch. Do not create dummy files required by "gnu" mode (e.g.
+ README, NEWS), since we run automake in foreign mode anyway.
+ * tests/pr72.test: Enable `errexit' shell flags, and related
+ changes. Extend existing checks a bit.
+ * tests/pr9.test: Likewise. Also, avoid obolescent constructs in
+ the generated `configure.in', and extend existing checks over the
+ generated tarball a bit.
+ * tests/pr87.test: Enable `errexit' shell flags, and related
+ changes. Add a trailing `:' command. Also, do not create dummy
+ files required by "gnu" mode (e.g. README, NEWS), since we run
+ automake in foreign mode anyway.
+ * tests/pr243.test: Avoid obolescent constructs in the generated
+ `configure.in'. Enable the `errexit' shell flag, and related
+ changes. Cosmetic changes to spacing, add trailing `:' command,
+ and add a "FIXME" comment.
+ * tests/pr266.test: Likewise, and add explicit command line switch
+ `--enable-dependecy-tracking' to the ./configure call.
+ * tests/pr279.test: Avoid obolescent constructs in the generated
+ `configure.in'; also, use the `configure.in' stub created by
+ ./defs, rather than writing it from scratch. Enable `errexit'
+ shell flag, and related changes. Add trailing `:' command.
+ * tests/pr279-2.test: Likewise, and make grepping of Makefile.in
+ stricter.
+ * tests/pr307.test: Move setting of `errexit' shell flag earlier
+ in the script (just after inclusion of ./defs). Escape literal
+ dots in grep regular expressions. Also, add a trailing `:'
+ command, and cosmetic changes to spacing.
+
+ Tests for PR: add excerpts from original bug report, for clarity.
+ * tests/pr2.test: Ditto.
+ * tests/pr9.test: Likewise.
+ * tests/pr72.test: Likewise.
+ * tests/pr87.test: Likewise.
+ * tests/pr211.test: Likewise.
+ * tests/pr220.test: Likewise.
+ * tests/pr224.test: Likewise.
+ * tests/pr229.test: Likewise.
+ * tests/pr243.test: Likewise.
+ * tests/pr266.test: Likewise.
+ * tests/pr279.test: Likewise, and tell to keep it in sync
+ with its sister test.
+ * tests/pr279-2.test: Likewise.
+
+2010-08-08 Stefano Lattarini <address@hidden>
+
+ Tweak, extend and improve tests `cond[a-z]*.test'.
+ * tests/condd.test: Add trailing `:' command. Typofix in
+ comment.
+ * tests/condhook.test: Make sure target `install-data-hook' is
+ not called by `make install', but that data files are installed.
+ Use proper m4 quoting in configure.in. Add trailing `:' command.
+ * tests/condhook2.test: New test, sister test of condhook, with
+ inverted semantic.
+ * tests/condinc2.test: Use proper m4 quoting in configure.in.
+ Prefer trailing `:' command over trailing `Exit 0'.
+ * tests/condman2.test: Enable errexit shell flag, and related
+ changes. Add trailing `:' command.
+ * tests/condman.test: Likewise. Also, do not create useless
+ dummy manpages, and use proper m4 quoting in configure.in.
+ * tests/condman3.test: New test, similar to condman.test, but
+ it also runs ./configure and "make install", and check the
+ installed files.
+ * tests/Makefile.am (TESTS): Updated.
+
+ Modernize, improve and/or extend tests `colon*.test.
+ * tests/colon.test: Rely on the `configure.in' stub created by
+ `./defs', rather than writing one from scratch. Do not create
+ a useless dummy file. Add trailing `:' command.
+ * tests/colon4.test: Enable the `errexit' shell flag, and
+ related changes. Rely on the `configure.in' stub created by
+ `./defs', rather than writing one from scratch.
+ * tests/colon7.test: Enable `errexit' shell flag, and related
+ changes. Improve the generated `configure.in' file. Add
+ trailing `:' command.
+ * tests/colon2.test: Likewise. Also, add some new checks.
+ * tests/colon5.test: Improve the generated `configure.in' file.
+ Add new, much deeper checks. Add trailing `:' command.
+ * tests/colon6.test: Likewise.
+ * tests/colon3.test: Add trailing `:' command. Remove useless
+ comments and echos. Improve the generated `configure.in' file.
+ make some grepping tests stricter. Add a "FIXME" comments about
+ planned improvements.
+
+ Improve and extend tests `asm*.test'.
+ * tests/asm.test: Use configure.in stub generated by ./defs,
+ and avoid obsoleted autoconf constructs. Make grepping of
+ Automake stderr stricter. Do not create useless source file.
+ Improve verbose messages. Minor cosmetic changes. Tell to
+ keep it in sync with other sister tests asm*.test.
+ * tests/asm2.test: Likewise.
+ * tests/asm3.test: Likewise.
+
+ Modernize, improve and/or extend test scripts `conf*.test'.
+ * tests/confh5.test: Cosmetic changes.
+ * tests/conff.test: Likewise.
+ * tests/confdeps.test: Likewise.
+ * tests/conflnk.test: Likewise.
+ * tests/conflnk2.test: Likewise.
+ * tests/confsub.test: Likewise.
+ * tests/confvar.test: Likewise, and make grepping of Makefile.in
+ stricter.
+ * tests/confvar2.test: Likewise.
+ * tests/conflnk3.test: Cosmetic changes, and re-enable a temporarly
+ disabled test (which didn't work with autoconf <= 2.59, but now we
+ are requiring autoconf 2.62, so...)
+ * tests/conflnk4.test: Cosmetic changes, and extend existing tests
+ accordingly to "TODO" comments.
+ * tests/conff2.test: Make grepping of Automake's stderr stricter.
+ Add some comments explaining why we don't use the `configure.in'
+ stub preset be ./defs.
+ * tests/confh.test: Use the `configure.in' stub created by ./defs,
+ rather than writing one from scratch, and do not call AC_OUTPUT.
+ Enable `errexit' shell flag, and related changes. Prefer diff over
+ cmp to compare text files. Prefer perl over sed to fetch the value
+ of $(DIST_COMMON) from Makefile.in. Make grepping of the contents
+ of $(DIST_COMMON) stricter.
+ * tests/confh4.test: Use the `configure.in' stub created by ./defs,
+ rather than writing one from scratch. Make grepping of Makefile.in
+ stricter.
+ * tests/confh5.test: Make grepping of `config.h' stricter. Add a
+ comment.
+ * tests/configure.test: Avoid obsolescent constructs in generated
+ `configure.ac'. Do not write `configure.in' two times. Escape
+ literal dots in grep regular expressions.
+ * tests/confincl.test: Enable `errexit' shell flag, and related
+ changes. Prefer fgrep over grep. Other cosmetic changes.
+ * tests/config.test: Renamed to ...
+ * tests/confh6.test: ... this. Fix m4 quoting in `configure.in',
+ and make grepping of `config.h' and `config.h.in' stricter.
+ * tests/conf2.test: Renamed ...
+ * tests/confh7.test: ... to this. Use the `configure.in' stub
+ created by ./defs, rather than writing one from scratch. Try to
+ run the checks both with and without AC_PROG_CC and AC_OUTPUT in
+ `configure.in'.
+ * tests/Makefile.am (TESTS): Updated.
+
+ Minor improvements and fixes in tests `depcomp*.test'.
+ * tests/depcomp.test: Do not create useless dummy source files.
+ Add a trailing `:' command.
+ * tests/depcomp2.test: Use `unset' on the CFLAG variable to ensure
+ it's not in in the environment, rather tthan exporting it with an
+ empty value. Do not pass CC=gcc to configure, as that's already
+ done in ./defs since we have gcc in $required. Ensure verbose
+ printing of captured stderr, and normalize its checking. Add a
+ trailing `:' command.
+ * tests/depcomp3.test: Quote literal dots and dollar characters in
+ grep regexps. Always use `: >' rather than `touch' to create empty
+ files. Explicitly declare phony targets as such in the created
+ Makefile.am. Add a trailing `:' command.
+ * tests/depcomp4.test: Quote literal dots and dollar characters in
+ grep regexp. Explicitly declare phony targets as such in the
+ created Makefile.am. Ensure verbose printing of captured makes'
+ stoud/stderr. Add a trailing `:' command.
+ * tests/depcomp5.test: Move setting of `errexit' shell flag earlier
+ in the script (just after inclusion of ./defs). Quote literal dots
+ and dollar characters in grep regexps. Explicitly declare phony
+ targets as such in the created Makefile.am. Add a trailing `:'
+ command.
+ * tests/depcomp6.test: Consistenty use m4 quoting in the generated
+ configure.in. Cosmetic fixes to spacing. Make the "dummy" `if'
+ statement required by OpenBSD's sh `set -e' more robust, and add
+ explanatory comments to it.
+ * tests/depcomp7.test: Likewise, and add a trailing `:' command.
+
+ Separate failing part of test `all.test'.
+ * tests/all.test: Keep only (x)failing part of the test. Working
+ checks moved out to ...
+ * tests/all2.test: ... this new test.
+ * tests/Makefile.am (TESTS): Updated.
+
+ Modernize, improve and extend tests `subobj*.test'.
+ * tests/subobjname.test: Add trailing `:' command.
+ * tests/subobj.test: Make grepping of `Makefile.in' stricter.
+ Escape literal dots in grep regexps.
+ * tests/subobj2.test: Add trailing `:' command. Do not use the
+ unportable fgrep option `-e'.
+ * tests/subobj3.test: Add trailing `:' command.
+ (configure.in): Use proper m4 quoting, and avoid obsolescent
+ constructs.
+ * tests/subobj8.test: Likewise. Also, enable `errexit' shell
+ flag, with related changes
+ * tests/subobj4.test: Likewise. Also, make grepping of
+ `Makefile.in' stricter.
+ * tests/subobj5.test: Add trailing `:' command. Move setting of
+ `errexit' shell flag earlier in the script (just after inclusion
+ of ./defs).
+ (configure.in): Use the stub created by `./defs', rather than
+ writing it from scratch, and avoid obsolescent constructs.
+ * tests/subobj6.test: Add trailing `:' command. Move setting of
+ `errexit' shell flag earlier in the script (just after inclusion
+ of ./defs). Do not create useless dummy ac-init file `f'.
+ * tests/subobj7.test: Do not create useless dummy ac-init file
+ `f'.
+ (configure.in): Use the stub created by `./defs', rather than
+ writing it from scratch, and avoid obsolescent constructs.
+ * tests/subobj9.test: Move setting of `errexit' shell flag earlier
+ in the script (just after inclusion of ./defs). Fail the test if
+ `make distcheck' fails. Ensure verbose printing of captured make
+ stdout. Avoid uselsss fork by doing simple grep instead of using
+ test -n "`COMMAND | grep ...`".
+ (configure.in): Normalize the call to AC_INIT w.r.t. other tests.
+ (Makefile.am): Explicitly mark target "print" as phony.
+ * tests/subobj10.test: Removed duplicated call to `set -e'. Add
+ trailing `:' command.
+ (configure.in): Normalize the call to AC_INIT w.r.t. other tests.
+
+ Remove a couple of obsoleted tests.
+ * tests/fpinstall.test: Removed.
+ * tests/fpinst2.test: Likewise.
+ * tests/Makefile.am (TESTS): Updated.
+
+ Bootstrap: updated HACKING entry.
+ * HACKING ("Working with git"): Explain how to override the
+ autoconf and autom4te programs used by the bootstrap process.
+
+ Bootstrap: fixlet.
+ * bootstrap: Do not remove `lib/Automake/Config.pm' anymore,
+ since we don't generate it. Correctly quote arguments of
+ `eval' builtin. Fixed a botched error message. Removed an
+ extra blank line.
+
+ Bootstrap: don't search perl in $PATH.
+ * bootstrap: Do not explicitly search perl in $PATH anymore.
+ ($PATH_SEPARATOR): Removed, it's no more needed.
+
+ Bootstrap: let the user choose which autoconf to use.
+ * bootstrap ($AUTOCONF): New variable, from the environment.
+ ($AUTOM4TE): Likewise, for clarity.
+ Use "$AUTOCONF" instead of calling "autoconf" directly.
+
+ Minor improvements to tests ar*.test.
+ * tests/ar.test: Add trailing `:' command.
+ * tests/ar2.test: Likewise, and make grepping of generated
+ Makefile.in stricter.
+
2010-08-08 Ralf Wildenhues <address@hidden>
Fix maintainer-check failure.
diff --git a/HACKING b/HACKING
index 2e404f5..8480f7c 100644
--- a/HACKING
+++ b/HACKING
@@ -96,7 +96,12 @@
tree, so the resulting files (aclocal.m4 and Makefile.in) should
be the same as you would get if you install this version of
automake and use it to generate those files. Be sure to have the
- latest stable version of Autoconf installed.
+ latest stable version of Autoconf installed. If such version is
+ not installed as "autoconf", pass it explicitly (along with the
+ accompanying "autom4te") when calling `bootstrap' and `configure'.
+ For example:
+ $ AUTOCONF=autoconf2.65 AUTOM4TE=autom4te2.65 ./bootstrap
+ $ ./configure AUTOCONF=autoconf2.65 AUTOM4TE=autom4te2.65
* Dependent files aclocal.m4, configure and Makefile.in in all
directories should be up to date in the git repository, so that
diff --git a/bootstrap b/bootstrap
index 7766bd3..9f1a8d8 100755
--- a/bootstrap
+++ b/bootstrap
@@ -19,40 +19,18 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Find the path separator.
-# (Snippet copied from configure's initialization in Autoconf 2.65)
-if test "${PATH_SEPARATOR+set}" != set; then
- PATH_SEPARATOR=:
- (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
- (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
- PATH_SEPARATOR=';'
- }
-fi
-
# Don't ignore failures.
set -e
# Set program basename.
me=`echo "$0" | sed 's,^.*/,,'`
-# Find perl. Code based on Autoconf, but without non-POSIX support.
-if test -z "$PERL"; then
- save_IFS=$IFS
- IFS=$PATH_SEPARATOR
- for dir in $PATH; do
- IFS=$save_IFS
- test -z "$dir" && dir=.
- if test -x "$dir/perl" && test ! -d "$dir/perl"; then
- PERL="$dir/perl"
- break
- fi
- done
-fi
-
-if test -z "$PERL"; then
- echo "$me: cannot find perl" >&2
- exit 1
-fi
+# Let user choose which version of autoconf, autom4te and perl to use.
+: ${AUTOCONF=autoconf}
+export AUTOCONF # might be used by aclocal and/or automake
+: ${AUTOM4TE=autom4te}
+export AUTOM4TE # ditto
+: ${PERL=perl}
# Variables to substitute.
VERSION=`sed -ne '/AC_INIT/s/^[^[]*\[[^[]*\[\([^]]*\)\].*$/\1/p' configure.ac`
@@ -71,7 +49,7 @@ fi
# Read the rule for calculating APIVERSION and execute it.
apiver_cmd=`sed -ne 's/\[\[/[/g;s/\]\]/]/g;/^APIVERSION=/p' configure.ac`
-eval $apiver_cmd
+eval "$apiver_cmd"
# Sanity checks.
if test -z "$VERSION"; then
@@ -80,7 +58,7 @@ if test -z "$VERSION"; then
fi
if test -z "$APIVERSION"; then
- echo "$me: cannot find VERSION" >&2
+ echo "$me: cannot find APIVERSION" >&2
exit 1
fi
@@ -112,7 +90,6 @@ dosubst ()
chmod a-w $2
}
-
# Create temporary replacement for lib/Automake/Config.pm.
dosubst automake-$APIVERSION/Automake/Config.in \
automake-$APIVERSION/Automake/Config.pm
@@ -133,10 +110,9 @@ cd ..
# Run the autotools.
$PERL ./aclocal.tmp -I m4
-autoconf
+$AUTOCONF
$PERL ./automake.tmp
# Remove temporary files and directories.
rm -rf aclocal-$APIVERSION automake-$APIVERSION
rm -f aclocal.tmp automake.tmp
-rm -f lib/Automake/Config.pm
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 4fc4d15..0558149 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -69,6 +69,7 @@ acsilent.test \
acsubst.test \
acsubst2.test \
all.test \
+all2.test \
alloca.test \
alloca2.test \
alpha.test \
@@ -206,20 +207,22 @@ cond44.test \
cond45.test \
condd.test \
condhook.test \
+condhook2.test \
condinc.test \
condinc2.test \
condlib.test \
condman.test \
condman2.test \
+condman3.test \
configure.test \
-conf2.test \
confdeps.test \
conff.test \
conff2.test \
confh.test \
confh4.test \
confh5.test \
-config.test \
+confh6.test \
+confh7.test \
confincl.test \
conflnk.test \
conflnk2.test \
@@ -326,8 +329,6 @@ fort4.test \
fort5.test \
fonly.test \
fortdep.test \
-fpinst2.test \
-fpinstall.test \
gcj.test \
gcj2.test \
gcj3.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index cdcde8d..47e238b 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -307,6 +307,7 @@ acsilent.test \
acsubst.test \
acsubst2.test \
all.test \
+all2.test \
alloca.test \
alloca2.test \
alpha.test \
@@ -444,20 +445,22 @@ cond44.test \
cond45.test \
condd.test \
condhook.test \
+condhook2.test \
condinc.test \
condinc2.test \
condlib.test \
condman.test \
condman2.test \
+condman3.test \
configure.test \
-conf2.test \
confdeps.test \
conff.test \
conff2.test \
confh.test \
confh4.test \
confh5.test \
-config.test \
+confh6.test \
+confh7.test \
confincl.test \
conflnk.test \
conflnk2.test \
@@ -564,8 +567,6 @@ fort4.test \
fort5.test \
fonly.test \
fortdep.test \
-fpinst2.test \
-fpinstall.test \
gcj.test \
gcj2.test \
gcj3.test \
diff --git a/tests/acloca14.test b/tests/acloca14.test
index a4e86d7..1bdf7c7 100755
--- a/tests/acloca14.test
+++ b/tests/acloca14.test
@@ -29,6 +29,7 @@ END
echo 'm4_include([a.m4])' > acinclude.m4
echo 'm4_include([b.m4])' > a.m4
+
cat >b.m4 <<EOF
m4_include([c.m4])
AC_DEFUN([AM_PROG_LIBTOOL],
@@ -38,6 +39,7 @@ AC_REQUIRE([SOMETHING_ELSE])dnl
AC_DEFUN([SOMETHING])
EOF
+
echo 'm4_include([d.m4])' > c.m4
echo 'AC_DEFUN([SOMETHING_ELSE])' >d.m4
@@ -88,26 +90,32 @@ $sleep
cat >>c.m4 <<\EOF
AC_DEFUN([FOO], [ANOTHER_MACRO])
EOF
+
$MAKE
+
# Because c.m4 has changed, aclocal.m4 must have been rebuilt.
test `ls -1t aclocal.m4 stamp | sed 1q` = aclocal.m4
# However, since FOO is not used, f.m4 should not be included
# and the contents of aclocal.m4 should remain the same
-cmp aclocal.m4 stamp
-
+diff aclocal.m4 stamp
# If FOO where to be used, that would be another story, of course.
cat >>configure.in <<EOF
FOO
EOF
+
cp aclocal.m4 stamp
$sleep
+
$MAKE
-grep 'defs/f.m4' aclocal.m4
+
+$FGREP defs/f.m4 aclocal.m4
$MAKE testdist2
# Make sure aclocal diagnose missing included files with correct `file:line:'.
rm -f b.m4
$ACLOCAL 2>stderr && { cat stderr >&2; Exit 1; }
cat stderr >&2
-grep 'a.m4:1:.*b.m4.*does not exist' stderr
+grep 'a\.m4:1: .*b\.m4.*does not exist' stderr
+
+:
diff --git a/tests/acloca18.test b/tests/acloca18.test
index c38fac4..9826892 100755
--- a/tests/acloca18.test
+++ b/tests/acloca18.test
@@ -88,7 +88,7 @@ ACLOCAL_TESTSUITE_FLAGS='-I 4 -I 1 -I 2'
rm -f foo
$ACLOCAL --install 2>stderr && { cat stderr >&2; Exit 1; }
cat stderr >&2
-grep AM_MACRO2 stderr
+grep 'macro.*AM_MACRO2.*not found' stderr
ACLOCAL_TESTSUITE_FLAGS='-I 4 -I 1'
rm -f foo
@@ -115,4 +115,6 @@ cat stderr >&2
cat stdout
grep '#serial 456' stdout
test ! -f 4/m1.m4
-grep 'installing.*4/m1.m4' stderr
+grep 'installing.*4/m1\.m4' stderr
+
+:
diff --git a/tests/acloca19.test b/tests/acloca19.test
index accad81..a198d9a 100755
--- a/tests/acloca19.test
+++ b/tests/acloca19.test
@@ -41,9 +41,11 @@ END
$ACLOCAL
$AUTOCONF
-./configure >stdout
+./configure >stdout || { cat stdout; Exit 1; }
cat stdout
grep GREPME stdout
grep 'aconfig\.ac' aclocal.m4 && Exit 1
grep 'bconfig\.ac' aclocal.m4 && Exit 1
grep with-grepme configure
+
+:
diff --git a/tests/aclocal.test b/tests/aclocal.test
index d3437d2..da80d08 100755
--- a/tests/aclocal.test
+++ b/tests/aclocal.test
@@ -27,18 +27,20 @@ test -f fred
$ACLOCAL --output 2>stderr && { cat stderr >&2; Exit 1; }
cat stderr >&2
grep 'option.*--output.*an argument' stderr
-grep help stderr
+grep '[Tt]ry.*--help.*for more information' stderr
$ACLOCAL --unknown-option 2>stderr && { cat stderr >&2; Exit 1; }
cat stderr >&2
grep 'unrecognized.*--unknown-option' stderr
-grep help stderr
+grep '[Tt]ry.*--help.*for more information' stderr
$ACLOCAL --ver 2>stderr && { cat stderr >&2; Exit 1; }
cat stderr >&2
grep 'unrecognized.*--ver' stderr
-grep help stderr
+grep '[Tt]ry.*--help.*for more information' stderr
$ACLOCAL --versi
test "`$ACLOCAL --print-ac-dir`" = "$testaclocaldir"
+
+:
diff --git a/tests/aclocal5.test b/tests/aclocal5.test
index 5cd8231..b206587 100755
--- a/tests/aclocal5.test
+++ b/tests/aclocal5.test
@@ -60,7 +60,7 @@ grep GREPME sub/Makefile
# Make sure configure dependencies are distributed.
$MAKE distdir
-test -f aclocal5-1.0/m4/moredefs.m4
+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.
@@ -68,3 +68,5 @@ echo 'AC_DEFUN_ONCE([AM_TEST], [AC_SUBST(__$1__)])' >
m4/moredefs.m4
$MAKE
grep 'm4/moredefs\.m4' aclocal.m4
grep '__GREPME__' configure
+
+:
diff --git a/tests/aclocal6.test b/tests/aclocal6.test
index 266d64b..ea6bac3 100755
--- a/tests/aclocal6.test
+++ b/tests/aclocal6.test
@@ -75,9 +75,9 @@ grep METOO sub/Makefile
# Make sure configure dependencies are distributed.
$MAKE distdir
-test -f aclocal6-1.0/m4/moredefs.m4
-test -f aclocal6-1.0/m4/somedefs.m4
-test -f aclocal6-1.0/acinclude.m4
+test -f $me-1.0/m4/moredefs.m4
+test -f $me-1.0/m4/somedefs.m4
+test -f $me-1.0/acinclude.m4
# Make sure maintainer-clean works in VPATH builds.
# (This is unrelated to the rest of this test.)
@@ -89,3 +89,5 @@ $MAKE maintainer-clean
test ! -d ../autom4te.cache
test ! -f Makefile
test ! -f sub/Makefile
+
+:
diff --git a/tests/aclocal8.test b/tests/aclocal8.test
index ac10aff..d935f4f 100755
--- a/tests/aclocal8.test
+++ b/tests/aclocal8.test
@@ -34,9 +34,9 @@ EOF
echo 'AC_DEFUN([MACRO1],)' >m4/macro1.m4
echo 'AC_DEFUN([MACRO2], [AC_REQUIRE([AM_UNUSED_MACRO])])' >m4/macro2.m4
-$ACLOCAL -I m4 >output 2>&1
-cat output
+$ACLOCAL -I m4 >output 2>&1 || { cat output; Exit 1; }
test 0 = `wc -l <output`
grep macro1.m4 aclocal.m4
grep macro2.m4 aclocal.m4 && Exit 1
+
:
diff --git a/tests/all.test b/tests/all.test
index 3d761f4..791d081 100755
--- a/tests/all.test
+++ b/tests/all.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2007, 2010 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
@@ -14,30 +15,22 @@
# 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 all-local and other -local targets work correctly.
+# Test to make sure several *-local's in a single rule work.
. ./defs || Exit 1
+
set -e
targets='all install-exec install-data uninstall'
-for target in $targets; do
- echo "Doing $target"
- echo "${target}-local:" > Makefile.am
-
- $ACLOCAL
- $AUTOMAKE
-
- $FGREP "${target}-local ${target}-local" Makefile.in && Exit 1
-done
-
-# Several *-local's in a single rule.
-echo "Doing $targets"
echo "$targets:" | sed -e 's/[ :]/-local&/g' > Makefile.am
+cat Makefile.am # might be useful for debugging
+
$ACLOCAL
$AUTOMAKE
for target in $targets; do
- $EGREP "${target}-am:.*${target}-local" Makefile.in
+ grep "${target}-local" Makefile.in # might be useful for debugging
+ grep "${target}-am:.*${target}-local" Makefile.in
done
-Exit 0
+:
diff --git a/tests/all.test b/tests/all2.test
similarity index 64%
copy from tests/all.test
copy to tests/all2.test
index 3d761f4..38b6f8c 100755
--- a/tests/all.test
+++ b/tests/all2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2010 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,27 +17,18 @@
# Test to make sure all-local and other -local targets work correctly.
. ./defs || Exit 1
-set -e
-
-targets='all install-exec install-data uninstall'
-for target in $targets; do
- echo "Doing $target"
- echo "${target}-local:" > Makefile.am
- $ACLOCAL
- $AUTOMAKE
-
- $FGREP "${target}-local ${target}-local" Makefile.in && Exit 1
-done
+set -e
-# Several *-local's in a single rule.
-echo "Doing $targets"
-echo "$targets:" | sed -e 's/[ :]/-local&/g' > Makefile.am
$ACLOCAL
-$AUTOMAKE
+targets='all install-exec install-data uninstall'
for target in $targets; do
- $EGREP "${target}-am:.*${target}-local" Makefile.in
+ : Doing $target
+ echo "${target}-local:" > Makefile.am
+ $AUTOMAKE
+ grep "${target}-local ${target}-local" Makefile.in && Exit 1
+ grep "${target}-am:.*${target}-local" Makefile.in
done
-Exit 0
+:
diff --git a/tests/ar.test b/tests/ar.test
index d68fc54..dbdf246 100755
--- a/tests/ar.test
+++ b/tests/ar.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2010 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,3 +39,5 @@ $AUTOMAKE
$MAKE
grep 'it works' libfoo.a
grep 'really works' libfoo.a
+
+:
diff --git a/tests/ar2.test b/tests/ar2.test
index f0485ce..329f804 100755
--- a/tests/ar2.test
+++ b/tests/ar2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2004 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2010 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
@@ -34,5 +34,7 @@ END
$ACLOCAL
$AUTOMAKE
-grep 'ARFLAGS =' Makefile.in
-grep 'AR =' Makefile.in
+grep '^ARFLAGS =' Makefile.in
+grep '^AR =' Makefile.in
+
+:
diff --git a/tests/asm.test b/tests/asm.test
index 6c0aa3d..f1bcb76 100755
--- a/tests/asm.test
+++ b/tests/asm.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2010 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
@@ -14,31 +14,30 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Test of basic assembly functionality
+# Test of basic assembly functionality.
+# Keep this in sync with sister tests asm2.test and asm3.test.
. ./defs || Exit 1
set -e
+mv configure.in configure.stub
+
cat > Makefile.am << 'END'
noinst_PROGRAMS = maude
maude_SOURCES = maude.s
END
-: > maude.s
-
-# Should fail because we need CC and CCAS.
-echo 1
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+echo '*** Try 1 -- should fail because we need CC and CCAS ***'
+cat configure.stub - > configure.in << 'END'
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
END
$ACLOCAL
AUTOMAKE_fails
-grep AM_PROG_AS stderr
+grep '[Aa]ssembler source.*CCAS.* undefined' stderr
+grep 'define .*CCAS.* add .*AM_PROG_AS' stderr
# On fast machines the autom4te.cache created during the above run of
# $AUTOMAKE is likely to have the same time stamp as the configure.in
@@ -48,51 +47,42 @@ grep AM_PROG_AS stderr
# bogus installations of Autoconf use a versioned cache.)
rm -rf autom4te*.cache
-# We still need CCAS.
-echo 2
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 2 -- we still need CCAS ***'
+cat configure.stub - > configure.in << 'END'
AC_PROG_CC
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
END
$ACLOCAL
AUTOMAKE_fails
-grep CCAS stderr
-grep AM_PROG_AS stderr
+grep '[Aa]ssembler source.*CCAS.* undefined' stderr
+grep 'define .*CCAS.* add .*AM_PROG_AS' stderr
rm -rf autom4te*.cache
-# We need CCASFLAGS.
-echo 3
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 3 -- we need CCASFLAGS ***'
+cat configure.stub - > configure.in << 'END'
CCAS='$(CC)'
-AC_SUBST(CCAS)
+AC_SUBST([CCAS])
AC_PROG_CC
-AC_OUTPUT(Makefile)
+AC_OUTPUT
END
$ACLOCAL
AUTOMAKE_fails
-grep CCASFLAGS stderr
-grep AM_PROG_AS stderr
+grep '[Aa]ssembler source.*CCASFLAGS.* undefined' stderr
+grep 'define .*CCASFLAGS.* add .*AM_PROG_AS' stderr
rm -rf autom4te*.cache
-# We have every needed, expect a success.
-echo 4
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 4 -- we have everything needed, expect success ***'
+cat configure.stub - > configure.in << 'END'
CCAS='$(CC)'
-AC_SUBST(CCAS)
+AC_SUBST([CCAS])
AC_PROG_CC
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
END
$ACLOCAL
@@ -100,16 +90,13 @@ $AUTOMAKE
rm -rf autom4te*.cache
-# We have every needed, expect a success.
-echo 5
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 5 -- we have everything needed, expect success ***'
+cat configure.stub - > configure.in << 'END'
AM_PROG_AS
-AC_OUTPUT(Makefile)
+AC_OUTPUT
END
$ACLOCAL
$AUTOMAKE
-Exit 0
+:
diff --git a/tests/asm2.test b/tests/asm2.test
index 8afd4f9..ab141e7 100755
--- a/tests/asm2.test
+++ b/tests/asm2.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2006, 2010 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
@@ -14,31 +15,30 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Test of basic preprocessed assembly functionality
+# Test of basic preprocessed assembly functionality.
+# Keep this in sync with sister tests asm.test and asm3.test.
. ./defs || Exit 1
set -e
+mv configure.in configure.stub
+
cat > Makefile.am << 'END'
noinst_PROGRAMS = maude
maude_SOURCES = maude.S
END
-: > maude.s
-
-# Should fail because we need CC and CCAS.
-echo 1
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+echo '*** Try 1 -- should fail because we need CC and CCAS ***'
+cat configure.stub - > configure.in << 'END'
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
END
$ACLOCAL
AUTOMAKE_fails
-grep AM_PROG_AS stderr
+grep '[Aa]ssembler source.*CCAS.* undefined' stderr
+grep 'define .*CCAS.* add .*AM_PROG_AS' stderr
# On fast machines the autom4te.cache created during the above run of
# $AUTOMAKE is likely to have the same time stamp as the configure.in
@@ -48,70 +48,58 @@ grep AM_PROG_AS stderr
# bogus installations of Autoconf use a versioned cache.)
rm -rf autom4te*.cache
-# We still need CCAS.
-echo 2
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 2 -- we still need CCAS ***'
+cat configure.stub - > configure.in << 'END'
AC_PROG_CC
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
END
$ACLOCAL
AUTOMAKE_fails
-grep CCAS stderr
-grep AM_PROG_AS stderr
+grep '[Aa]ssembler source.*CCAS.* undefined' stderr
+grep 'define .*CCAS.* add .*AM_PROG_AS' stderr
rm -rf autom4te*.cache
-# We need CCASFLAGS.
-echo 3
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 3 -- we need CCASFLAGS ***'
+cat configure.stub - > configure.in << 'END'
CCAS='$(CC)'
-AC_SUBST(CCAS)
+AC_SUBST([CCAS])
AC_PROG_CC
-AC_OUTPUT(Makefile)
+AC_OUTPUT
END
$ACLOCAL
AUTOMAKE_fails
-grep CCASFLAGS stderr
-grep AM_PROG_AS stderr
+grep '[Aa]ssembler source.*CCASFLAGS.* undefined' stderr
+grep 'define .*CCASFLAGS.* add .*AM_PROG_AS' stderr
rm -rf autom4te*.cache
-# We need dependency tracking.
-echo 4
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 4 -- we need dependency tracking. ***'
+cat configure.stub - > configure.in << 'END'
CCAS='$(CC)'
-AC_SUBST(CCAS)
+AC_SUBST([CCAS])
AC_PROG_CC
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
END
$ACLOCAL
AUTOMAKE_fails
-grep AM_PROG_AS stderr
+grep ' add .*AM_PROG_AS' stderr
rm -rf autom4te*.cache
-# We have every needed, expect a success.
-echo 5
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 5 -- we have everything needed, expect success. ***'
+cat configure.stub - > configure.in << 'END'
CCAS='$(CC)'
-AC_SUBST(CCAS)
+AC_SUBST([CCAS])
AC_PROG_CC
-_AM_DEPENDENCIES(CCAS)
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+_AM_DEPENDENCIES([CCAS])
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
END
$ACLOCAL
@@ -119,16 +107,13 @@ $AUTOMAKE
rm -rf autom4te*.cache
-# We have every needed, expect a success.
-echo 6
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 6 -- we have everything needed, expect success. ***'
+cat configure.stub - > configure.in << 'END'
AM_PROG_AS
-AC_OUTPUT(Makefile)
+AC_OUTPUT
END
$ACLOCAL
$AUTOMAKE
-Exit 0
+:
diff --git a/tests/asm3.test b/tests/asm3.test
index 0738d6a..5c42c48 100755
--- a/tests/asm3.test
+++ b/tests/asm3.test
@@ -16,30 +16,29 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Test of basic preprocessed assembly functionality with extension .sx.
+# Keep this in sync with sister tests asm.test and asm2.test.
. ./defs || Exit 1
set -e
+mv configure.in configure.stub
+
cat > Makefile.am << 'END'
noinst_PROGRAMS = maude
maude_SOURCES = maude.sx
END
-: > maude.sx
-
-# Should fail because we need CC and CCAS.
-echo 1
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+echo '*** Try 1 -- should fail because we need CC and CCAS ***'
+cat configure.stub - > configure.in << 'END'
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
END
$ACLOCAL
AUTOMAKE_fails
-grep AM_PROG_AS stderr
+grep '[Aa]ssembler source.*CCAS.* undefined' stderr
+grep 'define .*CCAS.* add .*AM_PROG_AS' stderr
# On fast machines the autom4te.cache created during the above run of
# $AUTOMAKE is likely to have the same time stamp as the configure.in
@@ -49,70 +48,58 @@ grep AM_PROG_AS stderr
# bogus installations of Autoconf use a versioned cache.)
rm -rf autom4te*.cache
-# We still need CCAS.
-echo 2
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 2 -- we still need CCAS ***'
+cat configure.stub - > configure.in << 'END'
AC_PROG_CC
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
END
$ACLOCAL
AUTOMAKE_fails
-grep CCAS stderr
-grep AM_PROG_AS stderr
+grep '[Aa]ssembler source.*CCAS.* undefined' stderr
+grep 'define .*CCAS.* add .*AM_PROG_AS' stderr
rm -rf autom4te*.cache
-# We need CCASFLAGS.
-echo 3
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 3 -- we need CCASFLAGS ***'
+cat configure.stub - > configure.in << 'END'
CCAS='$(CC)'
-AC_SUBST(CCAS)
+AC_SUBST([CCAS])
AC_PROG_CC
-AC_OUTPUT(Makefile)
+AC_OUTPUT
END
$ACLOCAL
AUTOMAKE_fails
-grep CCASFLAGS stderr
-grep AM_PROG_AS stderr
+grep '[Aa]ssembler source.*CCASFLAGS.* undefined' stderr
+grep 'define .*CCASFLAGS.* add .*AM_PROG_AS' stderr
rm -rf autom4te*.cache
-# We need dependency tracking.
-echo 4
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 4 -- we need dependency tracking. ***'
+cat configure.stub - > configure.in << 'END'
CCAS='$(CC)'
-AC_SUBST(CCAS)
+AC_SUBST([CCAS])
AC_PROG_CC
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
END
$ACLOCAL
AUTOMAKE_fails
-grep AM_PROG_AS stderr
+grep ' add .*AM_PROG_AS' stderr
rm -rf autom4te*.cache
-# We have every needed, expect a success.
-echo 5
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 5 -- we have everything needed, expect success. ***'
+cat configure.stub - > configure.in << 'END'
CCAS='$(CC)'
-AC_SUBST(CCAS)
+AC_SUBST([CCAS])
AC_PROG_CC
-_AM_DEPENDENCIES(CCAS)
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+_AM_DEPENDENCIES([CCAS])
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
END
$ACLOCAL
@@ -120,16 +107,13 @@ $AUTOMAKE
rm -rf autom4te*.cache
-# We have every needed, expect a success.
-echo 6
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 6 -- we have everything needed, expect success. ***'
+cat configure.stub - > configure.in << 'END'
AM_PROG_AS
-AC_OUTPUT(Makefile)
+AC_OUTPUT
END
$ACLOCAL
$AUTOMAKE
-Exit 0
+:
diff --git a/tests/colon.test b/tests/colon.test
index da7a9da..22b5ed3 100755
--- a/tests/colon.test
+++ b/tests/colon.test
@@ -22,15 +22,15 @@
set -e
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile foo.h:foo.hin)
+cat >> configure.in <<'END'
+AC_CONFIG_FILES([foo.h:foo.hin])
+AC_OUTPUT
END
: > Makefile.am
: > foo.hin
-: > stamp-h.in
$ACLOCAL
$AUTOMAKE
+
+:
diff --git a/tests/colon2.test b/tests/colon2.test
index ebb2bfe..a52dfa8 100755
--- a/tests/colon2.test
+++ b/tests/colon2.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2000, 2001, 2002, 2010 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
@@ -18,18 +19,23 @@
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile:zardoz.in)
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile:zardoz.in])
+AC_OUTPUT
END
-: > zardoz.am
+echo 'dummy:' > zardoz.am
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
# We actually check several things here.
-test -f zardoz.in || Exit 1
+test -f zardoz.in
grep '^zardoz:' zardoz.in && Exit 1
-Exit 0
+grep '^dummy:' zardoz.in
+
+:
diff --git a/tests/colon3.test b/tests/colon3.test
index 6fed8b9..151d015 100755
--- a/tests/colon3.test
+++ b/tests/colon3.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2010 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,10 +22,11 @@
set -e
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile:zardoz.in:two.in:three.in)
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile:zardoz.in:two.in:three.in])
+AC_OUTPUT
END
: > zardoz.am
@@ -35,21 +36,26 @@ END
$ACLOCAL
$AUTOMAKE
-# We actually check several things here.
# Automake should have created zardoz.in.
test -f zardoz.in
# The generated file should refer to zardoz.in and zardoz.am, but
# never just "zardoz".
-echo Grep1
-grep zardoz zardoz.in | $FGREP -v 'zardoz.in' | $FGREP -v 'zardoz.am' > O || :
-# We cat the output file so we see in when verbose.
-cat O
-test -z "`cat O`"
-
+sed -e 's|zardoz\.am|zrdz.am|g' \
+ -e 's|zardoz\.in|zrdz.in|g' \
+ <zardoz.in | $FGREP 'zardoz' && Exit 1
+
+# FIXME: Do something like this after planned enahncements to tests/defs.
+# FIXME: Or even do proper functional testing.
+## Also, Makefile should depend on two.in and three.in.
+# extract_makefile_deps Makefile zardoz.in > deps
+#$FGREP ' $(srcdir)/two.in ' deps
+#$FGREP ' $(srcdir)/three.in ' deps
+#
+# FIXME: for the moment, we content ourselves with these inferior tests.
# Makefile should depend on two.in.
-echo Grep2
grep '^Makefile:.* \$(srcdir)/two.in' zardoz.in
# Likewise three.in.
-echo Grep3
grep '^Makefile:.* \$(srcdir)/three.in' zardoz.in
+
+:
diff --git a/tests/colon4.test b/tests/colon4.test
index cec3c86..97a4479 100755
--- a/tests/colon4.test
+++ b/tests/colon4.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2000, 2001, 2002, 2010 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
@@ -20,10 +21,11 @@
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile zardoz:one:two:three)
+set -e
+
+cat >> configure.in <<END
+AC_CONFIG_FILES([zardoz:two:three])
+AC_OUTPUT
END
: > Makefile.am
@@ -31,8 +33,8 @@ END
: > two
: > three
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
# The rule should regenerate the file "zardoz".
grep '^zardoz:one:two' Makefile.in && Exit 1
diff --git a/tests/colon5.test b/tests/colon5.test
index fe97f99..c53910e 100755
--- a/tests/colon5.test
+++ b/tests/colon5.test
@@ -21,16 +21,31 @@
set -e
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile:Makefile.in:Makefile.dep)
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile:Makefile.in:Makefile.dep])
+AC_OUTPUT
END
-: > Makefile.am
: > Makefile.dep
+cat > Makefile.am <<'END'
+.PHONY: test
+test:
+ case ' $(DIST_COMMON) ' in \
+ *' $(srcdir)/Makefile.dep '*|*' Makefile.dep '*) exit 0;; \
+ *) exit 1;; \
+ esac
+END
+
$ACLOCAL
$AUTOMAKE
-grep 'Makefile:Makefile.in' Makefile.in
+grep 'Makefile:Makefile\.in' Makefile.in
+grep '^Makefile:.* \$(srcdir)/Makefile\.dep' Makefile.in
+
+sed '/@SET_MAKE@/d' <Makefile.in >Makefile.sed
+$MAKE -f Makefile.sed SHELL=$SHELL test
+
+:
diff --git a/tests/colon6.test b/tests/colon6.test
index 99877c5..4fb738e 100755
--- a/tests/colon6.test
+++ b/tests/colon6.test
@@ -21,16 +21,33 @@
set -e
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(demo/Makefile demo/version.good:demo/version.gin)
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([demo/Makefile demo/version.good:demo/version.gin])
+AC_OUTPUT
END
mkdir demo
-: > demo/Makefile.am
: > demo/version.gin
+cat > demo/Makefile.am <<'END'
+.PHONY: test
+test:
+ case ' $(DIST_COMMON) ' in \
+ *' $(srcdir)/version.gin '*) exit 0;; \
+ *) exit 1;; \
+ esac
+END
+
$ACLOCAL
$AUTOMAKE
+
+$EGREP 'Makefile:.*(demo|version)' demo/Makefile.in && Exit 1
+grep 'version\.good:.*version\.gin' demo/Makefile.in
+
+sed '/@SET_MAKE@/d' <demo/Makefile.in >Makefile.sed
+$MAKE -f Makefile.sed SHELL=$SHELL test
+
+:
diff --git a/tests/colon7.test b/tests/colon7.test
index 4df6a13..4195188 100755
--- a/tests/colon7.test
+++ b/tests/colon7.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2000, 2001, 2002, 2010 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
@@ -19,9 +20,12 @@
. ./defs || Exit 1
+set -e
+
cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+AC_INIT([colon7], [1.0])
+AM_INIT_AUTOMAKE
+dnl: Please do not add proper m4 quoting here.
AC_OUTPUT(subdir/bar:subdir/foo \
Makefile \
subdir/Makefile
@@ -34,8 +38,8 @@ mkdir subdir
: > subdir/Makefile.am
: > subdir/foo
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
# shouldn't have any bar.in
grep 'bar.in' subdir/Makefile.in && Exit 1
@@ -43,4 +47,4 @@ grep 'bar.in' subdir/Makefile.in && Exit 1
# DIST_COMMON should have foo, not subdir/foo
grep 'DIST_COMMON.*subdir/foo' subdir/Makefile.in && Exit 1
-Exit 0
+:
diff --git a/tests/condd.test b/tests/condd.test
index 0e9b6e8..b70d691 100755
--- a/tests/condd.test
+++ b/tests/condd.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2010 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,7 +23,7 @@ set -e
cat >> configure.in << 'END'
AC_PROG_CC
dnl Define a macro with the same name as the conditional to exhibit
-dnl any underquotted bug.
+dnl any underquoted bug.
AC_DEFUN([COND1], ["some'meaningless;characters`])
AM_CONDITIONAL([COND1], false)
AC_CONFIG_FILES([foo/Makefile])
@@ -68,3 +68,5 @@ grep "meaningless;characters" configure && Exit 1
$AUTOMAKE
./configure
$MAKE test
+
+:
diff --git a/tests/condhook.test b/tests/condhook.test
index 06fa887..bf9225b 100755
--- a/tests/condhook.test
+++ b/tests/condhook.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2004, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2007, 2010 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,6 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Test install when a conditional install-*-hook is not defined.
+# Keep this in sync with sister test condhook2.test.
# Report by Nik A. Melchior (PR/428).
. ./defs || Exit 1
@@ -22,7 +23,7 @@
set -e
cat >> configure.in << 'END'
-AM_CONDITIONAL(TEST, false)
+AM_CONDITIONAL([TEST], [false])
AC_OUTPUT
END
@@ -30,7 +31,7 @@ cat > Makefile.am << 'END'
sysconf_DATA = mumble
if TEST
install-data-hook:
- echo foo
+ : > $(top_srcdir)/bad
endif
END
@@ -39,5 +40,11 @@ END
$ACLOCAL
$AUTOCONF
$AUTOMAKE
+
./configure --prefix "`pwd`/inst"
+
$MAKE install
+test -f inst/etc/mumble
+test ! -f bad
+
+:
diff --git a/tests/condhook.test b/tests/condhook2.test
similarity index 77%
copy from tests/condhook.test
copy to tests/condhook2.test
index 06fa887..45e2d43 100755
--- a/tests/condhook.test
+++ b/tests/condhook2.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2004, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2010 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
@@ -14,15 +14,15 @@
# 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 install when a conditional install-*-hook is not defined.
-# Report by Nik A. Melchior (PR/428).
+# Test install when a conditional install-*-hook is defined.
+# Keep this in sync with sister test condhook.test.
. ./defs || Exit 1
set -e
cat >> configure.in << 'END'
-AM_CONDITIONAL(TEST, false)
+AM_CONDITIONAL([TEST], [true])
AC_OUTPUT
END
@@ -30,7 +30,7 @@ cat > Makefile.am << 'END'
sysconf_DATA = mumble
if TEST
install-data-hook:
- echo foo
+ : > $(top_srcdir)/good
endif
END
@@ -39,5 +39,11 @@ END
$ACLOCAL
$AUTOCONF
$AUTOMAKE
+
./configure --prefix "`pwd`/inst"
+
$MAKE install
+test -f inst/etc/mumble
+test -f good
+
+:
diff --git a/tests/condinc2.test b/tests/condinc2.test
index 088fb55..9001028 100755
--- a/tests/condinc2.test
+++ b/tests/condinc2.test
@@ -21,7 +21,7 @@
set -e
cat >> configure.in << 'END'
-AM_CONDITIONAL(TOBE, false)
+AM_CONDITIONAL([TOBE], [false])
END
cat > Makefile.am << 'END'
@@ -39,3 +39,5 @@ END
$ACLOCAL
AUTOMAKE_fails
grep 'adjunct:3: too many conditionals closed' stderr
+
+:
diff --git a/tests/condman.test b/tests/condman.test
index 3dc8bcd..ee2d41b 100755
--- a/tests/condman.test
+++ b/tests/condman.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2010 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,10 +15,13 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Make sure conditionals work with man pages.
+
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
-AM_CONDITIONAL(FRED, true)
+AM_CONDITIONAL([FRED], [true])
END
cat > Makefile.am << 'END'
@@ -29,8 +32,7 @@ man_MANS = joe.1
endif
END
-: > foo.1
-: > joe.1
-
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
+
+:
diff --git a/tests/condman2.test b/tests/condman2.test
index 0b448e2..c0e7216 100755
--- a/tests/condman2.test
+++ b/tests/condman2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2010 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,16 +15,21 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Make sure appropriate man install targets generated in all cases.
+
. ./defs || Exit 1
+set -e
+
cat > Makefile.am << 'END'
man_MANS = foo.1 foo.2
man5_MANS = foo.5
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
+
+grep '^install-man1:' Makefile.in
+grep '^install-man2:' Makefile.in
+grep '^install-man5:' Makefile.in
-grep '^install-man1:' Makefile.in || Exit 1
-grep '^install-man2:' Makefile.in || Exit 1
-grep '^install-man5:' Makefile.in || Exit 1
+:
diff --git a/tests/ansi.test b/tests/condman3.test
similarity index 57%
copy from tests/ansi.test
copy to tests/condman3.test
index c0778c6..ff93daf 100755
--- a/tests/ansi.test
+++ b/tests/condman3.test
@@ -1,6 +1,5 @@
#! /bin/sh
-# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2010 Free
-# Software Foundation, Inc.
+# Copyright (C) 2010 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,41 +14,52 @@
# 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 bug where ansi2knr.c is not included in distribution.
-# From François Pinard.
+# Make sure conditionals work with man pages.
. ./defs || Exit 1
set -e
-cat > Makefile.am << 'END'
-AUTOMAKE_OPTIONS = ansi2knr
-.PHONY: test1 test2
-test1:
- echo ' $(DISTFILES) ' | grep ' ansi2knr\.c '
- echo ' $(DISTFILES) ' | grep ' ansi2knr\.1 '
-test2: distdir
- test -f $(distdir)/ansi2knr.c
- test -f $(distdir)/ansi2knr.1
-END
-
cat >> configure.in << 'END'
-AM_C_PROTOTYPES
+AM_CONDITIONAL([COND], [test x"$FOO" = x"true"])
AC_OUTPUT
END
-: > ansi2knr.c
-: > ansi2knr.1
+cat > Makefile.am << 'END'
+if COND
+man_MANS = foo.1
+else
+man_MANS = bar.2
+endif
+
+.PHONY: test1 test2
+test1:
+ test -f $(mandir)/man1/foo.1
+ test ! -f $(mandir)/man2/bar.2
+test2:
+ test ! -f $(mandir)/man1/foo.1
+ test -f $(mandir)/man2/bar.2
+END
$ACLOCAL
$AUTOMAKE
-
-$FGREP -v @SET_MAKE@ Makefile.in > Makefile.sed
-$MAKE -f Makefile.sed SHELL=$SHELL test1
-
$AUTOCONF
-./configure
+
+mkdir dir1
+cd dir1
+../configure FOO=true --prefix="`pwd`/_inst"
+sed -n '/man_MANS/p' Makefile # useful for debugging
+: > foo.1
+$MAKE install
$MAKE test1
+
+cd ..
+mkdir dir2
+cd dir2
+../configure FOO=false --prefix="`pwd`/_inst"
+sed -n '/man_MANS/p' Makefile # useful for debugging
+: > bar.2
+$MAKE install
$MAKE test2
:
diff --git a/tests/confdeps.test b/tests/confdeps.test
index 8e1cc64..b09f816 100755
--- a/tests/confdeps.test
+++ b/tests/confdeps.test
@@ -36,4 +36,4 @@ mv -f aclocal.m4t aclocal.m4
$AUTOMAKE
grep '^\$(ACLOCAL_M4):' Makefile.in && Exit 1
-Exit 0
+:
diff --git a/tests/conff.test b/tests/conff.test
index 353cb8e..dc6677c 100755
--- a/tests/conff.test
+++ b/tests/conff.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010 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
@@ -93,3 +93,5 @@ grep 'bot2 rule' stdout
cd ..
$MAKE distcheck
+
+:
diff --git a/tests/conff2.test b/tests/conff2.test
index 0c53067..a0101e1 100755
--- a/tests/conff2.test
+++ b/tests/conff2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010 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
@@ -20,6 +20,8 @@
set -e
+# We avoid using configure.in stub initialized by ./defs, since we need
+# to keep track of line numbers (to grep for error messages).
cat > configure.in << END
AC_INIT([$me], [1.0])
AM_INIT_AUTOMAKE
@@ -30,5 +32,7 @@ END
$ACLOCAL
AUTOMAKE_fails
-grep 'configure.in:3:.*AC_CONFIG_FILES' stderr
-grep 'configure.in:4:.*AC_CONFIG_HEADERS' stderr
+grep 'configure\.in:3:.* arguments .*AC_CONFIG_FILES' stderr
+grep 'configure\.in:4:.* arguments .*AC_CONFIG_HEADERS' stderr
+
+:
diff --git a/tests/confh.test b/tests/confh.test
index 772a763..552ce5c 100755
--- a/tests/confh.test
+++ b/tests/confh.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2000, 2001, 2002, 2006 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2006, 2010 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
@@ -19,11 +20,10 @@
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AM_CONFIG_HEADER(include/config.h)
-AC_OUTPUT(Makefile include/Makefile)
+set -e
+
+cat >> configure.in << 'END'
+AM_CONFIG_HEADER([include/config.h])
END
: > Makefile.am
@@ -33,24 +33,26 @@ mkdir include
: > include/Makefile.am
: > include/config.h.in
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
-
-(sed -n -e '/^DIST_COMMON =.*\\$/ {
- :loop
- p
- n
- t clear
- :clear
- s/\\$/\\/
- t loop
- p
- n
- }' -e '/^DIST_COMMON =/ p' Makefile.in | grep acconfig.h) || Exit 1
+$ACLOCAL
+$AUTOMAKE
+
+perl -ne '
+if (s/^DIST_COMMON *=//)
+{
+ $_ .= <> while (s/\\$//);
+ $_ = " $_ ";
+ s/\s+/ /g;
+ print "$_\n";
+ exit 0;
+}' Makefile.in > dc.txt
+cat dc.txt # might be useful for debugging.
+$FGREP ' acconfig.h ' dc.txt
# Make sure re-running automake in a different way generates same
# Makefile.in.
-mv Makefile.in save
-$ACLOCAL || Exit 1
-$AUTOMAKE Makefile || Exit 1
-cmp Makefile.in save
+mv Makefile.in Makefile.sav
+$ACLOCAL
+$AUTOMAKE Makefile
+diff Makefile.sav Makefile.in
+
+:
diff --git a/tests/confh4.test b/tests/confh4.test
index 6fd4a07..bab2d53 100755
--- a/tests/confh4.test
+++ b/tests/confh4.test
@@ -27,12 +27,11 @@
set -e
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AM_CONFIG_HEADER(include/config.h)
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([include/Makefile])
+AM_CONFIG_HEADER([include/config.h])
AC_PROG_CC
-AC_OUTPUT(Makefile include/Makefile)
+AC_OUTPUT
END
cat > Makefile.am << 'END'
@@ -50,4 +49,6 @@ mkdir include
$ACLOCAL
$AUTOMAKE
-$EGREP '^DEFAULT_INCLUDES =.* -I(\.|\$\(top_builddir\))/include' Makefile.in
+grep '^DEFAULT_INCLUDES =.* -I\$(top_builddir)/include' Makefile.in
+
+:
diff --git a/tests/confh5.test b/tests/confh5.test
index febe000..9af83dc 100755
--- a/tests/confh5.test
+++ b/tests/confh5.test
@@ -21,14 +21,15 @@
set -e
cat >> configure.in << 'END'
-AC_SUBST([FOO], [name])
-AC_CONFIG_FILES(include/config.h.in)
-AC_CONFIG_HEADERS(config.h)
-AC_CONFIG_HEADERS(include/config.h)
+AC_SUBST([FOO], [NameToBeGrepped])
+AC_CONFIG_FILES([include/config.h.in])
+AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_HEADERS([include/config.h])
AC_OUTPUT
END
cat > Makefile.am << 'END'
+.PHONY: test
test: distdir
test -f $(distdir)/config.h.in
test -f $(distdir)/include/config.h.in.in
@@ -51,6 +52,10 @@ $MAKE
$sleep
echo '#undef @FOO@' > include/config.h.in.in
$MAKE include/config.h
-grep '/\*.*#undef.*name' include/config.h
+# Don't try to be too strict in this grepping, since the substutition
+# is done by config.status, and we don't have too much control on it.
+grep '/\*.*#undef.*NameToBeGrepped' include/config.h
$MAKE test
$MAKE distcheck
+
+:
diff --git a/tests/config.test b/tests/confh6.test
similarity index 84%
rename from tests/config.test
rename to tests/confh6.test
index bed9a92..de55be7 100755
--- a/tests/config.test
+++ b/tests/confh6.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2000, 2001, 2002, 2003, 2010 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
@@ -24,7 +25,7 @@ required=GNUmake
set -e
cat >> configure.in << 'END'
-AM_CONFIG_HEADER(subdir/config.h)
+AM_CONFIG_HEADER([subdir/config.h])
AC_OUTPUT
END
@@ -39,8 +40,8 @@ $AUTOMAKE
$MAKE
$sleep
-echo '#define FOO' > subdir/config.h.in
+echo '#define gRePmE' > subdir/config.h.in
$MAKE subdir/config.h
-grep FOO subdir/config.h
+$FGREP gRePmE subdir/config.h
$MAKE distcheck
diff --git a/tests/conf2.test b/tests/confh7.test
similarity index 83%
rename from tests/conf2.test
rename to tests/confh7.test
index 8e53733..3d0e54a 100755
--- a/tests/conf2.test
+++ b/tests/confh7.test
@@ -21,12 +21,8 @@
set -e
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AM_CONFIG_HEADER(config.h two.h)
-AC_PROG_CC
-AC_OUTPUT(Makefile)
+cat >> configure.in << 'END'
+AM_CONFIG_HEADER([config.h two.h])
END
: > Makefile.am
@@ -36,3 +32,15 @@ END
$ACLOCAL
$AUTOMAKE
+
+# Try again with more macros.
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_OUTPUT
+END
+
+$ACLOCAL --force
+$AUTOMAKE
+
+:
diff --git a/tests/configure.test b/tests/configure.test
index 838da68..0773a00 100755
--- a/tests/configure.test
+++ b/tests/configure.test
@@ -21,45 +21,36 @@
set -e
-cat >configure.ac <<\EOF
-AC_INIT
-AM_INIT_AUTOMAKE([configure], [1.0])
+cat >configure.ac <<EOF
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
EOF
cat >configure.in <<EOF
-AC_INIT([configure], [1.0])
+AC_INIT([$me], [1.0])
AM_INIT_AUTOMAKE([an-invalid-automake-option])
AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
-EOF
-
-cat >configure.in <<EOF
-AC_INIT([configure], [1.0])
-AM_INIT_AUTOMAKE([an-invalid-automake-option])
-AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
EOF
: >Makefile.am
$ACLOCAL 2>stderr && { cat stderr >&2; Exit 1; }
cat stderr >&2
-grep 'configure.ac.*configure.in.*both present' stderr
+grep 'configure\.ac.*configure\.in.*both present' stderr
$ACLOCAL -Wno-error 2>stderr || { cat stderr >&2; Exit 1; }
cat stderr >&2
-grep 'configure.ac.*configure.in.*both present' stderr
-grep 'proceeding.*configure.ac' stderr
+grep 'configure\.ac.*configure\.in.*both present' stderr
+grep 'proceeding.*configure\.ac' stderr
# Ensure we really proceed with configure.ac.
AUTOMAKE_fails -Werror
-grep 'configure.ac.*configure.in.*both present' stderr
-grep 'proceeding.*configure.ac' stderr
+grep 'configure\.ac.*configure\.in.*both present' stderr
+grep 'proceeding.*configure\.ac' stderr
AUTOMAKE_run 0 -Wno-error
-grep 'configure.ac.*configure.in.*both present' stderr
-grep 'proceeding.*configure.ac' stderr
+grep 'configure\.ac.*configure\.in.*both present' stderr
+grep 'proceeding.*configure\.ac' stderr
:
diff --git a/tests/confincl.test b/tests/confincl.test
index dd0b63e..c4f0cde 100755
--- a/tests/confincl.test
+++ b/tests/confincl.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010 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
@@ -20,18 +20,19 @@
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_CC
END
-cat > Makefile.am << 'EOF'
+cat > Makefile.am << 'END'
bin_PROGRAMS = fred
-EOF
+END
+
+$ACLOCAL
+$AUTOMAKE
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$FGREP '@CONFIG_INCLUDE_SPEC@' Makefile.in && Exit 1
-if grep '@CONFIG_INCLUDE_SPEC@' Makefile.in; then
- Exit 1
-fi
-Exit 0
+:
diff --git a/tests/conflnk.test b/tests/conflnk.test
index 6bc5970..8dfafbc 100755
--- a/tests/conflnk.test
+++ b/tests/conflnk.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010 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
@@ -29,12 +29,12 @@ mkdir sdir
mkdir sdir-no-make
cat >>configure.in << 'EOF'
-AC_CONFIG_FILES(sdir/Makefile)
-AC_CONFIG_LINKS(dest:src)
-AC_CONFIG_LINKS(dest2:src)
-AC_CONFIG_LINKS(sdir/dest3:src)
-AC_CONFIG_LINKS(dest4:sdir/src2)
-AC_CONFIG_LINKS(sdir/dest5:sdir/src2 sdir-no-make/dest6:src)
+AC_CONFIG_FILES([sdir/Makefile])
+AC_CONFIG_LINKS([dest:src])
+AC_CONFIG_LINKS([dest2:src])
+AC_CONFIG_LINKS([sdir/dest3:src])
+AC_CONFIG_LINKS([dest4:sdir/src2])
+AC_CONFIG_LINKS([sdir/dest5:sdir/src2 sdir-no-make/dest6:src])
AC_OUTPUT
EOF
diff --git a/tests/conflnk2.test b/tests/conflnk2.test
index 8a045be..8c68c38 100755
--- a/tests/conflnk2.test
+++ b/tests/conflnk2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010 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,7 @@ set -e
cat > Makefile.am << 'END'
SUBDIRS = sdir
+.PHONY: test
test: distdir
test -f $(distdir)/src
test -f $(distdir)/src2
@@ -42,10 +43,10 @@ mkdir sdir-no-make
: > sdir-no-make/src4
cat >>configure.in << 'EOF'
-AC_CONFIG_FILES(sdir/Makefile)
-AC_CONFIG_LINKS(dest:src)
-AC_CONFIG_LINKS(sdir/dest2:src2 sdir-no-make/dest3:sdir/src3)
-AC_CONFIG_LINKS(sdir/dest4:sdir-no-make/src4)
+AC_CONFIG_FILES([sdir/Makefile])
+AC_CONFIG_LINKS([dest:src])
+AC_CONFIG_LINKS([sdir/dest2:src2 sdir-no-make/dest3:sdir/src3])
+AC_CONFIG_LINKS([sdir/dest4:sdir-no-make/src4])
AC_OUTPUT
EOF
@@ -54,3 +55,5 @@ $AUTOMAKE
$AUTOCONF
./configure
$MAKE test
+
+:
diff --git a/tests/conflnk3.test b/tests/conflnk3.test
index 00e9da2..20f4786 100755
--- a/tests/conflnk3.test
+++ b/tests/conflnk3.test
@@ -23,6 +23,7 @@ set -e
cat > Makefile.am << 'END'
SUBDIRS = sdir
+.PHONY: test
test: distdir
test ! -r $(distdir)/sdir/dest3
test ! -r $(distdir)/sdir/dest2
@@ -41,16 +42,16 @@ mkdir sdir
: > sdir/src3
cat >>configure.in << 'EOF'
-AC_CONFIG_FILES(sdir/Makefile)
+AC_CONFIG_FILES([sdir/Makefile])
my_src_dir=sdir
my_dest=dest
-AC_CONFIG_LINKS(sdir/dest2:src2 sdir/dest3:$my_src_dir/src3)
-AC_CONFIG_LINKS($my_dest:src)
+AC_CONFIG_LINKS([sdir/dest2:src2 sdir/dest3:$my_src_dir/src3])
+AC_CONFIG_LINKS([$my_dest:src])
# the following is a link whose source is itself a link
-AC_CONFIG_LINKS(dest4:sdir/dest2)
+AC_CONFIG_LINKS([dest4:sdir/dest2])
# Some package prefer to compute links.
cmplink='dest5:src';
-AC_CONFIG_LINKS($cmplink)
+AC_CONFIG_LINKS([$cmplink])
AC_OUTPUT
EOF
@@ -79,9 +80,9 @@ test -r dest5 # ditto
rm -f dest dest5
test ! -r dest4
-## Cannot do the following, because at the time of writing Autoconf
-## (2.59) does not support AC_CONFIG_LINKS source in the build tree.
-# mkdir build
-# cd build
-# ../configure
-# $MAKE test
+mkdir build
+cd build
+../configure
+$MAKE test
+
+:
diff --git a/tests/conflnk4.test b/tests/conflnk4.test
index 4bedf52..fd96054 100755
--- a/tests/conflnk4.test
+++ b/tests/conflnk4.test
@@ -34,17 +34,20 @@ mkdir nonmk-subdir sdir sdir/mk-subdir
cat >> Makefile.am <<'EOF'
SUBDIRS = sdir
+.PHONY: test
test: distdir
test -f $(distdir)/src
test -f $(distdir)/sdir/src2
+ test -f $(distdir)/nonmk-subdir/src3
+ test -f $(distdir)/sdir/mk-subdir/src4
EOF
cat >>configure.in << 'EOF'
-AC_CONFIG_FILES(sdir/Makefile)
-AC_CONFIG_LINKS(src:src)
-AC_CONFIG_LINKS(sdir/src2:sdir/src2)
-AC_CONFIG_LINKS(nonmk-subdir/src3:nonmk-subdir/src3)
-AC_CONFIG_LINKS(sdir/mk-subdir/src4:sdir/mk-subdir/src4)
+AC_CONFIG_FILES([sdir/Makefile])
+AC_CONFIG_LINKS([src:src])
+AC_CONFIG_LINKS([sdir/src2:sdir/src2])
+AC_CONFIG_LINKS([nonmk-subdir/src3:nonmk-subdir/src3])
+AC_CONFIG_LINKS([sdir/mk-subdir/src4:sdir/mk-subdir/src4])
AC_OUTPUT
EOF
@@ -56,7 +59,6 @@ mkdir build
cd build
../configure
-# TODO: Make sure links are distributed
$MAKE test
# Make sure nothing is deleted by `make clean'
@@ -84,7 +86,6 @@ test -r sdir/mk-subdir/src4 && Exit 1
cd ..
./configure
-# TODO: Make sure links are distributed
$MAKE test
# Make sure nothing is deleted by `make distclean'
@@ -94,3 +95,5 @@ test -f src
test -f sdir/src2
test -f nonmk-subdir/src3
test -f sdir/mk-subdir/src4
+
+:
diff --git a/tests/confsub.test b/tests/confsub.test
index 65ec91b..a0d4fe3 100755
--- a/tests/confsub.test
+++ b/tests/confsub.test
@@ -39,8 +39,8 @@ END
echo 'Before.' > subdir/config.hin
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
# Make sure subdir Makefile.in doesn't itself look in the subdir.
# One line is allowed though:
@@ -49,11 +49,13 @@ $AUTOMAKE || Exit 1
($FGREP 'subdir/config.h' subdir/Makefile.in |
$FGREP -v 'cd $(top_builddir)') && Exit 1
-$AUTOCONF || Exit 1
-./configure || Exit 1
+$AUTOCONF
+./configure
$FGREP 'Before.' subdir/config.h
$sleep
echo 'After.' > subdir/config.hin
-$MAKE || Exit 1
-$FGREP 'After.' subdir/config.h || Exit 1
+$MAKE
+$FGREP 'After.' subdir/config.h
+
+:
diff --git a/tests/confvar.test b/tests/confvar.test
index 99811b0..13cc7dd 100755
--- a/tests/confvar.test
+++ b/tests/confvar.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010 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
@@ -21,7 +21,7 @@
set -e
cat >> configure.in << 'END'
-AC_SUBST(QBERT)
+AC_SUBST([QBERT])
END
: > Makefile.am
@@ -29,4 +29,6 @@ END
$ACLOCAL
$AUTOMAKE
-grep '^QBERT' Makefile.in
+grep '^QBERT =' Makefile.in
+
+:
diff --git a/tests/confvar2.test b/tests/confvar2.test
index 75c02dc..1cfd2d3 100755
--- a/tests/confvar2.test
+++ b/tests/confvar2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010 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
@@ -21,7 +21,7 @@
set -e
cat >> configure.in << 'END'
-AC_SUBST(OTHER_SCRIPTS)
+AC_SUBST([OTHER_SCRIPTS])
END
cat > Makefile.am << 'END'
@@ -30,3 +30,7 @@ END
$ACLOCAL
$AUTOMAKE
+
+grep '^OTHER_SCRIPTS =' Makefile.in
+
+:
diff --git a/tests/depcomp.test b/tests/depcomp.test
index 8b9be29..d5b6c78 100755
--- a/tests/depcomp.test
+++ b/tests/depcomp.test
@@ -40,12 +40,11 @@ END
cp subdir/Makefile.am subdir2/Makefile.am
-: > subdir/foo.c
-: > subdir2/foo.c
-
$ACLOCAL
$AUTOMAKE --add-missing
# There used to be a bug where this was created in the first subdir with C
# sources in it instead of in $top_srcdir or $ac_auxdir
test -f depcomp
+
+:
diff --git a/tests/depcomp2.test b/tests/depcomp2.test
index 2b4353c..e8e4a67 100755
--- a/tests/depcomp2.test
+++ b/tests/depcomp2.test
@@ -43,11 +43,12 @@ END
: > subdir/foo.c
# Ignore user CFLAGS.
-CFLAGS=
-export CFLAGS
+unset CFLAGS || :
$ACLOCAL
$AUTOMAKE --add-missing
$AUTOCONF
-./configure CC='gcc' 2>error.log
-test -z "`cat error.log`"
+./configure 2>stderr || { cat stderr >&2; Exit 1; }
+test ! -s stderr
+
+:
diff --git a/tests/depcomp3.test b/tests/depcomp3.test
index 2a5db60..513a01d 100755
--- a/tests/depcomp3.test
+++ b/tests/depcomp3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010 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,14 +32,15 @@ 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
+ grep 'src/sub\.\$(OBJEXT).*:' src/$(DEPDIR)/sub.Po
END
mkdir src
-touch src/foo.h
+: > src/foo.h
cat >src/sub.c <<EOF
#include "foo.h"
@@ -60,3 +61,5 @@ 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
index 7d22894..4f2df97 100755
--- a/tests/depcomp4.test
+++ b/tests/depcomp4.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010 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
@@ -31,8 +31,9 @@ cat > Makefile.am << 'END'
noinst_LTLIBRARIES = liba.la
liba_la_SOURCES = a.c foo.h
+.PHONY: grepdeps
grepdeps:
- grep 'a.lo *:' ./$(DEPDIR)/a.Plo
+ grep 'a\.lo *:' ./$(DEPDIR)/a.Plo
END
: > foo.h
@@ -51,7 +52,9 @@ $AUTOMAKE -a
grep am_cv_CC_dependencies_compiler_type configure
./configure am_cv_CC_dependencies_compiler_type=makedepend
-$MAKE >output 2>&1
+$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
index 9637288..9a4e1b1 100755
--- a/tests/depcomp5.test
+++ b/tests/depcomp5.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2010 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
@@ -19,6 +19,8 @@
required='icc'
. ./defs || Exit 1
+set -e
+
# 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
@@ -27,8 +29,6 @@ else
expect='depmode=gcc'
fi
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_CC_C_O
@@ -40,8 +40,9 @@ 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
+ grep 'src/sub\.\$(OBJEXT).*:' src/$(DEPDIR)/sub.Po
END
@@ -66,3 +67,5 @@ $AUTOMAKE -a
grep "$expect" Makefile
$MAKE check
$MAKE grepdeps
+
+:
diff --git a/tests/depcomp6.test b/tests/depcomp6.test
index 0b6a7f5..7fc651f 100755
--- a/tests/depcomp6.test
+++ b/tests/depcomp6.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2006 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2010 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
@@ -24,7 +24,7 @@ cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_RANLIB
-AC_CONFIG_FILES(sub2/Makefile)
+AC_CONFIG_FILES([sub2/Makefile])
AC_OUTPUT
END
@@ -86,7 +86,7 @@ $AUTOCONF
$AUTOMAKE -a
./configure --enable-dependency-tracking
-$MAKE
+$MAKE
# check that dependency tracking works
if grep 'depmode=none' Makefile; then :
@@ -94,6 +94,11 @@ else
cd sub2
$sleep
echo 'choke me' > sub3/ba3.h
- if $MAKE; then Exit 1; fi
+ # 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
fi
+
:
diff --git a/tests/depcomp7.test b/tests/depcomp7.test
index 67702c7..695041a 100755
--- a/tests/depcomp7.test
+++ b/tests/depcomp7.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2007, 2010 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
@@ -25,7 +25,7 @@ cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_CC_C_O
AM_PROG_LIBTOOL
-AC_CONFIG_FILES(sub2/Makefile)
+AC_CONFIG_FILES([sub2/Makefile])
AC_OUTPUT
END
@@ -88,8 +88,9 @@ $AUTOCONF
$AUTOMAKE -a
for staticshared in --disable-shared "" --disable-static; do
+
./configure --enable-dependency-tracking $staticshared
- $MAKE
+ $MAKE
# check that dependency tracking works
if grep 'depmode=none' Makefile; then :
@@ -97,7 +98,11 @@ for staticshared in --disable-shared "" --disable-static; do
cd sub2
$sleep
echo 'choke me' > sub3/ba3.h
- if $MAKE; then Exit 1; fi
+ # 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
cd ..
fi
@@ -106,4 +111,7 @@ for staticshared in --disable-shared "" --disable-static; do
test ! -f sub2/sub3/ba3.d
echo 'extern int x;' > sub2/sub3/ba3.h
+
done
+
+:
diff --git a/tests/fpinst2.test b/tests/fpinst2.test
deleted file mode 100755
index c6b4900..0000000
--- a/tests/fpinst2.test
+++ /dev/null
@@ -1,33 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1996, 1998, 2000, 2001, 2002 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 "reversed" order of AC_PROG_INSTALL and
-# AC_PROG_INSTALL is not buggy.
-
-. ./defs || Exit 1
-
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile)
-END
-
-cat > Makefile.am <<'END'
-bin_SCRIPTS = zot
-END
-
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
diff --git a/tests/fpinstall.test b/tests/fpinstall.test
deleted file mode 100755
index 6c645eb..0000000
--- a/tests/fpinstall.test
+++ /dev/null
@@ -1,33 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1996, 1998, 2000, 2001, 2002 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 bug reported by Thomas Morgan. If both AC_PROG_INSTALL and
-# AC_PROG_INSTALL appear in configure.in, bad error results.
-
-. ./defs || Exit 1
-
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile)
-END
-
-cat > Makefile.am <<'END'
-bin_SCRIPTS = zot
-END
-
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
diff --git a/tests/pr2.test b/tests/pr2.test
index 258a8ef..ceb2729 100755
--- a/tests/pr2.test
+++ b/tests/pr2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2006 Free Software
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2006, 2010 Free Software
# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
@@ -16,11 +16,23 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Test for bug reported in PR 2.
+# "make dist" fails for AC_OUTPUT(README.foo:templ/README.foo.in).
+#
+# == Report ==
+# When my AC_OUTPUT macro in configure.in contains something
+# like the following (among the Makefiles)
+# README.foo:templ/README.foo.in
+# the generated dist target in the Makefile.in fails,
+# because DIST_COMMON will contain templ/README.foo.in
+# and the dist target will try to copy templ/README.foo.in
+# to the distribution directory before it creates a templ
+# subdirectory in the distribution directory.
. ./defs || Exit 1
set -e
+# Please keep this underquoted and old-style.
cat > configure.in << 'END'
AC_INIT
AM_INIT_AUTOMAKE(nonesuch, nonesuch)
@@ -38,3 +50,5 @@ $AUTOMAKE
./configure
$MAKE distdir
test -f nonesuch-nonesuch/templ/README.foo.in
+
+:
diff --git a/tests/pr204.test b/tests/pr204.test
index 2944449..22a1e54 100755
--- a/tests/pr204.test
+++ b/tests/pr204.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004, 2010 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,13 +22,10 @@ required='bison gcc'
set -e
-cat > configure.in <<'EOF'
-AC_INIT(pr204, 0.1)
-AM_INIT_AUTOMAKE
+cat >> configure.in <<'EOF'
AM_MAINTAINER_MODE
AC_PROG_CC
AC_PROG_YACC
-AC_CONFIG_FILES(Makefile)
AC_OUTPUT
EOF
@@ -64,8 +61,10 @@ cp parse.y parse2.y
$ACLOCAL
$AUTOCONF
$AUTOMAKE -a
+
./configure
$MAKE distdirtest
+
# Make sure parse.c and parse2.c are still targets.
$MAKE parse.c parse2.c
test -f parse.c
@@ -78,3 +77,5 @@ touch parse.y
$sleep
$MAKE parse.c parse2.c
test `ls -1t parse.c parse.y | sed 1q` = parse.c
+
+:
diff --git a/tests/pr211.test b/tests/pr211.test
index 9344fd2..6778f7a 100755
--- a/tests/pr211.test
+++ b/tests/pr211.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2010 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,18 +15,27 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Test for PR 211.
+#
+# == Description ==
+# Suppose you have a library and an ltlibrary in the same
+# directory which use the same source:
+#
+# libfoo_la_SOURCES = foo.c
+# libbar_a_SOURCES = foo.c
+#
+# In this case foo.c will be compiled twice but using different
+# compilers. This is a conflict. In this case the user should
+# rename one of the `foo.o's.
required=libtoolize
. ./defs || Exit 1
set -e
-cat > configure.in << 'END'
-AC_INIT(Makefile.am)
-AM_INIT_AUTOMAKE(hello,0.23)
+cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_LIBTOOL
-AC_OUTPUT(Makefile)
+AC_OUTPUT
END
cat > Makefile.am << 'END'
@@ -40,3 +49,5 @@ libtoolize
$ACLOCAL
AUTOMAKE_fails -a
$FGREP 'foo.$(OBJEXT)' stderr
+
+:
diff --git a/tests/pr220.test b/tests/pr220.test
index 25e1f0e..95212ab 100755
--- a/tests/pr220.test
+++ b/tests/pr220.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2004, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2008, 2010 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,13 +16,19 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Test for PR automake/220.
+# Test for problems when conditionals are not actually defined.
+# Check that the problems is diagnosed by configure.
+# This isn't perfect (ideally we'd like an error from autoconf),
+# but it is the best we can do. It certainly makes it easier
+# to debug the problem.
+# Note that this should be also in the documentation.
required=gcc
. ./defs || Exit 1
set -e
-cat >main.c <<EOF
+cat > main.c <<'EOF'
int main() { return 0; }
EOF
@@ -57,4 +64,6 @@ cd build
# configure should fail since we've done something invalid.
../configure 2>stderr && { cat stderr >&2; Exit 1; }
cat stderr >&2
-grep NEVER_TRUE stderr
+grep 'conditional.*NEVER_TRUE' stderr
+
+:
diff --git a/tests/pr224.test b/tests/pr224.test
index fdcb997..00a7aad 100755
--- a/tests/pr224.test
+++ b/tests/pr224.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2010 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
@@ -14,11 +14,20 @@
# 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 $(top_srcdir) with dependencies.
+# Test for PR automake/224: $(top_srcdir) w.r.t. dependencies.
+#
+# == Description ==
+# Dependency tracking data should be stored in in the relative path
+# of the source file, as opposed the object file.
+# I.e., for `foo.c' in `$(top_srcdir)/bar', being built in
+# `$(top_srcdir)/build', the location of the `.deps' directory
+# should be `$(top_builddir)/bar/.deps'.
required=gcc
. ./defs || Exit 1
+set -e
+
mkdir foo
cat >foo/main.c <<'EOF'
@@ -31,30 +40,24 @@ bin_PROGRAMS = bar
bar_SOURCES = foo/main.c
EOF
-cat >configure.in <<'EOF'
-AC_INIT(foo/main.c)
-AC_CONFIG_AUX_DIR(.)
-AM_INIT_AUTOMAKE(test_am, 1.0)
+cat >>configure.in <<'EOF'
AC_PROG_CC
AM_PROG_CC_C_O
-AC_OUTPUT(Makefile)
+AC_OUTPUT
EOF
-touch README NEWS AUTHORS ChangeLog
-
mkdir build
-set -e
-
$ACLOCAL
$AUTOCONF
$AUTOMAKE -a
cd build
-CC='gcc' ../configure
-$MAKE
+../configure
+$MAKE
test -d foo/.deps
$MAKE distclean
test -d foo/.deps && Exit 1
+
:
diff --git a/tests/pr229.test b/tests/pr229.test
index a97ef4f..0d3f153 100755
--- a/tests/pr229.test
+++ b/tests/pr229.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2010 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
@@ -14,6 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# Test for PR automake/229.
# Make sure AC_CYGWIN requires config.{sub,guess}.
# Reported by James Youngman.
@@ -29,5 +30,8 @@ EOF
$ACLOCAL
$AUTOMAKE -a
+
test -f config.sub
test -f config.guess
+
+:
diff --git a/tests/pr243.test b/tests/pr243.test
index a5e869e..58fb2a8 100755
--- a/tests/pr243.test
+++ b/tests/pr243.test
@@ -15,30 +15,45 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Test for PR 243.
+# AM_OUTPUT_DEPENDENCY_COMMANDS doesn't handle
+# `Makefile:Makefile.in:tail.mk' in AC_OUTPUT.
+#
+# == Report ==
+# If configure.in has something like:
+# AC_OUTPUT(Makefile:Makefile.in:tail.mk)
+# then config.status cannot parse the Makefile to build the
+# dependency files in the .deps directory. This is because
+# the AM_OUTPUT_DEPENDENCY_COMMANDS macro cannot cope with
+# the colon in the CONFIG_FILES variable.
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT(foo, 0.1, address@hidden)
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
+set -e
+
+cat > configure.in << END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
AC_PROG_CC
-AC_CONFIG_FILES(Makefile:Makefile.in:tail.mk)
+AC_CONFIG_FILES([Makefile:Makefile.in:tail.mk])
AC_OUTPUT
END
: > tail.mk
cat > Makefile.am << 'END'
-include_HEADERS = 3dfx.h linutil.h
-noinst_HEADERS = fx64.h fxdll.h fximg.h fxglob.h \
- fxos.h fxver.h glob.h
+include_HEADERS = 3dfx.h linutil.h
+noinst_HEADERS = fx64.h fxdll.h fximg.h fxglob.h \
+ fxos.h fxver.h glob.h
noinst_PROGRAMS = fxmisc
-fxmisc_SOURCES = fx64.c fximg.c fxos.c linutil.c
+fxmisc_SOURCES = fx64.c fximg.c fxos.c linutil.c
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
-$AUTOCONF || Exit 1
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+# FIXME: require compiler in $required rather than skipping here
./configure || Exit $?
test -f .deps/fx64.Po
+
+:
diff --git a/tests/pr266.test b/tests/pr266.test
index a1cd2fe..2bace6f 100755
--- a/tests/pr266.test
+++ b/tests/pr266.test
@@ -15,28 +15,34 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Test for PR 266.
+# Dependency tracking -vs- nonstandard Makefile names
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT(foo, 0.1, address@hidden)
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
+set -e
+
+cat > configure.in << END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
AC_PROG_CC
-AC_CONFIG_FILES(Maudefile)
+AC_CONFIG_FILES([Maudefile])
AC_OUTPUT
END
cat > Maudefile.am << 'END'
-include_HEADERS = 3dfx.h linutil.h
-noinst_HEADERS = fx64.h fxdll.h fximg.h fxglob.h \
- fxos.h fxver.h glob.h
+include_HEADERS = 3dfx.h linutil.h
+noinst_HEADERS = fx64.h fxdll.h fximg.h fxglob.h \
+ fxos.h fxver.h glob.h
noinst_PROGRAMS = fxmisc
-fxmisc_SOURCES = fx64.c fximg.c fxos.c linutil.c
+fxmisc_SOURCES = fx64.c fximg.c fxos.c linutil.c
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
-$AUTOCONF || Exit 1
-./configure || Exit $?
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+# FIXME: require compiler in $required rather than skipping here
+./configure --enable-dependency-tracking || Exit $?
test -f .deps/fx64.Po
+
+:
diff --git a/tests/pr279-2.test b/tests/pr279-2.test
index 286e33a..f4e6fb2 100755
--- a/tests/pr279-2.test
+++ b/tests/pr279-2.test
@@ -15,15 +15,22 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Another test related to PR 279.
+# Multiple DEPENDENCIES on conditionals.
+# Please keep this in sync with sister test pr279.test.
+#
+# == Report ==
+# When defining xxx_LDADD and xxx_DEPENDENCIES variables where the
+# xxx_LDADD one contains values set in conditionals, automake will
+# fail with messages like:
+# foo_DEPENDENCIES was already defined in condition TRUE, ...
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT(foo, 0.1, address@hidden)
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
+set -e
+
+cat >> configure.in << 'END'
AC_PROG_CC
-AM_CONDITIONAL(FOOTEST, false)
-AC_CONFIG_FILES(Makefile)
+AM_CONDITIONAL([FOOTEST], [false])
AC_OUTPUT
END
@@ -37,8 +44,10 @@ endif
bin_PROGRAMS = foo
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
+
+grep 'address@hidden@foo_DEPENDENCIES *= *zardoz$' Makefile.in
+grep 'address@hidden@foo_DEPENDENCIES *= *maude$' Makefile.in
-grep '@foo_DEPENDENCIES = zardoz' Makefile.in || Exit 1
-grep '@foo_DEPENDENCIES = maude' Makefile.in || Exit 1
+:
diff --git a/tests/pr279.test b/tests/pr279.test
index 50dff53..d658668 100755
--- a/tests/pr279.test
+++ b/tests/pr279.test
@@ -15,15 +15,22 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Test for PR 279.
+# Multiple DEPENDENCIES on conditionals.
+# Please keep this in sync with sister test pr279-2.test.
+#
+# == Report ==
+# When defining xxx_LDADD and xxx_DEPENDENCIES variables where the
+# xxx_LDADD one contains values set in conditionals, automake will
+# fail with messages like:
+# foo_DEPENDENCIES was already defined in condition TRUE, ...
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT(foo, 0.1, address@hidden)
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
+set -e
+
+cat >> configure.in << 'END'
AC_PROG_CC
-AM_CONDITIONAL(FOOTEST, false)
-AC_CONFIG_FILES(Makefile)
+AM_CONDITIONAL([FOOTEST], [false])
AC_OUTPUT
END
@@ -39,5 +46,7 @@ foo_LDADD = ${xtralib}
foo_DEPENDENCIES =
END
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
+
+:
diff --git a/tests/pr287.test b/tests/pr287.test
index 58553b5..3a6f902 100755
--- a/tests/pr287.test
+++ b/tests/pr287.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2007, 2010 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
@@ -18,11 +18,10 @@
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT(foo, 0.1, address@hidden)
-AM_INIT_AUTOMAKE
+set -e
+
+cat >> configure.in << 'END'
AC_PROG_CC
-AC_CONFIG_FILES(Makefile)
AC_OUTPUT
END
@@ -38,13 +37,15 @@ END
chmod +x foo
-set -e
-
mkdir install
$ACLOCAL
$AUTOCONF
$AUTOMAKE -a
+
./configure "--prefix=`cd install && pwd`"
+
$MAKE
$MAKE distdir
+
+:
diff --git a/tests/pr300-lib.test b/tests/pr300-lib.test
index 3d2fde5..ee46b4b 100755
--- a/tests/pr300-lib.test
+++ b/tests/pr300-lib.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2007, 2010 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,7 +46,9 @@ END
$ACLOCAL
$AUTOCONF
$AUTOMAKE --copy --add-missing
+
./configure --prefix "`pwd`/inst"
+
$MAKE
test -f subdir/liba.a
@@ -66,3 +68,5 @@ $MAKE install-strip
test -f inst/lib/liba.a
test -f inst/lib/subdir/libb.a
+
+:
diff --git a/tests/pr300-ltlib.test b/tests/pr300-ltlib.test
index c6f9a5e..c47f32e 100755
--- a/tests/pr300-ltlib.test
+++ b/tests/pr300-ltlib.test
@@ -48,8 +48,10 @@ libtoolize
$ACLOCAL
$AUTOCONF
$AUTOMAKE --copy --add-missing
+
./configure --prefix "`pwd`/inst"
-$MAKE V=1 >stdout
+
+$MAKE V=1 >stdout || { cat stdout; Exit 1; }
cat stdout
grep 'liba.la .*-rpath .*lib' stdout
@@ -75,3 +77,5 @@ $MAKE install-strip
test -f inst/lib/liba.la
test -f inst/lib/subdir/libb.la
+
+:
diff --git a/tests/pr300-prog.test b/tests/pr300-prog.test
index 0b226c6..917a8a2 100755
--- a/tests/pr300-prog.test
+++ b/tests/pr300-prog.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2007, 2010 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
@@ -63,8 +63,12 @@ END
$ACLOCAL
$AUTOCONF
$AUTOMAKE --copy --add-missing
+
./configure --prefix "`pwd`/inst"
+
$MAKE test-all
$MAKE test-install
$MAKE test-uninstall
$MAKE test-install-strip
+
+:
diff --git a/tests/pr307.test b/tests/pr307.test
index 0091415..7676c4b 100755
--- a/tests/pr307.test
+++ b/tests/pr307.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004, 2010 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,10 +17,26 @@
# Test for PR 307: depcomp with depmode=dashmstdout libtool race condition
# Report from Laurent Morichetti.
# (Also exercises check_LTLIBRARIES.)
+#
+# == Report ==
+# The dashmstdout depmode calls libtool in parallel to generate the
+# dependencies (with -M flag) and to build the objfile (both have
+# --mode=compile and -o).
+# The process with 'libtool --mode=compile .* -M' can corrupt the objfile
+# as none is generated by the compiler. Since --mode=compile and -o are
+# set libtool assumes that a objfile should be generated and will execute
+# invalid $mv & $LN_S.
+#
+# == Fix ==
+# Now 'depcomp' never compute dependencies in the background, as this can
+# cause races with libtool. Compute the dependencies after the actual
+# compilation.
required='libtoolize gcc'
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_LIBTOOL
@@ -34,8 +50,8 @@ librace_la_SOURCES = a.c b.c c.c d.c e.c f.c g.c h.c
# Make sure the dependencies are updated.
check-local:
for i in $(librace_la_SOURCES:.c=.Plo); do \
- echo checking ./$(DEPDIR)/$$i; \
- grep foo.h ./$(DEPDIR)/$$i >tst || exit 1; \
+ echo "checking ./$(DEPDIR)/$$i"; \
+ grep 'foo\.h' ./$(DEPDIR)/$$i >tst || exit 1; \
test `wc -l <tst` -eq 2 || exit 1; \
done
END
@@ -49,8 +65,6 @@ int $i() { return 0; }
EOF
done
-set -e
-
libtoolize --force
$ACLOCAL
$AUTOCONF
@@ -61,6 +75,7 @@ $AUTOMAKE -a
grep am_cv_CC_dependencies_compiler_type configure
./configure am_cv_CC_dependencies_compiler_type=dashmstdout
+
$MAKE
test -f librace.la && Exit 1
$MAKE check
@@ -75,3 +90,5 @@ $MAKE check
test -f librace.la
test -f tst # a proof that check-local was run
+
+:
diff --git a/tests/pr401.test b/tests/pr401.test
index 7a092bf..b68b5ed 100755
--- a/tests/pr401.test
+++ b/tests/pr401.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2006, 2007, 2010 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
@@ -178,3 +178,5 @@ $AUTOCONF
$AUTOMAKE
./configure
$MAKE distcheck
+
+:
diff --git a/tests/pr401b.test b/tests/pr401b.test
index f7f6344..8e296ef 100755
--- a/tests/pr401b.test
+++ b/tests/pr401b.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2006, 2007, 2010 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
@@ -179,3 +179,5 @@ $AUTOCONF
$AUTOMAKE
./configure
$MAKE distcheck
+
+:
diff --git a/tests/pr401c.test b/tests/pr401c.test
index fc2f5de..8682dc0 100755
--- a/tests/pr401c.test
+++ b/tests/pr401c.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2006, 2007, 2010 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
@@ -181,3 +181,5 @@ $AUTOCONF
$AUTOMAKE
./configure
$MAKE distcheck
+
+:
diff --git a/tests/pr72.test b/tests/pr72.test
index d67c17b..ab911ad 100755
--- a/tests/pr72.test
+++ b/tests/pr72.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2002, 2010 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,9 +15,13 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Test for PR 72
+# Empty _SOURCES results in $(LINK) undefined.
+
required=libtool
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_LIBTOOL
@@ -34,7 +38,9 @@ END
: > config.guess
: > config.sub
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
+
+grep '^LINK =' Makefile.in
-grep '^LINK ' Makefile.in
+:
diff --git a/tests/pr87.test b/tests/pr87.test
index 369849b..31e6482 100755
--- a/tests/pr87.test
+++ b/tests/pr87.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2002, 2010 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,10 +15,13 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Test for PR automake/87.
+# "make distcheck" fails when two source dirs exist.
required=gcc
. ./defs || Exit 1
+set -e
+
subdirs="foo bar"
for i in $subdirs; do
@@ -36,7 +39,7 @@ echo "SUBDIRS = $subdirs" > Makefile.am
cat >configure.in <<EOF
AC_INIT(`echo $subdirs | sed 's|\([a-z][a-z]*\).*|\1/\1.c|'`)
AC_CONFIG_AUX_DIR(.)
-AM_INIT_AUTOMAKE(test_am, 1.0)
+AM_INIT_AUTOMAKE($me, 1.0)
AC_PROG_CC
AC_OUTPUT(Makefile `echo $subdirs | sed 's|\([a-z][a-z]*\)|\1/Makefile|g'`)
EOF
@@ -45,15 +48,11 @@ EOF
CFLAGS=
export CFLAGS
-touch README NEWS AUTHORS ChangeLog
-
mkdir build
-# We use gcc and not gcc -traditional as the latter fails on some
-# Linux boxes (Red Hat 5.1 in particular).
-$ACLOCAL \
- && $AUTOCONF \
- && $AUTOMAKE -a || Exit 1
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
# Regression test for bug where `.c.o:' is followed by blank line.
(while read line; do
@@ -61,11 +60,15 @@ $ACLOCAL \
read next
if test -z "$next"; then
Exit 1
+ else
+ : # for shells with broken 'set -e'
fi
break
fi
done) < foo/Makefile.in || Exit 1
-cd build \
- && ../configure \
- && $MAKE distcheck || Exit 1
+cd build
+../configure
+$MAKE distcheck
+
+:
diff --git a/tests/pr9.test b/tests/pr9.test
index dab9734..4638b52 100755
--- a/tests/pr9.test
+++ b/tests/pr9.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2010 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,29 +15,49 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Test for bug in PR 9.
+# "make dist" incorrect when AC_CONFIG_AUX_DIR is present.
+#
+# == Report ==
+# When AC_CONFIG_AUX_DIR is set (in my case to `support'), make dist
+# no longer automatically includes config.guess, config.sub, install-sh,
+# ltconfig, ltmain.sh, mdate-sh, missing, and mkinstalldirs. In fact,
+# the entire `support/' directory is omitted.
required=gzip
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT(Makefile.am)
-AC_CONFIG_AUX_DIR(support)
-AM_INIT_AUTOMAKE(pr9, 0)
-AC_OUTPUT(Makefile)
+set -e
+
+cat > configure.in << END
+AC_INIT([$me], [1.0])
+AC_CONFIG_AUX_DIR([support])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
END
: > Makefile.am
mkdir support
-$ACLOCAL || Exit 1
+$ACLOCAL
+
+$AUTOCONF
+$AUTOMAKE -a -c
+./configure
+$MAKE
+$MAKE distcheck
+
+distdir=$me-1.0
+
+gzip -d $distdir.tar.gz
-$AUTOCONF || Exit 1
-$AUTOMAKE -a -c || Exit 1
-./configure || Exit 1
-$MAKE || Exit 1
-$MAKE distcheck || Exit 1
+tar tf $distdir.tar | $FGREP support
-gunzip pr9-0.tar.gz || Exit 1
+tar xf $distdir.tar
+ls -l . $distdir # for debugging
+test -d $distdir/support
+ls -l $distdir/support # for debugging
+test -f $distdir/support/install-sh
-tar tf pr9-0.tar | $FGREP support
+:
diff --git a/tests/prefix.test b/tests/prefix.test
index 8199bd4..8ba92ef 100755
--- a/tests/prefix.test
+++ b/tests/prefix.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010 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
@@ -18,6 +18,8 @@
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_CC
END
@@ -27,5 +29,7 @@ bnidir = $(prefix)/bni
bni_PROGRAMS = zardoz
EOF
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
+
+:
diff --git a/tests/primary.test b/tests/primary.test
index ac5e54f..a866f8f 100755
--- a/tests/primary.test
+++ b/tests/primary.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2003, 2010 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
@@ -26,4 +27,7 @@ END
$ACLOCAL
AUTOMAKE_fails
-grep 'EXTRA_PROGRAMS' stderr
+grep 'bin_PROGRAMS.*configure substitution' stderr
+grep 'EXTRA_PROGRAMS.*not defined' stderr
+
+:
diff --git a/tests/primary2.test b/tests/primary2.test
index faa7aed..2fb3a60 100755
--- a/tests/primary2.test
+++ b/tests/primary2.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 1997, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 2001, 2002, 2003, 2010 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
@@ -29,4 +30,6 @@ END
$ACLOCAL
AUTOMAKE_fails
-grep EXTRA_PROGRAMS stderr
+grep 'EXTRA_PROGRAMS.*configure substitution' stderr
+
+:
diff --git a/tests/primary3.test b/tests/primary3.test
index 578d053..afccd0c 100755
--- a/tests/primary3.test
+++ b/tests/primary3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2004 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2010 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,3 +38,5 @@ $AUTOCONF
$AUTOMAKE
./configure
$MAKE
+
+:
diff --git a/tests/proginst.test b/tests/proginst.test
index 8881b9d..31745b7 100755
--- a/tests/proginst.test
+++ b/tests/proginst.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 1998, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1998, 2001, 2002, 2010 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
@@ -19,9 +20,13 @@
. ./defs || Exit 1
+set -e
+
cat > Makefile.am << 'END'
bin_SCRIPTS = zardoz qbert brownie
END
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
+
+:
diff --git a/tests/subobj.test b/tests/subobj.test
index 64edd0e..39dc1b9 100755
--- a/tests/subobj.test
+++ b/tests/subobj.test
@@ -39,10 +39,10 @@ cat stderr >&2
grep 'install.*compile' stderr
test -f compile
-$FGREP 'generic/a.$(OBJEXT)' Makefile.in
+grep '^generic/a\.\$(OBJEXT):' Makefile.in
grep '[^/]a\.\$(OBJEXT)' Makefile.in && Exit 1
# Opportunistically test for a different bug.
-grep '^generic/b.\$(OBJEXT):.*dirstamp' Makefile.in
+grep '^generic/b\.\$(OBJEXT):.*dirstamp' Makefile.in
:
diff --git a/tests/subobj10.test b/tests/subobj10.test
index a589e45..dbddf29 100755
--- a/tests/subobj10.test
+++ b/tests/subobj10.test
@@ -21,8 +21,8 @@ required=gcc # avoid compiler errors.
set -e
-cat > configure.in << 'END'
-AC_INIT(x, 0, x)
+cat > configure.in << END
+AC_INIT([$me], [1.0])
AM_INIT_AUTOMAKE([subdir-objects])
AM_PROG_AS
@@ -45,8 +45,6 @@ mkdir src
: >src/c.s
: >d.s
-set -e
-
$ACLOCAL
$AUTOCONF
$AUTOMAKE -a
@@ -54,3 +52,5 @@ $AUTOMAKE -a
./configure
$MAKE
$MAKE distcheck
+
+:
diff --git a/tests/subobj2.test b/tests/subobj2.test
index 1282f80..87a4671 100755
--- a/tests/subobj2.test
+++ b/tests/subobj2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2010 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,4 +35,6 @@ $AUTOMAKE
$FGREP 'generic/a.$(OBJEXT)' Makefile.in
grep '[^/]a\.\$(OBJEXT)' Makefile.in && Exit 1
-$FGREP -e '-c -o' Makefile.in
+grep '.*-c -o' Makefile.in
+
+:
diff --git a/tests/subobj3.test b/tests/subobj3.test
index a4ba765..4fe685c 100755
--- a/tests/subobj3.test
+++ b/tests/subobj3.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2006 Free Software
-# Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2010 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,16 +22,17 @@ required=gcc
set -e
-cat > configure.in << 'END'
-AC_INIT(sub/hello.c)
+cat > configure.in << END
+AC_INIT([$me], [1.0])
dnl Prevent automake from looking in .. and ../..
-AC_CONFIG_AUX_DIR(.)
-AM_INIT_AUTOMAKE(hello,0.23)
+AC_CONFIG_AUX_DIR([.])
+AM_INIT_AUTOMAKE
AC_PROG_CC
AC_PROG_CC_STDC
AM_PROG_CC_C_O
AM_C_PROTOTYPES
-AC_OUTPUT(Makefile)
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
END
cat > Makefile.am << 'END'
@@ -63,3 +64,5 @@ $AUTOMAKE -a
./configure
ANSI2KNR=./ansi2knr U=_ $MAKE -e
./hello
+
+:
diff --git a/tests/subobj4.test b/tests/subobj4.test
index f98ae5b..ead2305 100755
--- a/tests/subobj4.test
+++ b/tests/subobj4.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2010 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
@@ -19,11 +19,14 @@
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_CXX
-AC_OUTPUT(d1/Makefile d2/Makefile)
+AC_CONFIG_FILES([d1/Makefile d2/Makefile])
+AC_OUTPUT
END
mkdir d1 d2
@@ -43,7 +46,9 @@ END
: > compile
: > d2/z.c
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
+
+grep '\$(CC) .*\.\./d2/z\.c' d1/Makefile.in
-grep 'CC.*z' d1/Makefile.in
+:
diff --git a/tests/subobj5.test b/tests/subobj5.test
index 9c9568a..c857e73 100755
--- a/tests/subobj5.test
+++ b/tests/subobj5.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2010 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
@@ -19,12 +19,13 @@
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT(generic/a.c)
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+set -e
+
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([generic/Makefile])
AC_PROG_CC
AM_PROG_CC_C_O
-AC_OUTPUT(Makefile generic/Makefile)
+AC_OUTPUT
END
cat > Makefile.am << 'END'
@@ -36,10 +37,12 @@ mkdir generic
: > generic/a.c
: > generic/Makefile.am
-set -e
-
$ACLOCAL
$AUTOCONF
$AUTOMAKE --include-deps --copy --add-missing
+
./configure
+
$MAKE dist
+
+:
diff --git a/tests/subobj6.test b/tests/subobj6.test
index 42b6e14..228a1e9 100755
--- a/tests/subobj6.test
+++ b/tests/subobj6.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2004, 2010 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
@@ -20,6 +21,8 @@
required=gcc
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
AM_PROG_CC_C_O
AC_OUTPUT
@@ -38,9 +41,6 @@ test-distclean: distclean
test ! -f generic/$(am__dirstamp)
END
-# The ac-init file.
-: > f
-
mkdir generic
cat > generic/a.c << 'END'
#include <stdio.h>
@@ -51,8 +51,6 @@ int main ()
}
END
-set -e
-
$ACLOCAL
$AUTOCONF
$AUTOMAKE --include-deps --copy --add-missing
@@ -86,3 +84,5 @@ cd build2
../configure
$MAKE
$MAKE mostlyclean
+
+:
diff --git a/tests/subobj7.test b/tests/subobj7.test
index d77670c..dd1a8fe 100755
--- a/tests/subobj7.test
+++ b/tests/subobj7.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2010 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
@@ -21,12 +21,10 @@
set -e
-cat > configure.in << 'END'
-AC_INIT(f)
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_CC_C_O
-AC_OUTPUT(Makefile)
+AC_OUTPUT
END
cat > Makefile.am << 'END'
diff --git a/tests/subobj8.test b/tests/subobj8.test
index 63a02d1..ae9b09b 100755
--- a/tests/subobj8.test
+++ b/tests/subobj8.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010 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
@@ -18,13 +18,16 @@
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT(Makefile.am)
-AC_CONFIG_AUX_DIR(tools)
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+set -e
+
+cat > configure.in << END
+AC_INIT([$me], [1.0])
+AC_CONFIG_AUX_DIR([tools])
+AM_INIT_AUTOMAKE
AC_PROG_CC
AM_PROG_CC_C_O
-AC_OUTPUT(Makefile foo/Makefile)
+AC_CONFIG_FILES([Makefile foo/Makefile])
+AC_OUTPUT
END
mkdir tools foo foo/bar
@@ -33,12 +36,14 @@ cat > Makefile.am << 'END'
SUBDIRS = foo
END
-cat > foo/Makefile.am << 'EOF'
+cat > foo/Makefile.am << 'END'
AUTOMAKE_OPTIONS = subdir-objects
bin_PROGRAMS = mumble
mumble_SOURCES = bar/a.c
-EOF
+END
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+test -f tools/compile
-$ACLOCAL || Exit 1
-$AUTOMAKE --add-missing || Exit 1
-test -f tools/compile || Exit 1
+:
diff --git a/tests/subobj9.test b/tests/subobj9.test
index 2b331e0..2045d58 100755
--- a/tests/subobj9.test
+++ b/tests/subobj9.test
@@ -19,13 +19,13 @@
required='libtoolize g++'
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT(x, 0, x)
-AM_INIT_AUTOMAKE([subdir-objects])
+set -e
+cat > configure.in << END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE([subdir-objects])
AC_PROG_CXX
AM_PROG_LIBTOOL
-
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
END
@@ -33,7 +33,7 @@ END
cat > Makefile.am << 'END'
noinst_LTLIBRARIES = libfoo.la
libfoo_la_SOURCES = src/foo.cc .//src/bar.cc # the `.//' is meant.
-
+.PHONY: print
print:
@echo BEG1: "$(LTCXXCOMPILE)" :1END
@echo BEG2: "$(CXXLINK)" :2END
@@ -55,7 +55,6 @@ int doit2 (void)
}
END
-set -e
libtoolize --force
$ACLOCAL
@@ -65,17 +64,19 @@ $AUTOMAKE -a
# Skip this test on configure errors (e.g., broken C++ compilers).
./configure || Exit 77
-# opportunistically check that --tag=CXX is used when supported
-if test -n "`./libtool --help | grep tag=TAG`"; then
- $MAKE print >stdout
+# Opportunistically check that --tag=CXX is used when supported.
+if ./libtool --help | grep tag=TAG; then
+ $MAKE print >stdout || { cat stdout; Exit 1; }
cat stdout
grep 'BEG1: .*--tag=CXX.*--mode=compile.* :1END' stdout
grep 'BEG2: .*--tag=CXX.*--mode=link.* :2END' stdout
fi
$MAKE
-$MAKE distcheck 2>&1 | tee out
+$MAKE distcheck >output 2>&1 || { cat output; Exit 1; }
+cat output
# GNU Make used to complain that the Makefile contained two rules
# for `src/.dirstamp' and `.//src/.dirstamp'.
-grep 'overriding commands' out && Exit 1
+grep 'overriding commands' output && Exit 1
+
:
diff --git a/tests/subobjname.test b/tests/subobjname.test
index 79584cf..a8128bb 100755
--- a/tests/subobjname.test
+++ b/tests/subobjname.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2010 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,3 +70,5 @@ dobj=`sed -n '/^am_d_OBJECTS = / {
p
}' Makefile.in`
test "$cobj" = "$dobj"
+
+:
hooks/post-receive
--
GNU Automake
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Automake-commit] [SCM] GNU Automake branch, branch-1.11, updated. v1.11.1-180-gc3a6212,
Stefano Lattarini <=