automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-506-


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-506-g84e5d6d
Date: Sun, 12 Dec 2010 21:56:36 +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=84e5d6d3f2f71b7170893dcf6a5c575134b34f78

The branch, master has been updated
       via  84e5d6d3f2f71b7170893dcf6a5c575134b34f78 (commit)
       via  251226d81592a946acfca6a8ed2265476853fb2b (commit)
       via  88c5437de865d8d5574d12c1ba6256743987efc0 (commit)
       via  9e44e6449112c79a4fe097854207ba52dd17d391 (commit)
      from  ac2652e73581bc8b250e572e13137cf69a3a0968 (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 84e5d6d3f2f71b7170893dcf6a5c575134b34f78
Merge: 251226d 88c5437
Author: Stefano Lattarini <address@hidden>
Date:   Sun Dec 12 22:35:02 2010 +0100

    Merge branch 'tests-libobj-extend'

commit 251226d81592a946acfca6a8ed2265476853fb2b
Merge: ac2652e 9e44e64
Author: Stefano Lattarini <address@hidden>
Date:   Sun Dec 12 22:34:44 2010 +0100

    Merge branch 'tests-posixsubst-specialvars'

commit 88c5437de865d8d5574d12c1ba6256743987efc0
Author: Stefano Lattarini <address@hidden>
Date:   Tue Aug 31 15:14:29 2010 +0200

    Extend tests on AC_LIBOBJ and friends.
    
    * tests/aclibobj.test: Removed, superseded by ...
    * tests/libobj1.test: ... this new test, which runs autoconf,
    ./configure and make, to ensure everything really works.
    * tests/libobj3.test: Add trailing `:' command.  Quote literal dot
    in grep regexp.
    * tests/libobj4.test: Enable `errexit' shell flag, and related
    changes.  Add trailing `:' command.  Use proper m4 quoting.
    * tests/ltlibobjs.test: Likewise.
    * tests/libobj5.test: Enable `errexit' shell flag, and related
    changes.  Add trailing `:' command.  Make more robust by using
    longer filenames to be grepped.
    * tests/libobj8.test: Enable `errexit' shell flag, and related
    changes.  Add trailing `:' command.  Use the configure.in
    stub provided by ./defs, rather than writing it from scratch.
    * tests/libobj2.test: Likewise.  Also, add calls to autoconf,
    ./configure and make, to ensure everything really works.
    * tests/libobj7.test: Likewise, and ensure that at least one
    function listed in AC_REPLACE_FUNCTIONS is truly replaced.
    * tests/libobj13.test: Make grepping of Automake stderr slighty
    stricter.  Add trailing `:' command.
    * tests/libobj12.test: Likewise.  Also, prefer "cat + here-doc"
    over "echo" to append to Makefile.am, and some cosmetic changes
    in spacing.
    * tests/libobj14.test: Call `Exit 1' if sourcing of ./defs fails.
    Slighty improve m4 quoting.  Add trailing `:' command.
    * tests/libobj10.test: Add calls to autoconf, ./configure and
    make, to ensure everything really works.  Also, remove tests that
    nonexistent source for AC_LIBOBJ cause an Automake failure: this
    is already checked by ...
    * tests/libobj15a.test: ... this new test.
    * tests/libobj15b.test: New test, sister test of libobj15a.test,
    checks AC_LIBSOURCE instead of AC_LIBOBJ.
    * tests/libobj15c.test: New test, sister test of libobj15a.test,
    checks AC_LIBSOURCES instead of AC_LIBOBJ.
    * tests/libobj11.test: Removed, superseded by ...
    * tests/libobj16a.test: ... this new test.
    * tests/libobj16b.test: New test, sister test of libobj16a.test,
    but using oldish/depracated idioms.
    * tests/libobj17.test: New test.
    * tests/libobj18.test: Likewise.
    * tests/libobj19.test: Likewise.
    * tests/libobj20a.test: Likewise.
    * tests/libobj20b.test: Likewise.
    * tests/libobj20c.test: Likewise.
    * tests/Makefile.am (TESTS): Updated.

commit 9e44e6449112c79a4fe097854207ba52dd17d391
Author: Stefano Lattarini <address@hidden>
Date:   Tue Nov 30 12:22:25 2010 +0100

    Test `$(var:suf=rpl)' expansion in special automake variables.
    
    * tests/posixsubst-data.test: New test.
    * tests/posixsubst-extradist.test: Likewise.
    * tests/posixsubst-ldadd.test: Likewise.
    * tests/posixsubst-libraries.test: Likewise.
    * tests/posixsubst-ltlibraries.test: Likewise.
    * tests/posixsubst-programs.test: Likewise.
    * tests/posixsubst-scripts.test: Likewise.
    * tests/posixsubst-sources.test: Likewise.
    * tests/posixsubst-tests.test: Likewise.
    * tests/Makefile.am (TESTS): Update.

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

Summary of changes:
 ChangeLog                                         |   63 +++++++++
 tests/Makefile.am                                 |   23 +++-
 tests/Makefile.in                                 |   27 ++++-
 tests/libobj-basic.test                           |  110 ++++++++++++++++
 tests/libobj10.test                               |   22 +++-
 tests/libobj11.test                               |   39 ------
 tests/libobj12.test                               |   26 +++--
 tests/libobj13.test                               |    8 +-
 tests/libobj14.test                               |    4 +-
 tests/{libobj3.test => libobj15a.test}            |   12 ++-
 tests/{strip2.test => libobj15b.test}             |   31 ++---
 tests/{strip2.test => libobj15c.test}             |   36 +++---
 tests/libobj16a.test                              |  139 ++++++++++++++++++++
 tests/libobj16b.test                              |  140 +++++++++++++++++++++
 tests/{strip2.test => libobj17.test}              |   41 ++++--
 tests/{strip2.test => libobj18.test}              |   32 ++---
 tests/{strip2.test => libobj19.test}              |   40 ++++---
 tests/libobj2.test                                |   43 +++++--
 tests/{aclibobj.test => libobj20a.test}           |   32 ++---
 tests/{strip2.test => libobj20b.test}             |   39 +++---
 tests/{strip2.test => libobj20c.test}             |   37 +++---
 tests/libobj3.test                                |   10 +-
 tests/libobj4.test                                |   10 +-
 tests/libobj5.test                                |   16 ++-
 tests/libobj7.test                                |   65 +++++++---
 tests/libobj8.test                                |   19 ++--
 tests/ltlibobjs.test                              |   10 +-
 tests/posixsubst-data.test                        |   76 +++++++++++
 tests/{colneq3.test => posixsubst-extradist.test} |   30 +++--
 tests/posixsubst-ldadd.test                       |   78 ++++++++++++
 tests/posixsubst-libraries.test                   |   65 ++++++++++
 tests/posixsubst-ltlibraries.test                 |   67 ++++++++++
 tests/{confh8.test => posixsubst-programs.test}   |   60 ++++-----
 tests/posixsubst-scripts.test                     |   89 +++++++++++++
 tests/posixsubst-sources.test                     |   82 ++++++++++++
 tests/posixsubst-tests.test                       |   70 ++++++++++
 36 files changed, 1382 insertions(+), 309 deletions(-)
 create mode 100755 tests/libobj-basic.test
 delete mode 100755 tests/libobj11.test
 copy tests/{libobj3.test => libobj15a.test} (77%)
 copy tests/{strip2.test => libobj15b.test} (64%)
 copy tests/{strip2.test => libobj15c.test} (56%)
 create mode 100755 tests/libobj16a.test
 create mode 100755 tests/libobj16b.test
 copy tests/{strip2.test => libobj17.test} (58%)
 copy tests/{strip2.test => libobj18.test} (65%)
 copy tests/{strip2.test => libobj19.test} (57%)
 rename tests/{aclibobj.test => libobj20a.test} (67%)
 copy tests/{strip2.test => libobj20b.test} (51%)
 copy tests/{strip2.test => libobj20c.test} (57%)
 create mode 100755 tests/posixsubst-data.test
 copy tests/{colneq3.test => posixsubst-extradist.test} (63%)
 create mode 100755 tests/posixsubst-ldadd.test
 create mode 100755 tests/posixsubst-libraries.test
 create mode 100755 tests/posixsubst-ltlibraries.test
 copy tests/{confh8.test => posixsubst-programs.test} (50%)
 create mode 100755 tests/posixsubst-scripts.test
 create mode 100755 tests/posixsubst-sources.test
 create mode 100755 tests/posixsubst-tests.test

diff --git a/ChangeLog b/ChangeLog
index 20da64d..61de8bd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,66 @@
+2010-12-09  Stefano Lattarini  <address@hidden>
+
+       Extend tests on AC_LIBOBJ and friends.
+       * tests/aclibobj.test: Removed, superseded by ...
+       * tests/libobj-basic.test: ... this new test, which runs autoconf,
+       ./configure and make, to ensure everything really works.
+       * tests/libobj3.test: Add trailing `:' command.  Escape literal
+       dot in grep regexp.
+       * tests/libobj4.test: Enable `errexit' shell flag, and related
+       changes.  Add trailing `:' command.  Use proper m4 quoting.
+       * tests/ltlibobjs.test: Likewise.
+       * tests/libobj5.test: Enable `errexit' shell flag, and related
+       changes.  Add trailing `:' command.  Make more robust by using
+       longer filenames to be grepped.
+       * tests/libobj8.test: Enable `errexit' shell flag, and related
+       changes.  Add trailing `:' command.  Use the configure.in
+       stub provided by ./defs, rather than writing it from scratch.
+       * tests/libobj2.test: Likewise.  Also, add calls to autoconf,
+       ./configure and make, to ensure everything really works.
+       * tests/libobj7.test: Likewise, and ensure that at least one
+       function listed in AC_REPLACE_FUNCTIONS is truly replaced.
+       * tests/libobj13.test: Make grepping of Automake stderr slightly
+       stricter.  Add trailing `:' command.
+       * tests/libobj12.test: Likewise.  Also, prefer "cat + here-doc"
+       over "echo" to append to Makefile.am, and some cosmetic changes
+       in spacing.
+       * tests/libobj14.test: Call `Exit 1' if sourcing of ./defs fails.
+       Slighty improve m4 quoting.  Add trailing `:' command.
+       * tests/libobj10.test: Add calls to autoconf, ./configure and
+       make, to ensure everything really works.  Also, remove tests that
+       nonexistent source for AC_LIBOBJ cause an Automake failure: this
+       is already checked by ...
+       * tests/libobj15a.test: ... this new test.
+       * tests/libobj15b.test: New test, sister test of libobj15a.test,
+       checks AC_LIBSOURCE instead of AC_LIBOBJ.
+       * tests/libobj15c.test: New test, sister test of libobj15a.test,
+       checks AC_LIBSOURCES instead of AC_LIBOBJ.
+       * tests/libobj11.test: Removed, superseded by ...
+       * tests/libobj16a.test: ... this new test.
+       * tests/libobj16b.test: New test, sister test of libobj16a.test,
+       but using oldish/deprecated idioms.
+       * tests/libobj17.test: New test.
+       * tests/libobj18.test: Likewise.
+       * tests/libobj19.test: Likewise.
+       * tests/libobj20a.test: Likewise.
+       * tests/libobj20b.test: Likewise.
+       * tests/libobj20c.test: Likewise.
+       * tests/Makefile.am (TESTS): Updated.
+
+2010-12-08  Stefano Lattarini  <address@hidden>
+
+       Test `$(var:suf=rpl)' expansion in special automake variables.
+       * tests/posixsubst-data.test: New test.
+       * tests/posixsubst-extradist.test: Likewise.
+       * tests/posixsubst-ldadd.test: Likewise.
+       * tests/posixsubst-libraries.test: Likewise.
+       * tests/posixsubst-ltlibraries.test: Likewise.
+       * tests/posixsubst-programs.test: Likewise.
+       * tests/posixsubst-scripts.test: Likewise.
+       * tests/posixsubst-sources.test: Likewise.
+       * tests/posixsubst-tests.test: Likewise.
+       * tests/Makefile.am (TESTS): Update.
+
 2010-12-07  Stefano Lattarini  <address@hidden>
 
        Make tests `colon*.test' more "semantic".
diff --git a/tests/Makefile.am b/tests/Makefile.am
index b8e9b1d..cbcad44 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -94,7 +94,6 @@ XFAIL_TESTS += $(instspc_xfail_tests)
 
 
 TESTS = \
-aclibobj.test \
 aclocal.test \
 aclocal3.test \
 aclocal4.test \
@@ -496,6 +495,7 @@ lex5.test \
 lflags.test \
 lflags2.test \
 libexec.test \
+libobj-basic.test \
 libobj2.test \
 libobj3.test \
 libobj4.test \
@@ -503,10 +503,20 @@ libobj5.test \
 libobj7.test \
 libobj8.test \
 libobj10.test \
-libobj11.test \
 libobj12.test \
 libobj13.test \
 libobj14.test \
+libobj15a.test \
+libobj15b.test \
+libobj15c.test \
+libobj16a.test \
+libobj16b.test \
+libobj17.test \
+libobj18.test \
+libobj19.test \
+libobj20a.test \
+libobj20b.test \
+libobj20c.test \
 library.test \
 library2.test \
 library3.test \
@@ -657,6 +667,15 @@ pluseq8.test \
 pluseq9.test \
 pluseq10.test \
 pluseq11.test \
+posixsubst-data.test \
+posixsubst-extradist.test \
+posixsubst-ldadd.test \
+posixsubst-libraries.test \
+posixsubst-ltlibraries.test \
+posixsubst-programs.test \
+posixsubst-scripts.test \
+posixsubst-sources.test \
+posixsubst-tests.test \
 postproc.test \
 ppf77.test \
 pr2.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 55d1446..7691165 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -292,7 +292,8 @@ parallel_tests = backcompat5-p.test check-p.test 
check10-p.test \
        check4-p.test check5-p.test check6-p.test check7-p.test \
        check8-p.test check9-p.test color-p.test color2-p.test \
        comment9-p.test dejagnu-p.test exeext4-p.test maken3-p.test \
-       maken4-p.test pr401-p.test pr401b-p.test pr401c-p.test
+       maken4-p.test posixsubst-tests-p.test pr401-p.test \
+       pr401b-p.test pr401c-p.test
 instspc_tests = instspc-squote-build.test instspc-squote-install.test \
        instspc-dquote-build.test instspc-dquote-install.test \
        instspc-bquote-build.test instspc-bquote-install.test \
@@ -356,7 +357,6 @@ instspc_xfail_tests = instspc-squote-build.test \
        instspc-sharp-install.test instspc-dollar-install.test \
        instspc-linefeed-install.test instspc-a_lf_b-install.test
 TESTS = \
-aclibobj.test \
 aclocal.test \
 aclocal3.test \
 aclocal4.test \
@@ -758,6 +758,7 @@ lex5.test \
 lflags.test \
 lflags2.test \
 libexec.test \
+libobj-basic.test \
 libobj2.test \
 libobj3.test \
 libobj4.test \
@@ -765,10 +766,20 @@ libobj5.test \
 libobj7.test \
 libobj8.test \
 libobj10.test \
-libobj11.test \
 libobj12.test \
 libobj13.test \
 libobj14.test \
+libobj15a.test \
+libobj15b.test \
+libobj15c.test \
+libobj16a.test \
+libobj16b.test \
+libobj17.test \
+libobj18.test \
+libobj19.test \
+libobj20a.test \
+libobj20b.test \
+libobj20c.test \
 library.test \
 library2.test \
 library3.test \
@@ -919,6 +930,15 @@ pluseq8.test \
 pluseq9.test \
 pluseq10.test \
 pluseq11.test \
+posixsubst-data.test \
+posixsubst-extradist.test \
+posixsubst-ldadd.test \
+posixsubst-libraries.test \
+posixsubst-ltlibraries.test \
+posixsubst-programs.test \
+posixsubst-scripts.test \
+posixsubst-sources.test \
+posixsubst-tests.test \
 postproc.test \
 ppf77.test \
 pr2.test \
@@ -1504,6 +1524,7 @@ dejagnu-p.log: dejagnu.test
 exeext4-p.log: exeext4.test
 maken3-p.log: maken3.test
 maken4-p.log: maken4.test
+posixsubst-tests-p.log: posixsubst-tests.test
 pr401-p.log: pr401.test
 pr401b-p.log: pr401b.test
 pr401c-p.log: pr401c.test
diff --git a/tests/libobj-basic.test b/tests/libobj-basic.test
new file mode 100755
index 0000000..64b9c2b
--- /dev/null
+++ b/tests/libobj-basic.test
@@ -0,0 +1,110 @@
+#! /bin/sh
+# 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure AC_LIBSOURCE and AC_LIBSOURCES work.
+
+. ./defs || Exit 1
+
+set -e
+
+mv configure.in configure.proto
+cat >> configure.proto << 'END'
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+noinst_LIBRARIES = libtu.a
+libtu_a_SOURCES = foo.c
+libtu_a_LIBADD = $(LIBOBJS)
+
+include extra-checks.am
+.PHONY: $(extra_checks) pre-test
+
+pre-test: distdir
+       ls -l $(srcdir) $(builddir) $(distdir)
+       $(AR) tv libtu.a
+$(extra_checks): pre-test
+check-local: $(extra_checks)
+
+maude-src:
+       grep dummy_maude $(srcdir)/maude.c
+maude-dist:
+       grep dummy_maude $(distdir)/maude.c
+liver-src:
+       grep dummy_liver $(srcdir)/liver.c
+liver-dist:
+       grep dummy_liver $(distdir)/liver.c
+liver-not-dist:
+       test -d $(distdir)
+       test ! -r $(distdir)/liver.c
+maude-not-dist:
+       test -d $(distdir)
+       test ! -r $(distdir)/maude.c
+END
+
+cat > foo.c << 'END'
+extern int dummy_foo;
+END
+
+cat > maude.c << 'END'
+extern int dummy_maude;
+END
+
+cat > liver.c << 'END'
+extern int dummy_liver;
+END
+
+# AC_LIBSOURCE should work also if called after AC_OUTPUT.
+cat configure.proto - > configure.in <<END
+AC_LIBSOURCE([maude.c])
+END
+
+cat > extra-checks.am << 'END'
+extra_checks = maude-src maude-dist liver-not-dist
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+
+$MAKE check
+$MAKE distcheck
+
+$MAKE distclean
+# Avoid timestamp-related differences.
+rm -rf autom4te*.cache
+
+cat > extra-checks.am << 'END'
+extra_checks = maude-src maude-dist liver-src liver-dist
+END
+
+# AC_LIBSOURCES should work also if called after AC_OUTPUT.
+cat configure.proto - > configure.in <<END
+AC_LIBSOURCES([maude.c, liver.c])
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+
+$MAKE check
+$MAKE distcheck
+
+:
diff --git a/tests/libobj10.test b/tests/libobj10.test
index 0d24741..7897351 100755
--- a/tests/libobj10.test
+++ b/tests/libobj10.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1999, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 1999, 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
@@ -30,13 +31,22 @@ END
 
 cat > Makefile.am << 'END'
 noinst_LIBRARIES = libfoo.a
-libfoo_a_LIBADD = @LIBOBJS@
+libfoo_a_SOURCES =
+libfoo_a_LIBADD = $(LIBOBJS)
+BUILT_SOURCES = foo.c
+CLEANFILES = foo.c
+foo.c:
+       echo 'extern int dummy;' > $@
 END
 
 $ACLOCAL
-AUTOMAKE_fails
-grep 'Makefile.am:2:.*foo\.c' stderr
+$AUTOCONF
+$AUTOMAKE
 
-echo 'BUILT_SOURCES = foo.c' >> Makefile.am
+./configure
 
-$AUTOMAKE
+$MAKE
+ar t libfoo.a # for debugging
+$MAKE distcheck
+
+:
diff --git a/tests/libobj11.test b/tests/libobj11.test
deleted file mode 100755
index 204ff8b..0000000
--- a/tests/libobj11.test
+++ /dev/null
@@ -1,39 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2002, 2008  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/>.
-
-# AC_LIBOBJ must allow [] around its argument.
-
-. ./defs || Exit 1
-
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_PROG_CC
-AC_PROG_RANLIB
-AC_LIBOBJ([mountlist])
-AC_OUTPUT(Makefile)
-END
-
-cat > Makefile.am << 'END'
-noinst_LIBRARIES = libtu.a
-libtu_a_SOURCES =
-libtu_a_LIBADD = @LIBOBJS@
-END
-
-: > mountlist.c
-
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
diff --git a/tests/libobj12.test b/tests/libobj12.test
index 5f1d029..747d7a0 100755
--- a/tests/libobj12.test
+++ b/tests/libobj12.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 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,11 +14,11 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-
 # Test if a file can be mentioned in LIBOBJS and explicitly.
 # (See libobj13.test for the LTLIBRARIES check.)
 
 . ./defs || Exit 1
+
 set -e
 
 cat >> configure.in << 'END'
@@ -48,22 +48,30 @@ END
 : > bar.c
 
 $ACLOCAL
-$AUTOMAKE
 
 # This however should be diagnosed, since foo.c and bar.c are in 
@address@hidden
-echo 'libfoo_a_SOURCES += foo.c' >> Makefile.am
-echo 'p1_SOURCES += bar.c' >> Makefile.am
+cat >> Makefile.am << 'END'
+libfoo_a_SOURCES += foo.c
+p1_SOURCES += bar.c
+END
+
 AUTOMAKE_fails
-$FGREP foo.c stderr
-$FGREP bar.c stderr
+grep 'foo\.c.*explicitly mentioned' stderr
+grep 'bar\.c.*explicitly mentioned' stderr
 
 # Global `LDADD' can also come into play.
 cat > Makefile.am << 'END'
 noinst_PROGRAMS = a b
 LDADD = @LIBOBJS@
 END
+
 $AUTOMAKE
 grep 'a_DEPENDENCIES.*LIBOBJS' Makefile.in
-echo 'a_SOURCES = foo.c' >> Makefile.am
+
+cat >> Makefile.am << 'END'
+a_SOURCES = foo.c
+END
 AUTOMAKE_fails
-$FGREP foo.c stderr
+grep 'foo\.c.*explicitly mentioned' stderr
+
+:
diff --git a/tests/libobj13.test b/tests/libobj13.test
index 6ca68c9..6d1e68d 100755
--- a/tests/libobj13.test
+++ b/tests/libobj13.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 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,12 +14,12 @@
 # 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 if a file can be mentioned in LTLIBOBJS and explicitly.
 # (Like libobj12.test, but for Libtool libraries.)
 
 required='libtoolize'
 . ./defs || Exit 1
+
 set -e
 
 cat >> configure.in << 'END'
@@ -47,4 +47,6 @@ $AUTOMAKE --add-missing
 # This however should be diagnosed, since foo.c is in @address@hidden
 echo 'libfoo_la_SOURCES += foo.c' >> Makefile.am
 AUTOMAKE_fails
-$FGREP foo.c stderr
+grep 'foo\.c.*explicitly mentioned' stderr
+
+:
diff --git a/tests/libobj14.test b/tests/libobj14.test
index 0ee750c..08841c3 100755
--- a/tests/libobj14.test
+++ b/tests/libobj14.test
@@ -27,7 +27,7 @@ set -e
 cat >>configure.in <<'EOF'
 AC_PROG_CC
 AC_LIBSOURCE([bar.c])
-AM_CONDITIONAL([CASE], :)
+AM_CONDITIONAL([CASE], [:])
 AC_OUTPUT
 EOF
 
@@ -43,3 +43,5 @@ EOF
 
 $ACLOCAL
 $AUTOMAKE
+
+:
diff --git a/tests/libobj3.test b/tests/libobj15a.test
similarity index 77%
copy from tests/libobj3.test
copy to tests/libobj15a.test
index 0aeced9..51da834 100755
--- a/tests/libobj3.test
+++ b/tests/libobj15a.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 1997, 2001, 2002, 2003  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,22 +14,26 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Make sure we complain if @LIBOBJS@ is used without being set in configure.in
+# Nonexistent sources for AC_LIBOBJ should cause an Automake failure.
 
 . ./defs || Exit 1
 
 set -e
 
 cat >> configure.in << 'END'
+AC_PROG_CC
 AC_PROG_RANLIB
+AC_LIBOBJ([foobar])
 END
 
 cat > Makefile.am << 'END'
 noinst_LIBRARIES = libtu.a
 libtu_a_SOURCES =
-libtu_a_LIBADD = @LIBOBJS@
+libtu_a_LIBADD = $(LIBOBJS)
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep 'Makefile.am:3:.*LIBOBJS' stderr
+grep 'configure\.in:.*required file.*foobar\.c.*' stderr
+
+:
diff --git a/tests/strip2.test b/tests/libobj15b.test
similarity index 64%
copy from tests/strip2.test
copy to tests/libobj15b.test
index 5786ded..000ba1f 100755
--- a/tests/strip2.test
+++ b/tests/libobj15b.test
@@ -14,10 +14,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Ensure install-strip works when STRIP consists of more than one word.
-# This test needs GNU binutils strip.  See sister test strip3.
+# Nonexistent source for AC_LIBSOURCE should cause Automake to fail.
 
-required=strip
 . ./defs || Exit 1
 
 set -e
@@ -25,30 +23,21 @@ set -e
 cat >> configure.in << 'END'
 AC_PROG_CC
 AC_PROG_RANLIB
+AC_LIBSOURCE([foobar.c])
+# FIXME: without a call to AC_OUTPUT, Automake does not fail when file(s)
+#        specified in AC_LIBSOURCE call(s) do not exist.  Should we fix
+#        this limitation?  Or is the current behaviour good enough?
 AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
-bin_PROGRAMS = foo
-lib_LIBRARIES = libfoo.a
+noinst_LIBRARIES = libtu.a
+libtu_a_SOURCES =
+libtu_a_LIBADD = $(LIBOBJS)
 END
 
-cat > foo.c << 'END'
-int main () { return 0; }
-END
-
-cat > libfoo.c << 'END'
-int foo () { return 0; }
-END
-
-
 $ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
-
-prefix=`pwd`/inst
-./configure --prefix="$prefix" STRIP='strip --verbose'
-$MAKE
-$MAKE install-strip
+AUTOMAKE_fails
+grep 'configure\.in:.*required file.*foobar\.c.*' stderr
 
 :
diff --git a/tests/strip2.test b/tests/libobj15c.test
similarity index 56%
copy from tests/strip2.test
copy to tests/libobj15c.test
index 5786ded..f1aa259 100755
--- a/tests/strip2.test
+++ b/tests/libobj15c.test
@@ -14,10 +14,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Ensure install-strip works when STRIP consists of more than one word.
-# This test needs GNU binutils strip.  See sister test strip3.
+# Nonexistent sources for AC_LIBSOURCES should cause Automake to fail.
 
-required=strip
 . ./defs || Exit 1
 
 set -e
@@ -25,30 +23,28 @@ set -e
 cat >> configure.in << 'END'
 AC_PROG_CC
 AC_PROG_RANLIB
+AC_LIBSOURCES([foobar.c, bazquux.c])
+# FIXME: without a call to AC_OUTPUT, Automake does not fail when file(s)
+#        specified in AC_LIBSOURCES call(s) do not exist.  Should we fix
+#        this limitation?  Or is the current behaviour good enough?
 AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
-bin_PROGRAMS = foo
-lib_LIBRARIES = libfoo.a
+noinst_LIBRARIES = libtu.a
+libtu_a_SOURCES =
+libtu_a_LIBADD = $(LIBOBJS)
 END
 
-cat > foo.c << 'END'
-int main () { return 0; }
-END
-
-cat > libfoo.c << 'END'
-int foo () { return 0; }
-END
-
-
 $ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
 
-prefix=`pwd`/inst
-./configure --prefix="$prefix" STRIP='strip --verbose'
-$MAKE
-$MAKE install-strip
+AUTOMAKE_fails
+grep 'configure\.in:.*required file.*foobar\.c.*' stderr
+grep 'configure\.in:.*required file.*bazquux\.c.*' stderr
+
+: > foobar.c
+AUTOMAKE_fails
+grep 'configure\.in:.*required file.*bazquux\.c.*' stderr
+grep 'foobar\.c' stderr && Exit 1
 
 :
diff --git a/tests/libobj16a.test b/tests/libobj16a.test
new file mode 100755
index 0000000..a673819
--- /dev/null
+++ b/tests/libobj16a.test
@@ -0,0 +1,139 @@
+#! /bin/sh
+# 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure AC_LIBOBJ and friends work.
+# Please keep this in sync with sister test `libobj16b.test'.
+
+. ./defs || Exit 1
+
+set -e
+
+mv configure.in configure.proto
+cat >> configure.proto << 'END'
+AC_PROG_CC
+AC_PROG_RANLIB
+%LIBOBJ-STUFF% # will be activated later
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+noinst_LIBRARIES = libtu.a
+libtu_a_SOURCES =
+libtu_a_LIBADD = $(LIBOBJS)
+
+include extra-checks.am
+.PHONY: $(extra_checks) pre-test
+
+pre-test: distdir
+       ls -l $(srcdir) $(builddir) $(distdir)
+       $(AR) tv libtu.a
+$(extra_checks): pre-test
+check-local: $(extra_checks)
+
+maude-src:
+       grep dummy_maude $(srcdir)/maude.c
+maude-dist:
+       grep dummy_maude $(distdir)/maude.c
+liver-src:
+       grep dummy_liver $(srcdir)/liver.c
+liver-dist:
+       grep dummy_liver $(distdir)/liver.c
+liver-not-dist: distdir
+       test ! -r $(distdir)/liver.c
+maude-not-dist: distdir
+       test ! -r $(distdir)/maude.c
+maude-lib:
+       $(AR) t libtu.a | grep maude
+maude-not-lib:
+       $(AR) t libtu.a | grep maude && exit 1; exit 0
+liver-lib:
+       $(AR) t libtu.a | grep liver
+liver-not-lib:
+       $(AR) t libtu.a | grep liver && exit 1; exit 0
+END
+
+cat > maude.c << 'END'
+extern int dummy_maude;
+END
+
+cat > liver.c << 'END'
+extern int dummy_liver;
+END
+
+sed '/%LIBOBJ-STUFF%/{
+s/.*//
+i\
+AC_LIBOBJ([maude])
+}' configure.proto > configure.in
+cat configure.in # for debugging
+
+cat > extra-checks.am << 'END'
+extra_checks = maude-src maude-dist maude-lib liver-not-dist
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+$MAKE
+$MAKE check
+$MAKE distcheck
+$MAKE distclean
+
+# Avoid timestamp-related differences.
+rm -rf autom4te*.cache
+
+cat > extra-checks.am << 'END'
+extra_checks = maude-src maude-dist liver-src liver-dist
+if MAUDE_COND
+extra_checks += maude-lib liver-not-lib
+else
+extra_checks += maude-not-lib liver-lib
+endif
+END
+
+sed '/%LIBOBJ-STUFF%/{
+s/.*//
+i\
+AM_CONDITIONAL([MAUDE_COND], [test x"$MAUDE" = x"yes"])\
+if test x"$MAUDE" = x"yes"; then\
+  AC_LIBOBJ([maude])\
+else\
+  AC_LIBOBJ([liver])\
+fi\
+AC_LIBSOURCES([maude.c, liver.c])
+}' configure.proto > configure.in
+cat configure.in # for debugging
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure MAUDE=yes
+$MAKE
+$MAKE check
+$MAKE distcheck
+$MAKE distclean
+
+./configure MAUDE=no
+$MAKE
+$MAKE check
+$MAKE distcheck
+$MAKE distclean
+
+:
diff --git a/tests/libobj16b.test b/tests/libobj16b.test
new file mode 100755
index 0000000..f2ac76d
--- /dev/null
+++ b/tests/libobj16b.test
@@ -0,0 +1,140 @@
+#! /bin/sh
+# 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure AC_LIBOBJ and friends work.
+# Please keep this in sync with sister test `libobj16b.test'.
+
+. ./defs || Exit 1
+
+set -e
+
+mv configure.in configure.proto
+cat >> configure.proto << 'END'
+AC_PROG_CC
+AC_PROG_RANLIB
+%LIBOBJ-STUFF% # will be activated later
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+noinst_LIBRARIES = libtu.a
+libtu_a_SOURCES =
+libtu_a_LIBADD = @LIBOBJS@
+
+include extra-checks.am
+.PHONY: $(extra_checks) pre-test
+
+pre-test: distdir
+       ls -l $(srcdir) $(builddir) $(distdir)
+       $(AR) tv libtu.a
+$(extra_checks): pre-test
+check-local: $(extra_checks)
+
+maude-src:
+       grep dummy_maude $(srcdir)/maude.c
+maude-dist:
+       grep dummy_maude $(distdir)/maude.c
+liver-src:
+       grep dummy_liver $(srcdir)/liver.c
+liver-dist:
+       grep dummy_liver $(distdir)/liver.c
+liver-not-dist: distdir
+       test ! -r $(distdir)/liver.c
+maude-not-dist: distdir
+       test ! -r $(distdir)/maude.c
+maude-lib:
+       $(AR) t libtu.a | grep maude
+maude-not-lib:
+       $(AR) t libtu.a | grep maude && exit 1; exit 0
+liver-lib:
+       $(AR) t libtu.a | grep liver
+liver-not-lib:
+       $(AR) t libtu.a | grep liver && exit 1; exit 0
+END
+
+cat > maude.c << 'END'
+extern int dummy_maude;
+END
+
+cat > liver.c << 'END'
+extern int dummy_liver;
+END
+
+sed '/%LIBOBJ-STUFF%/{
+s/.*//
+i\
+AC_LIBOBJ(maude) dnl: do not quote this!
+}' configure.proto > configure.in
+cat configure.in # for debugging
+
+cat > extra-checks.am << 'END'
+extra_checks = maude-src maude-dist maude-lib liver-not-dist
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+$MAKE
+$MAKE check
+$MAKE distcheck
+$MAKE distclean
+
+# Avoid timestamp-related differences.
+rm -rf autom4te*.cache
+
+cat > extra-checks.am << 'END'
+extra_checks = maude-src maude-dist liver-src liver-dist
+if MAUDE_COND
+extra_checks += maude-lib liver-not-lib
+else
+extra_checks += maude-not-lib liver-lib
+endif
+END
+
+sed '/%LIBOBJ-STUFF%/{
+s/.*//
+i\
+AM_CONDITIONAL([MAUDE_COND], [test x"$MAUDE" = x"yes"])\
+if test x"$MAUDE" = x"yes"; then\
+  AC_LIBOBJ(maude) dnl: do not quote this!\
+else\
+  AC_LIBOBJ(liver) dnl: do not quote this!\
+fi\
+AC_LIBSOURCE(maude.c) dnl: do not quote this!\
+AC_LIBSOURCE(liver.c) dnl: do not quote this!
+}' configure.proto > configure.in
+cat configure.in # for debugging
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure MAUDE=yes
+$MAKE
+$MAKE check
+$MAKE distcheck
+$MAKE distclean
+
+./configure MAUDE=no
+$MAKE
+$MAKE check
+$MAKE distcheck
+$MAKE distclean
+
+:
diff --git a/tests/strip2.test b/tests/libobj17.test
similarity index 58%
copy from tests/strip2.test
copy to tests/libobj17.test
index 5786ded..daf4039 100755
--- a/tests/strip2.test
+++ b/tests/libobj17.test
@@ -14,10 +14,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Ensure install-strip works when STRIP consists of more than one word.
-# This test needs GNU binutils strip.  See sister test strip3.
+# Make sure AC_LIBOBJ accept non-literal arguments.
 
-required=strip
 . ./defs || Exit 1
 
 set -e
@@ -25,30 +23,45 @@ set -e
 cat >> configure.in << 'END'
 AC_PROG_CC
 AC_PROG_RANLIB
+foo=${FOO-oops}
+AC_LIBSOURCES([quux.c, zardoz.c])
+AC_LIBOBJ([$foo])
 AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
-bin_PROGRAMS = foo
-lib_LIBRARIES = libfoo.a
+noinst_LIBRARIES = libtu.a
+libtu_a_SOURCES =
+libtu_a_LIBADD = $(LIBOBJS)
 END
 
-cat > foo.c << 'END'
-int main () { return 0; }
+cat > quux.c <<'END'
+extern int dummy;
 END
 
-cat > libfoo.c << 'END'
-int foo () { return 0; }
+cat > zardoz.c <<'END'
+extern int dummy;
 END
 
-
+# These might print warnings, but should not error out.
 $ACLOCAL
+$AUTOMAKE
 $AUTOCONF
-$AUTOMAKE -a
 
-prefix=`pwd`/inst
-./configure --prefix="$prefix" STRIP='strip --verbose'
+./configure FOO=quux
+$MAKE
+ls -l # for debugging
+test -f libtu.a
+ar t libtu.a | $FGREP quux
+ar t libtu.a | $FGREP zardoz && Exit 1
+
+$MAKE distclean
+
+./configure FOO=zardoz
 $MAKE
-$MAKE install-strip
+ls -l # for debugging
+test -f libtu.a 
+ar t libtu.a | $FGREP zardoz
+ar t libtu.a | $FGREP quux && Exit 1
 
 :
diff --git a/tests/strip2.test b/tests/libobj18.test
similarity index 65%
copy from tests/strip2.test
copy to tests/libobj18.test
index 5786ded..e03493e 100755
--- a/tests/strip2.test
+++ b/tests/libobj18.test
@@ -14,10 +14,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Ensure install-strip works when STRIP consists of more than one word.
-# This test needs GNU binutils strip.  See sister test strip3.
+# Make sure AC_LIBSOURCE and AC_LIBSOURCES use arguments literally.
 
-required=strip
 . ./defs || Exit 1
 
 set -e
@@ -25,30 +23,24 @@ set -e
 cat >> configure.in << 'END'
 AC_PROG_CC
 AC_PROG_RANLIB
+foo=dummy bar=dummy baz=dummy
+AC_LIBSOURCE([$foo.c])
+AC_LIBSOURCES([$bar.c, $baz.c])
 AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
-bin_PROGRAMS = foo
-lib_LIBRARIES = libfoo.a
-END
-
-cat > foo.c << 'END'
-int main () { return 0; }
-END
-
-cat > libfoo.c << 'END'
-int foo () { return 0; }
+noinst_LIBRARIES = libtu.a
+libtu_a_SOURCES =
+libtu_a_LIBADD = $(LIBOBJS)
 END
 
+: > dummy.c
 
 $ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
-
-prefix=`pwd`/inst
-./configure --prefix="$prefix" STRIP='strip --verbose'
-$MAKE
-$MAKE install-strip
+AUTOMAKE_fails
+grep 'configure\.in:.*required file.*\$foo\.c.*not found' stderr
+grep 'configure\.in:.*required file.*\$bar\.c.*not found' stderr
+grep 'configure\.in:.*required file.*\$baz\.c.*not found' stderr
 
 :
diff --git a/tests/strip2.test b/tests/libobj19.test
similarity index 57%
copy from tests/strip2.test
copy to tests/libobj19.test
index 5786ded..4fd150b 100755
--- a/tests/strip2.test
+++ b/tests/libobj19.test
@@ -14,41 +14,49 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Ensure install-strip works when STRIP consists of more than one word.
-# This test needs GNU binutils strip.  See sister test strip3.
+# Test support for AC_CONFIG_LIBOBJ_DIR.
 
-required=strip
 . ./defs || Exit 1
 
 set -e
 
 cat >> configure.in << 'END'
+AC_CONFIG_LIBOBJ_DIR([libobj-dir])
 AC_PROG_CC
 AC_PROG_RANLIB
+AC_LIBOBJ([foobar])
 AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
-bin_PROGRAMS = foo
-lib_LIBRARIES = libfoo.a
+AUTOMAKE_OPTIONS = subdir-objects ## required for our setup to work
+noinst_LIBRARIES = libtu.a
+libtu_a_SOURCES =
+libtu_a_LIBADD = $(LIBOBJS)
+check-local: distdir
+       ls -l $(srcdir)/* $(builddir)/* $(distdir)/*
+       test -f libtu.a
+       test ! -r $(srcdir)/foobar.c
+       test -f $(srcdir)/libobj-dir/foobar.c
+       test ! -r $(distdir)/foobar.c
+       test -f $(distdir)/libobj-dir/foobar.c
+       $(AR) t libtu.a
+       $(AR) t libtu.a | grep foobar
 END
 
-cat > foo.c << 'END'
-int main () { return 0; }
+mkdir libobj-dir
+cat > libobj-dir/foobar.c << 'END'
+extern int dummy;
 END
 
-cat > libfoo.c << 'END'
-int foo () { return 0; }
-END
-
-
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE -a
+$AUTOMAKE
+
+./configure
 
-prefix=`pwd`/inst
-./configure --prefix="$prefix" STRIP='strip --verbose'
 $MAKE
-$MAKE install-strip
+$MAKE check
+$MAKE distcheck
 
 :
diff --git a/tests/libobj2.test b/tests/libobj2.test
index 81b0e72..913fef9 100755
--- a/tests/libobj2.test
+++ b/tests/libobj2.test
@@ -1,6 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1999, 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,13 +20,25 @@
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+set -e
+
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([subdir/Makefile])
 AC_PROG_CC
 AC_PROG_RANLIB
 AC_LIBOBJ([fsusage])
-AC_OUTPUT(subdir/Makefile)
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+SUBDIRS = subdir
+check-local: distdir
+       ls -l $(srcdir) $(srcdir)/subdir
+       ls -l $(distdir) $(distdir)/subdir
+       ls -l $(builddir) $(builddir)/subdir
+       test -f $(srcdir)/subdir/fsusage.c
+       test -f $(distdir)/subdir/fsusage.c
+       $(AR) tv $(builddir)/subdir/libtu.a
 END
 
 mkdir subdir
@@ -37,9 +49,20 @@ libtu_a_SOURCES =
 libtu_a_LIBADD = @LIBOBJS@
 END
 
-: > subdir/fsusage.c
+cat > subdir/fsusage.c << 'END'
+extern int dummy;
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+# Older grepping check, kept "just to be sure".
+$FGREP 'fsusage.c' subdir/Makefile.in
+
+./configure
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$MAKE check
+$MAKE distcheck
 
-grep 'fsusage\.c' subdir/Makefile.in
+:
diff --git a/tests/aclibobj.test b/tests/libobj20a.test
similarity index 67%
rename from tests/aclibobj.test
rename to tests/libobj20a.test
index 6ef6f6b..25c3cf3 100755
--- a/tests/aclibobj.test
+++ b/tests/libobj20a.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2003, 2008  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,36 +14,32 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Make sure AC_LIBOBJ and friends work.
+# Test error reporting for AC_CONFIG_LIBOBJ_DIR.
+# See also sister tests `libobj20b.test' and `libobj20c.test' .
 
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
+AC_CONFIG_LIBOBJ_DIR([libobj-dir])
 AC_PROG_CC
 AC_PROG_RANLIB
-AC_OUTPUT
+AC_LIBOBJ([foo])
 END
 
 cat > Makefile.am << 'END'
 noinst_LIBRARIES = libtu.a
 libtu_a_SOURCES =
-libtu_a_LIBADD = @LIBOBJS@
+libtu_a_LIBADD = $(LIBOBJS)
 END
 
-: > maude.c
-: > liver.c
+mkdir libobj-dir
+: > libobj-dir/foo.c
 
 $ACLOCAL
+AUTOMAKE_fails
+grep 'LIBOBJS.*used outside.*libobj-dir' stderr
+grep 'subdir-objects.*not set' stderr
 
-set -e
-
-cp configure.in X
-echo 'AC_LIBSOURCE(maude.c)' >> configure.in
-$AUTOMAKE
-
-# Avoid timestamp-related differences.
-rm -rf autom4te.cache
-
-cp X configure.in
-echo 'AC_LIBSOURCES([maude.c, liver.c])' >> configure.in
-$AUTOMAKE
+:
diff --git a/tests/strip2.test b/tests/libobj20b.test
similarity index 51%
copy from tests/strip2.test
copy to tests/libobj20b.test
index 5786ded..1662110 100755
--- a/tests/strip2.test
+++ b/tests/libobj20b.test
@@ -14,41 +14,44 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Ensure install-strip works when STRIP consists of more than one word.
-# This test needs GNU binutils strip.  See sister test strip3.
+# Test error reporting for AC_CONFIG_LIBOBJ_DIR.
+# See also sister tests `libobj20a.test' and `libobj20c.test' .
 
-required=strip
 . ./defs || Exit 1
 
 set -e
 
 cat >> configure.in << 'END'
+AC_CONFIG_LIBOBJ_DIR([libobj-dir])
 AC_PROG_CC
 AC_PROG_RANLIB
+AC_LIBSOURCE([foobar.c])
+# FIXME: without a call to AC_OUTPUT, Automake does not fail when file(s)
+#        specified in AC_LIBSOURCE call(s) do not exist.  Should we fix
+#        this limitation?  Or is the current behaviour good enough?
 AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
-bin_PROGRAMS = foo
-lib_LIBRARIES = libfoo.a
+AUTOMAKE_OPTIONS = subdir-objects
+noinst_LIBRARIES = libtu.a
+libtu_a_SOURCES =
+libtu_a_LIBADD = $(LIBOBJS)
 END
 
-cat > foo.c << 'END'
-int main () { return 0; }
-END
+$ACLOCAL
 
-cat > libfoo.c << 'END'
-int foo () { return 0; }
-END
+AUTOMAKE_fails
+grep 'configure\.in:.*required directory.*libobj-dir' stderr
 
+mkdir libobj-dir
+: > foobar.c # oops, it should be in libobj-dir...
+AUTOMAKE_fails
+grep 'configure\.in:.*required file.*libobj-dir/foobar.c.*' stderr
 
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
+rm -f foobar.c
 
-prefix=`pwd`/inst
-./configure --prefix="$prefix" STRIP='strip --verbose'
-$MAKE
-$MAKE install-strip
+: > libobj-dir/foobar.c
+$AUTOMAKE # now we should succeed
 
 :
diff --git a/tests/strip2.test b/tests/libobj20c.test
similarity index 57%
copy from tests/strip2.test
copy to tests/libobj20c.test
index 5786ded..4884359 100755
--- a/tests/strip2.test
+++ b/tests/libobj20c.test
@@ -14,41 +14,40 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Ensure install-strip works when STRIP consists of more than one word.
-# This test needs GNU binutils strip.  See sister test strip3.
+# Test error reporting for AC_CONFIG_LIBOBJ_DIR.
+# See also sister tests `libobj20a.test' and `libobj20b.test' .
 
-required=strip
 . ./defs || Exit 1
 
 set -e
 
 cat >> configure.in << 'END'
+AC_CONFIG_LIBOBJ_DIR([libobj-dir])
 AC_PROG_CC
 AC_PROG_RANLIB
-AC_OUTPUT
+AC_LIBOBJ([foobar])
 END
 
 cat > Makefile.am << 'END'
-bin_PROGRAMS = foo
-lib_LIBRARIES = libfoo.a
+AUTOMAKE_OPTIONS = subdir-objects ## required for our setup to work
+noinst_LIBRARIES = libtu.a
+libtu_a_SOURCES =
+libtu_a_LIBADD = $(LIBOBJS)
 END
 
-cat > foo.c << 'END'
-int main () { return 0; }
-END
+$ACLOCAL
 
-cat > libfoo.c << 'END'
-int foo () { return 0; }
-END
+AUTOMAKE_fails
+grep 'configure\.in:.*required directory.*\./libobj-dir' stderr
 
+mkdir libobj-dir
+: > foobar.c # oops, it should be in libobj-dir!
+AUTOMAKE_fails
+grep 'configure\.in:.*required file.*libobj-dir/foobar.c.*' stderr
 
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
+rm -f foobar.c
 
-prefix=`pwd`/inst
-./configure --prefix="$prefix" STRIP='strip --verbose'
-$MAKE
-$MAKE install-strip
+: > libobj-dir/foobar.c
+$AUTOMAKE # now we should succeed
 
 :
diff --git a/tests/libobj3.test b/tests/libobj3.test
index 0aeced9..29aa6d5 100755
--- a/tests/libobj3.test
+++ b/tests/libobj3.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
@@ -14,7 +15,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Make sure we complain if @LIBOBJS@ is used without being set in configure.in
+# Make sure we complain if @LIBOBJS@ is used without being set in
+# configure.in.
 
 . ./defs || Exit 1
 
@@ -32,4 +34,6 @@ END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep 'Makefile.am:3:.*LIBOBJS' stderr
+grep 'Makefile\.am:3:.*LIBOBJS' stderr
+
+:
diff --git a/tests/libobj4.test b/tests/libobj4.test
index d6639be..d31e5ff 100755
--- a/tests/libobj4.test
+++ b/tests/libobj4.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
@@ -19,14 +19,18 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 bin_PROGRAMS = foo
 END
 
 cat >> configure.in << 'END'
 AC_PROG_CC
-AC_REPLACE_FUNCS(foo)
+AC_REPLACE_FUNCS([foo])
 END
 
-$ACLOCAL || Exit 1
+$ACLOCAL
 $AUTOMAKE
+
+:
diff --git a/tests/libobj5.test b/tests/libobj5.test
index 6add9e3..7aa218a 100755
--- a/tests/libobj5.test
+++ b/tests/libobj5.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
@@ -19,6 +19,8 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 bin_PROGRAMS = joe
 LDADD = @LIBOBJS@
@@ -27,11 +29,13 @@ END
 cat >> configure.in << 'END'
 AC_PROG_CC
 AC_REPLACE_FUNCS(\
-   foo)
+   foo_bar_quux)
 END
 
-: > foo.c
+: > foo_bar_quux.c
+
+$ACLOCAL
+$AUTOMAKE
+$FGREP foo_bar_quux.c Makefile.in
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
-$FGREP foo.c Makefile.in
+:
diff --git a/tests/libobj7.test b/tests/libobj7.test
index 73a8ab0..be51db7 100755
--- a/tests/libobj7.test
+++ b/tests/libobj7.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1997, 1998, 2000, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1997, 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
@@ -18,33 +19,55 @@
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+set -e
+
+cat >> configure.in << 'END'
 AC_PROG_CC
 AC_PROG_RANLIB
-AC_REPLACE_FUNCS(basename dirname strsignal)
-AC_OUTPUT(Makefile)
+# `am__dummy_function' is there to ensure that at least one function is
+# replaced, to avoid creating an empty archive which can cause problems
+# with e.g. Solaris ar.
+AC_REPLACE_FUNCS([basename dirname am__dummy_function])
+AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
 noinst_LIBRARIES = libtu.a
 libtu_a_SOURCES =
 libtu_a_LIBADD = @LIBOBJS@
+check-local: test1 test2 test3
+.PHONY: test1 test2 test3
+test1: all
+       $(AR) tv libtu.a
+test2:
+       @echo DIST_COMMON = $(DIST_COMMON)
+       echo ' ' $(DIST_COMMON) ' ' | grep '[ /]basename\.c '
+       echo ' ' $(DIST_COMMON) ' ' | grep '[ /]dirname\.c '
+       echo ' ' $(DIST_COMMON) ' ' | grep '[ /]am__dummy_function\.c '
+test3: distdir
+       test -f $(distdir)/basename.c
+       test -f $(distdir)/dirname.c
+       test -f $(distdir)/am__dummy_function.c
+END
+
+cat > basename.c <<'END'
+extern int dummy1;
+END
+cat > dirname.c <<'END'
+extern int dummy2;
 END
+cat > am__dummy_function.c <<'END'
+extern int dummy3;
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+$MAKE
+$MAKE check
+$MAKE distcheck
 
-: > basename.c
-: > dirname.c
-: > strsignal.c
-
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
-
-sed -n -e ': again
-  /^DIST_COMMON.*[^\]$/ p
-  /^DIST_COMMON/ {
-     s/^DIST_COMMON//p
-     n
-     s/^/DIST_COMMON/
-     b again
-  }' < Makefile.in | $FGREP dirname.c
+:
diff --git a/tests/libobj8.test b/tests/libobj8.test
index c06746b..95f21ed 100755
--- a/tests/libobj8.test
+++ b/tests/libobj8.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1998, 2000, 2001, 2002, 2006  Free Software Foundation, Inc.
+# Copyright (C) 1998, 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,15 +20,15 @@
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+set -e
+
+cat >> configure.in << 'END'
 AC_PROG_CC
 AC_PROG_CC_STDC
 AC_PROG_RANLIB
 AC_REPLACE_FUNCS(basename dirname strsignal)
 AM_C_PROTOTYPES
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
@@ -44,7 +45,9 @@ END
 : > ansi2knr.1
 : > ansi2knr.c
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
+
+$FGREP 'strsignal_.c:' Makefile.in
 
-grep 'strsignal_.c:' Makefile.in
+:
diff --git a/tests/ltlibobjs.test b/tests/ltlibobjs.test
index fd66473..e34e667 100755
--- a/tests/ltlibobjs.test
+++ b/tests/ltlibobjs.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
@@ -19,8 +19,10 @@
 required=libtool
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
-AC_SUBST(LTLIBOBJS)
+AC_SUBST([LTLIBOBJS])
 AC_PROG_LIBTOOL
 END
 
@@ -35,5 +37,7 @@ END
 : > config.guess
 : > config.sub
 
-$ACLOCAL || Exit 1
+$ACLOCAL
 $AUTOMAKE
+
+:
diff --git a/tests/posixsubst-data.test b/tests/posixsubst-data.test
new file mode 100755
index 0000000..13d05b6
--- /dev/null
+++ b/tests/posixsubst-data.test
@@ -0,0 +1,76 @@
+#! /bin/sh
+# 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test that POSIX variable expansion `$(var:str=rpl)' works
+# in when used with the DATA primary.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+foodir = $(prefix)
+
+t1 = foo1 foo2
+t2 = barx
+t3 = baz.y
+
+bar.data bazzardoz:
+       : > $@
+CLEANFILES = bar.data bazzardoz
+
+# Try also with `:=', to ensure the parser is not unduly confused
+# into thinking that it's an unportable assignement operator.
+dist_foo_DATA = $(t1:=.txt)
+foo_DATA = $(t2:x=.data)
+nodist_foo_DATA = $(t3:.y=zardoz)
+
+check-local: test
+.PHONY: test
+test: distdir
+       ls -l $(distdir)
+       test ! -r $(distdir)/foo.data
+       test ! -r $(distdir)/bazzardoz
+
+installcheck-local:
+       ls -l $(prefix)
+       test -f $(prefix)/foo1.txt
+       test -f $(prefix)/foo2.txt
+       test -f $(prefix)/bar.data
+       test -f $(prefix)/bazzardoz
+END
+
+: > foo1.txt
+: > foo2.txt
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+cwd=`pwd` || Exit 1
+./configure --prefix="$cwd/_inst"
+$MAKE install
+test -f bar.data
+test -f bazzardoz
+$MAKE test
+$MAKE installcheck
+$MAKE distcheck
+
+:
diff --git a/tests/colneq3.test b/tests/posixsubst-extradist.test
similarity index 63%
copy from tests/colneq3.test
copy to tests/posixsubst-extradist.test
index 0ff8bce..3509575 100755
--- a/tests/colneq3.test
+++ b/tests/posixsubst-extradist.test
@@ -14,9 +14,9 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Test that := definitions work as expected at make time.
+# Test that POSIX variable expansion `$(var:str=rpl)' works when used
+# in EXTRA_DIST.
 
-required=GNUmake
 . ./defs || Exit 1
 
 set -e
@@ -26,19 +26,29 @@ AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
-BAR := $(FOO)
-BAZ = $(FOO)
-FOO := foo
+t1 = foo1 foo2
+t2 = bar.x
+t3 = baz-y
+# Try also with `:=', to ensure the parser is not unduly confused
+# into thinking that it's an unportable assignement operator.
+EXTRA_DIST = $(t1:=.c) $(t2:.x=.f) $(t3:-y=ar)
+bazar bar.f:
+       : > $@
 .PHONY: test
-test:
-       test x'$(FOO)' = x'foo'
-       test x'$(BAZ)' = x'foo'
-       test x'$(BAR)' = x
+test: distdir
+       ls -l $(distdir)
+       test -f $(distdir)/foo1.c
+       test -f $(distdir)/foo2.c
+       test -f $(distdir)/bar.f
+       test -f $(distdir)/bazar
 END
 
+: > foo1.c
+: > foo2.c
+
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE -Wno-portability
+$AUTOMAKE
 
 ./configure
 $MAKE test
diff --git a/tests/posixsubst-ldadd.test b/tests/posixsubst-ldadd.test
new file mode 100755
index 0000000..d4c5a7e
--- /dev/null
+++ b/tests/posixsubst-ldadd.test
@@ -0,0 +1,78 @@
+#! /bin/sh
+# 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test that POSIX variable expansion `$(var:str=rpl)' works
+# in when used in LDADD.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+u = libquux1.lib libquux2.lib
+v = libquux1
+w = none
+
+zardozdir = $(prefix)/zardoz
+zardoz_PROGRAMS = foo bar
+
+noinst_LIBRARIES = libquux1.a libquux2.a libquux3.a
+
+# Try also with `:=', to ensure the parser is not unduly confused
+# into thinking that it's an unportable assignement operator.
+LDADD = $(u:.lib=.a)
+bar_LDADD = $(v:=.a) libquux2.a $(w:none=libquux3.a)
+
+libquux1.c:
+       echo 'int quux1(void) { return 0; }' > $@
+CLEANFILES = libquux1.c # for FreeBSD make
+END
+
+cat > foo.c <<'END'
+int main(void)
+{
+  int quux1(void), quux2(void);
+  return quux1() + quux2();
+}
+END
+
+cat > bar.c <<'END'
+int main(void)
+{
+  int quux1(void), quux2(void), quux3(void);
+  return quux1() + quux2() + quux3();
+}
+END
+
+echo 'int quux2(void) { return 0; }' > libquux2.c
+echo 'int quux3(void) { return 0; }' > libquux3.c
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+$MAKE
+test -f libquux1.c
+$MAKE distcheck
+
+:
diff --git a/tests/posixsubst-libraries.test b/tests/posixsubst-libraries.test
new file mode 100755
index 0000000..23e7e78
--- /dev/null
+++ b/tests/posixsubst-libraries.test
@@ -0,0 +1,65 @@
+#! /bin/sh
+# 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test that POSIX variable expansion `$(var:str=rpl)' works when used
+# with the LIBRARIES primary in a "simple" way.
+# Keep this in sync with sister test `posixsubst-ltlibraries.test'.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+foolibs = libfoo1 libfoo2
+barlibs = libbaz
+
+# Try also with `:=', to ensure the parser is not unduly confused
+# into thinking that it's an unportable assignement operator.
+lib_LIBRARIES = $(foolibs:=.a) $(barlibs:z=r.a)
+
+libbar.c:
+       echo 'int bar(void) { return 0; }' > $@
+CLEANFILES = libbar.c # for FreeBSD make
+
+installcheck-local:
+       ls -l $(prefix)/lib
+       test -f $(prefix)/lib/libfoo1.a
+       test -f $(prefix)/lib/libfoo2.a
+       test -f $(prefix)/lib/libbar.a
+END
+
+echo 'int bar1(void) { return 0; }' > libfoo1.c
+echo 'int bar2(void) { return 0; }' > libfoo2.c
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+cwd=`pwd` || Exit 1
+./configure --prefix="$cwd/_inst"
+$MAKE
+test -f libfoo2.c
+$MAKE install
+$MAKE installcheck
+$MAKE distcheck
+
+:
diff --git a/tests/posixsubst-ltlibraries.test 
b/tests/posixsubst-ltlibraries.test
new file mode 100755
index 0000000..7af1d93
--- /dev/null
+++ b/tests/posixsubst-ltlibraries.test
@@ -0,0 +1,67 @@
+#! /bin/sh
+# 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test that POSIX variable expansion `$(var:str=rpl)' works when used
+# with the LTLIBRARIES primary in a "simple" way.
+# Keep this in sync with sister test `posixsubst-libraries.test'.
+
+required='libtool libtoolize'
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_LIBTOOL
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+foolibs = libfoo1 libfoo2
+barlibs = libbaz
+
+# Try also with `:=', to ensure the parser is not unduly confused
+# into thinking that it's an unportable assignement operator.
+lib_LTLIBRARIES = $(foolibs:=.la) $(barlibs:z=r.la)
+
+libbar.c:
+       echo 'int bar(void) { return 0; }' > $@
+CLEANFILES = libbar.c # for FreeBSD make
+
+installcheck-local:
+       ls -l $(prefix)/lib
+       test -f $(prefix)/lib/libfoo1.la
+       test -f $(prefix)/lib/libfoo2.la
+       test -f $(prefix)/lib/libbar.la
+END
+
+echo 'int bar1(void) { return 0; }' > libfoo1.c
+echo 'int bar2(void) { return 0; }' > libfoo2.c
+
+libtoolize
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+cwd=`pwd` || Exit 1
+./configure --prefix="$cwd/_inst"
+$MAKE
+test -f libfoo2.c
+$MAKE install
+$MAKE installcheck
+$MAKE distcheck
+
+:
diff --git a/tests/confh8.test b/tests/posixsubst-programs.test
similarity index 50%
copy from tests/confh8.test
copy to tests/posixsubst-programs.test
index 146d2f0..73e5479 100755
--- a/tests/confh8.test
+++ b/tests/posixsubst-programs.test
@@ -14,55 +14,51 @@
 # 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 several config headers are allowed.
-# See also sister "minimalistic" test `confh7.test'.
+# Test that POSIX variable expansion `$(var:str=rpl)' works when used
+# with the PROGRAMS primary.
 
 . ./defs || Exit 1
 
 set -e
 
 cat >> configure.in << 'END'
-AM_CONFIG_HEADER([one.h two.h])
+AC_PROG_CC
 AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
-.PHONY: test0 test1 test2
-test0:
-       @echo DIST_COMMON = $(DIST_COMMON)
-       echo ' ' $(DIST_COMMON) ' ' | grep '[ /]one\.h\.in '
-       echo ' ' $(DIST_COMMON) ' ' | grep '[ /]two\.h\.in '
-       : Processed header files should not be distributed.
-       if echo ' ' $(DIST_COMMON) ' ' | grep '\.h '; then \
-         exit 1; \
-       else \
-         exit 0; \
-       fi
-test1: all
-       test -f one.h
-       test -f two.h
-test2: distdir
-       ls -l $(distdir)/*
-       test -f $(distdir)/one.h.in
-       test -f $(distdir)/two.h.in
-       : Processed header files should not be distributed.
-       test ! -r $(distdir)/one.h
-       test ! -r $(distdir)/two.h
-check-local: test0 test1 test2
+t1 = foo1 foo2
+t2 = barx bar2
+
+# Try also with `:=', to ensure the parser is not unduly confused
+# into thinking that it's an unportable assignement operator.
+bin_PROGRAMS = $(t1:=-p) $(t2:2=y)
+
+installcheck-local:
+       ls -l $(prefix)/bin
+       test -f $(prefix)/bin/foo1-p$(EXEEXT)
+       test -x $(prefix)/bin/foo1-p$(EXEEXT)
+       test -f $(prefix)/bin/foo2-p$(EXEEXT)
+       test -x $(prefix)/bin/foo2-p$(EXEEXT)
+       test -f $(prefix)/bin/barx$(EXEEXT)
+       test -x $(prefix)/bin/barx$(EXEEXT)
+       test -f $(prefix)/bin/bary$(EXEEXT)
+       test -x $(prefix)/bin/bary$(EXEEXT)
 END
 
-: > one.h.in
-: > two.h.in
+for f in foo1-p.c foo2-p.c barx.c bary.c; do
+  echo 'int main(void) { return 0; }' > $f
+done
 
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
 
-./configure
-
-$MAKE test0
-$MAKE test1
-$MAKE test2
+cwd=`pwd` || Exit 1
+./configure --prefix="$cwd/_inst"
+$MAKE
+$MAKE install
+$MAKE installcheck
 $MAKE distcheck
 
 :
diff --git a/tests/posixsubst-scripts.test b/tests/posixsubst-scripts.test
new file mode 100755
index 0000000..94b51af
--- /dev/null
+++ b/tests/posixsubst-scripts.test
@@ -0,0 +1,89 @@
+#! /bin/sh
+# 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test that POSIX variable expansion `$(var:str=rpl)' works when used
+# with the SCRIPTS primary.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+t1 = foo1 foo2
+t2 = bar1x bar2
+t3 = quu-baz
+
+bar1 bar2 quux.pl:
+       : > $@
+CLEANFILES = bar1 bar2 quux.pl
+
+# Try also with `:=', to ensure the parser is not unduly confused
+# into thinking that it's an unportable assignement operator.
+dist_sbin_SCRIPTS = $(t1:=.sh)
+libexec_SCRIPTS = $(t2:x=)
+nodist_bin_SCRIPTS = $(t3:-baz=x.pl)
+
+check-local: test1 test2
+.PHONY: test1 test2
+test1:
+       ls -l
+       test -f bar1
+       test -f bar2
+       test -f quux.pl
+test2: distdir
+       ls -l $(distdir)
+       ## the scripts foo1.sh and foo2.sh should be distributed
+       test -f $(distdir)/foo1.sh
+       test -f $(distdir)/foo2.sh
+       ## the scripts bar1, bar2 and quux.pl shouldn't be distributed
+       test ! -r $(distdir)/bar1
+       test ! -r $(distdir)/bar2
+       test ! -r $(distdir)/quux.pl
+
+installcheck-local:
+       ls -l $(prefix)/libexec $(prefix)/bin $(prefix)/sbin
+       test -f $(prefix)/sbin/foo1.sh
+       test -x $(prefix)/sbin/foo1.sh
+       test -f $(prefix)/sbin/foo2.sh
+       test -x $(prefix)/sbin/foo2.sh
+       test -f $(prefix)/libexec/bar1
+       test -x $(prefix)/libexec/bar1
+       test -f $(prefix)/libexec/bar2
+       test -x $(prefix)/libexec/bar2
+       test -f $(prefix)/bin/quux.pl
+       test -x $(prefix)/bin/quux.pl
+END
+
+: > foo1.sh
+: > foo2.sh
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+cwd=`pwd` || Exit 1
+./configure --prefix="$cwd/_inst"
+$MAKE
+$MAKE test1 test2
+$MAKE install
+$MAKE installcheck
+$MAKE distcheck
+
+:
diff --git a/tests/posixsubst-sources.test b/tests/posixsubst-sources.test
new file mode 100755
index 0000000..bde7b6a
--- /dev/null
+++ b/tests/posixsubst-sources.test
@@ -0,0 +1,82 @@
+#! /bin/sh
+# 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test that POSIX variable expansion `$(var:str=rpl)' works when used
+# with the SOURCES primary.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = foo
+
+FOO = foo.cxx
+BAR = bar__
+BAZ = baz.
+
+# Try also with `:=', to ensure the parser is not unduly confused
+# into thinking that it's an unportable assignement operator.
+foo_SOURCES = main.c $(FOO:.cxx=.c)
+dist_foo_SOURCES = $(BAR:__=.c)
+nodist_foo_SOURCES = $(BAZ:=c)
+
+bar.c baz.c:
+       echo 'int $@ (void) { return 0; }' | sed 's/\.c //' > $@
+CLEANFILES = baz.c
+CLEANFILES += bar.c # for FreeBSD make
+
+.PHONY: test test2
+check-local: test1 test2
+test1:
+       ls -l . $(srcdir)
+       test -f $(srcdir)/bar.c
+       test -f baz.c
+test2: distdir
+       ls -l $(distdir)
+       ## these sources should be distributed ...
+       test -f $(distdir)/bar.c
+       test -f $(distdir)/foo.c
+       test -f $(distdir)/main.c
+       ## ... and this shouldn't
+       test ! -r $(distdir)/baz.c
+END
+
+cat > main.c <<'END'
+int main(void)
+{
+  int foo(void), bar(void), baz(void);
+  return foo() + bar() + baz();
+}
+END
+
+echo 'int foo(void) { return 0; }' > foo.c
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+$MAKE
+$MAKE test1 test2
+$MAKE distcheck
+
+:
diff --git a/tests/posixsubst-tests.test b/tests/posixsubst-tests.test
new file mode 100755
index 0000000..158d0ad
--- /dev/null
+++ b/tests/posixsubst-tests.test
@@ -0,0 +1,70 @@
+#! /bin/sh
+# 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test that POSIX variable expansion `$(var:str=rpl)' works when used
+# with the TESTS special variable.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+t1 = foo1 foo2
+t2 = barx
+t3 = bar2
+
+foo2.test barz:
+       (echo '#!/bin/sh' && echo 'exit 0') > $@ && chmod a+x $@
+CLEANFILES = foo2.test barz # for FreeBSD make
+
+# Try also with `:=', to ensure the parser is not unduly confused
+# into thinking that it's an unportable assignement operator.
+TESTS = $(t1:=.test) $(t2:x=y) $(t3:2=z)
+
+EXTRA_DIST = $(TESTS)
+MOSTLYCLEANFILES = *.out
+END
+
+cat > foo1.test <<'END'
+#!/bin/sh
+touch foo1.out
+test x"${TESTSUITE_OK-no}" = x"yes"
+END
+sed 's/foo1/bary/g' foo1.test > bary
+chmod +x foo1.test bary
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+$MAKE check >out 2>&1 && { cat out; Exit 1; }
+cat out
+ls -l
+grep '^FAIL: foo1\.test *$' out
+grep '^PASS: foo2\.test *$' out
+grep '^FAIL: bary *$' out
+grep '^PASS: barz *$' out
+test -f foo1.out
+test -f bary.out
+
+TESTSUITE_OK=yes $MAKE distcheck
+
+:


hooks/post-receive
-- 
GNU Automake



reply via email to

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