automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, testsuite-work, updated. v1


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, testsuite-work, updated. v1.11-1457-gfc78d51
Date: Thu, 06 Oct 2011 12:48:23 +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=fc78d517bfd36cff9af5ce8b5f16ad44e94559a3

The branch, testsuite-work has been updated
       via  fc78d517bfd36cff9af5ce8b5f16ad44e94559a3 (commit)
       via  4f2ad33d7b8c47fede24c8661ed4d37f67f567c1 (commit)
       via  0da79637931ff0abeffc3d6b8352e18ef72b3609 (commit)
       via  8b27c5b5678b4502d15c0a6c8fdcda7a45ddbb16 (commit)
       via  59919b1abf748166c0329fa1bfe5f3c3302670c2 (commit)
       via  e8082fb643b8ecd5997b9d8ca52204a81d60ea10 (commit)
       via  bbfca16e5b63386abb44f0872555198e86bd8738 (commit)
       via  90bea64bc5023be075b63bf7c651d0242f35a83c (commit)
       via  c5d19098a3deb8fc7f6ca89398edb22854737950 (commit)
       via  e834f22817217fa113e6c900d08a553051384227 (commit)
       via  6816b316a8424f868342218eab4d61497988bea6 (commit)
       via  5014b1c294a4b8982ab3c7c78e2272fdcdff468d (commit)
       via  b100d18da312f4b22be283b9a877b221667b2245 (commit)
       via  a2498fe8d148c507e5e09b7de8a5aee9f2418e5c (commit)
      from  03ad746590f114984d09c862a7c87e437cb81299 (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 fc78d517bfd36cff9af5ce8b5f16ad44e94559a3
Merge: 4f2ad33 0da7963
Author: Stefano Lattarini <address@hidden>
Date:   Thu Oct 6 14:46:44 2011 +0200

    Merge branch 'test-protocols' into testsuite-work

commit 4f2ad33d7b8c47fede24c8661ed4d37f67f567c1
Merge: 03ad746 5014b1c
Author: Stefano Lattarini <address@hidden>
Date:   Thu Oct 6 14:35:50 2011 +0200

    Merge branch 'test-protocols' into testsuite-work
    
    * test-protocols
      tap/awk: improve comments about Korn shell signal handling issues

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

Summary of changes:
 ChangeLog                                          |   65 +++++++++++++
 Makefile.in                                        |   14 +++-
 NEWS                                               |    9 ++
 automake.in                                        |   12 ++-
 doc/automake.texi                                  |   27 ++++-
 lib/am/distdir.am                                  |   22 ++++-
 lib/tap-driver.sh                                  |   18 ++--
 tests/Makefile.am                                  |    2 +
 tests/Makefile.in                                  |    7 ++
 ...utodist-aclocal-m4.test => dist-auxfile-2.test} |   49 ++++++----
 tests/dist-auxfile.test                            |   96 +++++++++++++++++++
 ...info18.test => distcheck-override-infodir.test} |   52 ++++-------
 tests/distcheck-pr9579.test                        |   98 ++++++++++++++++++++
 tests/list-of-tests.mk                             |    5 +
 tests/test-extensions.test                         |   73 +++++++++++++++
 15 files changed, 476 insertions(+), 73 deletions(-)
 copy tests/{autodist-aclocal-m4.test => dist-auxfile-2.test} (57%)
 create mode 100755 tests/dist-auxfile.test
 copy tests/{txinfo18.test => distcheck-override-infodir.test} (59%)
 create mode 100755 tests/distcheck-pr9579.test
 mode change 100644 => 100755 tests/nobase-nodist.test
 create mode 100755 tests/test-extensions.test

diff --git a/ChangeLog b/ChangeLog
index e91a3e6..6e6783e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,68 @@
+2011-10-06  Stefano Lattarini  <address@hidden>
+
+       fix: make a test script executable
+       * tests/nobase-nodist.test: Make executable.
+
+2011-10-06  Stefano Lattarini  <address@hidden>
+
+       coverage: expose automake bug#9651
+       * tests/dist-auxfile.test: New test, xfailing.
+       * tests/dist-auxfile-2.test: Likewise.
+       * tests/Makefile.am (TESTS, XFAIL_TESTS): Add them.
+
+2011-10-01  Stefano Lattarini  <address@hidden>
+
+       parallel-tests: automake error our on invalid TEST_EXTENSIONS
+       This change fixes automake bug#9400.
+       * automake.in (handle_tests): Bail out if a suffix specified in
+       TEST_EXTENSIONS would produce an invalid `xxx_LOG_COMPILER'
+       variable or an invalid suffix rule.  Before this change, automake
+       would have issued a confusing error messages (about invalid or
+       non-POSIX variables being defined), and in some situations would
+       have even produced a broken `Makefile.in' file.
+       ($TEST_EXTENSION_PATTERN): New helper variable.
+       * doc/automake.texi (Simple Tests using parallel-tests): Document
+       the limitations on TEST_EXTENSIONS explicitly.
+       * NEWS: Update.
+       * tests/test-extensions.test: New test.
+       * tests/Makefile.am (TESTS): Update.
+
+2011-09-28  Stefano Lattarini  <address@hidden>
+
+       docs: don't suggest installing `.m4' files in hard-coded location
+       This change fixes automake bug#7988.
+       * doc/automake.texi (aclocal Options): State that the use of
+       the `--print-ac-dir' option to determine the directory where
+       third-party packages can install their `.m4' files is discouraged
+       now.
+       (Extending aclocal): Suggest telling the user about ACLOCAL_PATH.
+       * THANKS: Update.
+       Report by Peter Johansson.
+
+2011-09-26  Stefano Lattarini  <address@hidden>
+
+       distuninstallcheck: fail also when only one file is left installed
+       This change fixes automake bug#9579.
+       * lib/am/distdir.am (distuninstallcheck): Be stricter in ignoring
+       a potential `dir' file created by install-info and left installed.
+       Also, be more careful about "this can't happen" kind of errors.
+       (am__distuninstallcheck_listfiles): New internal helper macro.
+       * tests/distcheck-pr9579.test: New test.
+       * tests/distcheck-override-infodir.test: Likewise.
+       * tests/Makefile.am (TESTS): Add them.
+       * NEWS, THANKS: Update.
+       Report by Nick Bowler.
+
+2011-09-28  Stefano Lattarini  <address@hidden>
+
+       tap/awk: improve comments about Korn shell signal handling issues
+       * lib/tap-driver.sh: Link an Austin Group discussion about how
+       shells are allowed, and even encouraged, to set the special
+       variable `$?' to values greater than 256 to report termination
+       of a child by a signal.  Improve and extend comments about our
+       workarounds for unusual korn shell signals' propagation.
+       Thanks to Eric Blake for the pointers.
+
 2011-09-28  Stefano Lattarini  <address@hidden>
 
        maintcheck: fix usage of `cd' instead of `$(am__cd)'
diff --git a/Makefile.in b/Makefile.in
index 66d38a9..06c31fe 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -161,6 +161,8 @@ DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
 GZIP_ENV = --best
 DIST_TARGETS = dist-bzip2 dist-gzip
 distuninstallcheck_listfiles = find . -type f -print
+am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
+  | sed 's|^\./|${prefix}/|' | grep -v '${infodir}/dir$$'
 distcleancheck_listfiles = find . -type f -print
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -819,8 +821,16 @@ distcheck: dist
          list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
          sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
 distuninstallcheck:
-       @$(am__cd) '$(distuninstallcheck_dir)' \
-       && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+       @test -n '$(distuninstallcheck_dir)' || { \
+         echo 'ERROR: trying to run $@ with an empty' \
+              '$$(distuninstallcheck_dir)' >&2; \
+         exit 1; \
+       }; \
+       $(am__cd) '$(distuninstallcheck_dir)' || { \
+         echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
+         exit 1; \
+       }; \
+       test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
           || { echo "ERROR: files left after uninstall:" ; \
                if test -n "$(DESTDIR)"; then \
                  echo "  (check DESTDIR support)"; \
diff --git a/NEWS b/NEWS
index e7118d7..95f69c3 100644
--- a/NEWS
+++ b/NEWS
@@ -156,6 +156,12 @@ Bugs fixed in 1.11a:
     does not report spurious successes when used with concurrent FreeBSD
     make (e.g., "make check -j3").
 
+  - Automake now explicitly rejects invalid entries in TEST_EXTENSIONS when
+    the parallel-tests diver is in use, instead of issuing confusing and
+    apparently unrelated error messages (about "non-POSIX variable name"
+    or "bad characters in variable name"), or even, in some situations,
+    producing broken `Makefile.in' files.
+
   - The `silent-rules' option now also silences all compile rules if dependency
     tracking is disabled.  Also, when `silent-rules' is not used, the output 
from
     `make' does not contain spurious extra lines with only a backslash in them
@@ -170,6 +176,9 @@ Bugs fixed in 1.11a:
 
   - Automake's own build system finally have a real "installcheck" target.
 
+  - "make distcheck" now correctly complains also when "make uninstall"
+    leaves one and only one file installed in $(prefix).
+
   - A "make uninstall" issued before a "make install", or after a mere
     "make install-data" or a mere "make install-exec" does not spuriously
     fail anymore.
diff --git a/automake.in b/automake.in
index 91ae825..d9caa6e 100644
--- a/automake.in
+++ b/automake.in
@@ -210,6 +210,8 @@ my $INCLUDE_PATTERN = ('^include\s+'
 # Directories installed during 'install-exec' phase.
 my $EXEC_DIR_PATTERN =
   '^(?:bin|sbin|libexec|sysconf|localstate|lib|pkglib|.*exec.*)' . "\$";
+# Suffixes that can appear in TEST_EXTENSIONS (parallel-tests support).
+my $TEST_EXTENSION_PATTERN = '^(\.[a-zA-Z_][a-zA-Z0-9_]*|@[a-zA-Z0-9_]+@)$';
 
 # Values for AC_CANONICAL_*
 use constant AC_CANONICAL_BUILD  => 1;
@@ -4888,7 +4890,15 @@ sub handle_tests
            }
          define_variable ('TEST_EXTENSIONS', $suff, INTERNAL);
          # FIXME: this mishandles conditions.
-         my @test_suffixes = (var 'TEST_EXTENSIONS')->value_as_list_recursive;
+         my $var = rvar 'TEST_EXTENSIONS';
+         my @test_suffixes = $var->value_as_list_recursive;
+          if ((my @invalid_test_suffixes =
+                  grep { !/$TEST_EXTENSION_PATTERN/o } @test_suffixes) > 0)
+            {
+              error $var->rdef (TRUE)->location,
+                    "invalid test extensions: @invalid_test_suffixes";
+            }
+          @test_suffixes = grep { /$TEST_EXTENSION_PATTERN/o } @test_suffixes;
          if ($handle_exeext)
            {
              unshift (@test_suffixes, $at_exeext)
diff --git a/doc/automake.texi b/doc/automake.texi
index c75b866..c60f3f0 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -3296,8 +3296,12 @@ Cause the output to be put into @var{file} instead of 
@file{aclocal.m4}.
 @opindex --print-ac-dir
 Prints the name of the directory that @command{aclocal} will search to
 find third-party @file{.m4} files.  When this option is given, normal
-processing is suppressed.  This option can be used by a package to
-determine where to install a macro file.
+processing is suppressed.  This option was used @emph{in the past} by
+third-party packages to determine where to install @file{.m4} macro
+files, but @emph{this usage is today discouraged}, since it causes
address@hidden(prefix)} not to be thoroughly honoured (which violates the
+GNU Coding Standards), and a similar semantics can be better obtained
+with the @env{ACLOCAL_PATH} environment variable; @pxref{Extending aclocal}.
 
 @item --verbose
 @opindex --verbose
@@ -3472,6 +3476,7 @@ Similarly, @file{dirlist} can be handy if you have 
installed a local
 copy of Automake in your account and want @command{aclocal} to look for
 macros installed at other places on the system.
 
address@hidden
 @subsubheading Modifying the Macro Search Path: @file{ACLOCAL_PATH}
 @cindex @env{ACLOCAL_PATH}
 
@@ -3533,8 +3538,12 @@ aclocal_DATA = mymacro.m4 myothermacro.m4
 
 @noindent
 Please do use @file{$(datadir)/aclocal}, and not something based on
-the result of @samp{aclocal --print-ac-dir}.  @xref{Hard-Coded Install
-Paths}, for arguments.
+the result of @samp{aclocal --print-ac-dir} (@pxref{Hard-Coded Install
+Paths}, for arguments).  It might also be helpful to suggest to
+the user to add the @file{$(datadir)/aclocal} directory to his
address@hidden variable (@pxref{ACLOCAL_PATH}) so that
address@hidden will find the @file{.m4} files installed by your
+package automatically.
 
 A file of macros should be a series of properly quoted
 @code{AC_DEFUN}'s (@pxref{Macro Definitions, , , autoconf, The
@@ -9018,8 +9027,14 @@ corresponding test has completed.  The set of log files 
is listed in
 the read-only variable @code{TEST_LOGS}, and defaults to @code{TESTS},
 with the executable extension if any (@pxref{EXEEXT}), as well as any
 suffix listed in @code{TEST_EXTENSIONS} removed, and @file{.log} appended.
address@hidden defaults to @file{.test}.  Results are undefined
-if a test file name ends in several concatenated suffixes.
+Results are undefined if a test file name ends in several concatenated
+suffixes.  @code{TEST_EXTENSIONS} defaults to @file{.test}; it can be
+overridden by the user, in which case any extension listed in it must be
+constituted by a dot, followed by a non-digit alphabetic character,
+followed by any number of alphabetic characters.
address@hidden Keep in sync with test-extensions.test.
+For example, @samp{.sh}, @samp{.T} and @samp{.t1} are valid extensions,
+while @samp{.x-y}, @samp{.6c} and @samp{.t.1} are not.
 
 @vindex _LOG_COMPILE
 @vindex _LOG_COMPILER
diff --git a/lib/am/distdir.am b/lib/am/distdir.am
index 29f2d7f..81bd62c 100644
--- a/lib/am/distdir.am
+++ b/lib/am/distdir.am
@@ -1,6 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
 ## Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-## 2010 Free Software Foundation, Inc.
+## 2010, 2011 Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -530,11 +530,23 @@ distcheck: dist
 ## from distcheck, so that they can be overridden by the user.
 .PHONY: distuninstallcheck
 distuninstallcheck_listfiles = find . -type f -print
+## The `dir' file (created by install-info) might still exist after
+## uninstall, so we must be prepared to account for it.  The following
+## check is not 100% strict, but is definitely good enough, and even
+## accounts for overridden ${infodir}.
+am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
+  | sed 's|^\./|${prefix}/|' | grep -v '${infodir}/dir$$'
 distuninstallcheck:
-## We use -le 1 because the `dir' file (created by install-info)
-## might still exist after uninstall.
-       @$(am__cd) '$(distuninstallcheck_dir)' \
-       && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+       @test -n '$(distuninstallcheck_dir)' || { \
+         echo 'ERROR: trying to run $@ with an empty' \
+              '$$(distuninstallcheck_dir)' >&2; \
+         exit 1; \
+       }; \
+       $(am__cd) '$(distuninstallcheck_dir)' || { \
+         echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
+         exit 1; \
+       }; \
+       test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
           || { echo "ERROR: files left after uninstall:" ; \
                if test -n "$(DESTDIR)"; then \
                  echo "  (check DESTDIR support)"; \
diff --git a/lib/tap-driver.sh b/lib/tap-driver.sh
index e9f1037..c911991 100755
--- a/lib/tap-driver.sh
+++ b/lib/tap-driver.sh
@@ -117,14 +117,17 @@ fi
 
 {
   (
-    # Ignore common signals (in this subshell only!) to avoid potential
+    # Ignore common signals (in this subshell only!), to avoid potential
     # problems with Korn shells.  Some Korn shells are known to propagate
     # to themselves signals that have killed a child process they were
-    # waiting for (this is done at least for SIGINT -- and usually only
-    # for it in truth); this would cause a premature exit in this subshell,
-    # so that the awk script would never seen the exit status it expects
-    # on its last input line (and which is displayed below by the last
-    # `echo $?' command), and would thus die reporting an internal error.
+    # waiting for; this is done at least for SIGINT (and usually only for
+    # it, in truth).  Without the `trap' below, such a behaviour could
+    # cause a premature exit in the current subshell, e.g., in case the
+    # test command it runs gets terminated by a SIGINT.  Thus, the awk
+    # script we are piping into would never seen the exit status it
+    # expects on its last input line (which is displayed below by the
+    # last `echo $?' statement), and would thus die reporting an internal
+    # error.
     # For more information, see the Autoconf manual and the threads:
     # <http://lists.gnu.org/archive/html/bug-autoconf/2011-09/msg00004.html>
     # 
<http://mail.opensolaris.org/pipermail/ksh93-integration-discuss/2009-February/004121.html>
@@ -458,7 +461,8 @@ function get_test_exit_message(status)
     # shells, when a child process die due to signal number n, can leave
     # in $? an exit status of 256+n instead of the more standard 128+n.
     # Apparently, both behaviours are allowed by POSIX (2008), so be
-    # prepared to handle them both.
+    # prepared to handle them both.  See also Austing Group report ID
+    # 0000051 <http://www.austingroupbugs.net/view.php?id=51>
     exit_details = sprintf(" (terminated by signal %d?)", status - 256)
   else
     # Never seen in practice.
diff --git a/tests/Makefile.am b/tests/Makefile.am
index ebd1089..e0460dd 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -43,6 +43,8 @@ TESTS = ## Will be updated later.
 XFAIL_TESTS = \
 all.test \
 cond17.test \
+dist-auxfile.test \
+dist-auxfile-2.test \
 gcj6.test \
 override-conditional-2.test \
 java-nobase.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 6c56917..e7f700b 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -316,6 +316,8 @@ TESTS = $(handwritten_TESTS) $(generated_TESTS)
 XFAIL_TESTS = \
 all.test \
 cond17.test \
+dist-auxfile.test \
+dist-auxfile-2.test \
 gcj6.test \
 override-conditional-2.test \
 java-nobase.test \
@@ -632,6 +634,8 @@ dirlist.test \
 dirlist2.test \
 dirlist-abspath.test \
 discover.test \
+dist-auxfile-2.test \
+dist-auxfile.test \
 dist-included-parent-dir.test \
 distcleancheck.test \
 distcom2.test \
@@ -651,6 +655,8 @@ distcheck-hook.test \
 distcheck-hook2.test \
 distcheck-missing-m4.test \
 distcheck-outdated-m4.test \
+distcheck-override-infodir.test \
+distcheck-pr9579.test \
 dmalloc.test \
 doc-parsing-buglets-colneq-subst.test \
 doc-parsing-buglets-tabs.test \
@@ -1017,6 +1023,7 @@ test-driver-strip-vpath.test \
 test-driver-trs-suffix-registered.test \
 test-driver-fail.test \
 test-driver-is-distributed.test \
+test-extensions.test \
 test-harness-vpath-rewrite.test \
 test-log.test \
 test-logs-repeated.test \
diff --git a/tests/autodist-aclocal-m4.test b/tests/dist-auxfile-2.test
similarity index 57%
copy from tests/autodist-aclocal-m4.test
copy to tests/dist-auxfile-2.test
index 7ebfd43..08daa6c 100755
--- a/tests/autodist-aclocal-m4.test
+++ b/tests/dist-auxfile-2.test
@@ -14,39 +14,48 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Check that `aclocal.m4' is not automatically distributed if not
-# required to build `configure'.  This is *really* a corner-case
-# check, and the behaviour it checks is not documented either, so
-# if that behaviour is deliberately changed in the future, just
-# remove this test.
-# Related to automake bug#7819.
+# Files specified by AC_REQUIRE_AUX_FILE must exist, and if a Makefile
+# is present in the build-aux directory, they correctly get automatically
+# distributed.
+# Related to automake bug#9651.
 
+am_create_testdir=empty
 . ./defs || Exit 1
 
-{ echo 'm4_include([defs.m4])'
-  cat configure.in
-  echo 'AC_OUTPUT'
-} > t
-mv -f t configure.in
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AC_CONFIG_AUX_DIR([sub])
+AM_INIT_AUTOMAKE
+AC_REQUIRE_AUX_FILE([zardoz])
+AC_CONFIG_FILES([Makefile sub/Makefile])
+AC_OUTPUT
+END
 
 cat > Makefile.am <<'END'
-.PHONY: test
+SUBDIRS = sub
 test: distdir
-       ls -l $(distdir)
-       test ! -f $(distdir)/aclocal.m4
-       echo $(DISTFILES) | grep 'aclocal\.m4' && exit 1; :
-       echo $(DIST_COMMON) | grep 'aclocal\.m4' && exit 1; :
+       ls -l $(distdir) $(distdir)/* ;: For debugging.
+       test -f $(distdir)/sub/zardoz
+.PHONY: test
 check-local: test
 END
 
-: > defs.m4
-$ACLOCAL
-mv -f aclocal.m4 defs.m4
+mkdir sub
+: > sub/Makefile.am
 
-$AUTOMAKE
+echo dummy > sub/zardoz
+
+$ACLOCAL
 $AUTOCONF
+$AUTOMAKE -a
+test -f sub/install-sh
+# Should work also without `--add-missing'.
+$AUTOMAKE
 
 ./configure
+
 $MAKE test
 $MAKE distcheck
 
diff --git a/tests/dist-auxfile.test b/tests/dist-auxfile.test
new file mode 100755
index 0000000..2776a25
--- /dev/null
+++ b/tests/dist-auxfile.test
@@ -0,0 +1,96 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Files specified by AC_REQUIRE_AUX_FILE must exist, and they get
+# automatically distributed by the top-level Makefile.am.
+# Automake bug#9651 reported that this didn't happen when the build-aux
+# directory was set to `.' by AC_CONFIG_AUX_DIR.
+
+am_create_testdir=empty
+. ./defs || Exit 1
+
+set -e
+
+i=0
+for auxdir in build-aux ''; do
+
+  echo "*** Testing with auxdir '$auxdir' ***"
+
+  i=`expr $i + 1`
+  mkdir T$i.d
+  cd T$i.d
+
+  unindent > configure.in <<END
+    AC_INIT([$me], [1.0])
+    AC_CONFIG_AUX_DIR([${auxdir:-.}])
+    AM_INIT_AUTOMAKE
+    AC_REQUIRE_AUX_FILE([foo.txt])
+    AC_REQUIRE_AUX_FILE([bar.sh])
+    AC_REQUIRE_AUX_FILE([zardoz])
+    AC_CONFIG_FILES([Makefile subdir/Makefile])
+    AC_OUTPUT
+END
+
+  echo auxdir = ${auxdir:+"$auxdir/"} > Makefile.am
+  unindent >> Makefile.am <<'END'
+    SUBDIRS = subdir
+    test: distdir
+       ls -l $(distdir) $(distdir)/*      ;: For debugging.
+       @echo DIST_COMMON = $(DIST_COMMON) ;: Likewise.
+       echo ' ' $(DIST_COMMON) ' ' | grep '[ /]$(auxdir)foo.txt '
+       echo ' ' $(DIST_COMMON) ' ' | grep '[ /]$(auxdir)bar.sh '
+       echo ' ' $(DIST_COMMON) ' ' | grep '[ /]$(auxdir)zardoz '
+       test -f $(distdir)/$(auxdir)foo.txt
+       test -f $(distdir)/$(auxdir)bar.sh
+       test -f $(distdir)/$(auxdir)zardoz
+    .PHONY: test
+    check-local: test
+END
+
+  mkdir subdir
+  : > subdir/Makefile.am
+  
+  test -z "$auxdir" || mkdir "$auxdir" || Exit 99
+
+  if test -z "$auxdir"; then
+    auxdir=.
+    auxdir_rx='\.'
+  else
+    auxdir_rx=$auxdir
+  fi
+
+  $ACLOCAL
+  $AUTOCONF
+
+  AUTOMAKE_fails
+  grep "^configure\\.in:4:.* required file.*$auxdir_rx/foo\\.txt" stderr
+  grep "^configure\\.in:5:.* required file.*$auxdir_rx/bar\\.sh"  stderr
+  grep "^configure\\.in:6:.* required file.*$auxdir_rx/zardoz"    stderr
+
+  touch $auxdir/foo.txt $auxdir/bar.sh $auxdir/zardoz
+  cp "$testsrcdir"/../lib/missing "$testsrcdir"/../lib/install-sh $auxdir
+  $AUTOMAKE
+  ./configure
+  $MAKE test
+  $EGREP '(foo\.txt|bar\.sh|zardoz)' subdir/Makefile.in && Exit 1
+
+  $MAKE distcheck
+
+  cd ..
+
+done
+
+:
diff --git a/tests/txinfo18.test b/tests/distcheck-override-infodir.test
similarity index 59%
copy from tests/txinfo18.test
copy to tests/distcheck-override-infodir.test
index 01e4c21..8c54cfb 100755
--- a/tests/txinfo18.test
+++ b/tests/distcheck-override-infodir.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2008, 2009, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2011 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -14,62 +14,50 @@
 # 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 clean index files, even if they are not used at the top-level.
-# Only *new* indexes need to be declared at the top-level.
-# PR/375.
+# Check that we can override ${infodir} while having distcheck still
+# working.  Relate to automake bug#9579.
 
 required='makeinfo tex texi2dvi'
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
+infodir = ${prefix}/blah/blah/foobar
 info_TEXINFOS = main.texi
-main_TEXINFOS = sub.texi
+## Sanity check.
+installcheck-local:
+       if test x$${infodir+set} != xset; then \
+         ls -l "$(DESTDIR)/$(prefix)/blah/blah/foobar/" || exit 1; \
+         test -f "$(DESTDIR)/$(prefix)/blah/blah/foobar/dir" || exit 1; \
+       else \
+         ls -l "$(DESTDIR)/$$infodir/" || exit 1; \
+         test -f "$(DESTDIR)/$$infodir/dir" || exit 1; \
+       fi
 END
 
 cat > main.texi << 'END'
 \input texinfo
 @setfilename main.info
 @settitle main
address@hidden au
address@hidden sa
address@hidden sb
address@hidden sa sb
 @node Top
 Hello walls.
address@hidden sub.texi
 @bye
 END
 
-cat > sub.texi << 'END'
address@hidden foo
-foo
address@hidden bar
-bar
address@hidden baz
-baz
address@hidden sa
-sa
address@hidden sb
-sb
-END
-
 $ACLOCAL
-$AUTOMAKE --add-missing
+$AUTOMAKE -a
 $AUTOCONF
 
 ./configure
+$MAKE
 
-$MAKE dvi
-ls -l           # For debugging.
-test -f main.sa # Sanity check.
-$MAKE clean
-ls -l           # For debugging.
-test x"`echo main.*`" = x"main.texi"
-
-TAR_OPTIONS= $MAKE distcheck
+$MAKE distcheck
+infodir="`pwd`"/_info $MAKE -e distcheck
+test -f _info/dir || Exit 99 # Sanity check.
 
 :
diff --git a/tests/distcheck-pr9579.test b/tests/distcheck-pr9579.test
new file mode 100755
index 0000000..667401d
--- /dev/null
+++ b/tests/distcheck-pr9579.test
@@ -0,0 +1,98 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check against automake bug#9579: distcheck does not always detect
+# incomplete uninstall as advertised.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
+# NOTE: the use of `dir' as the name of the data file installed by hand
+# is deliberate, and enhances coverage -- see definition and comments of
+# lib/am/distdir.am:$(am__distuninstallcheck_listfiles).
+
+cat > Makefile.am << 'END'
+dist_data_DATA = foo
+EXTRA_DIST = dir
+install-data-local:
+       $(MKDIR_P) '$(DESTDIR)$(datadir)'
+       cp '$(srcdir)/dir' '$(DESTDIR)$(datadir)/dir'
+END
+
+: > foo
+: > dir
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+
+./configure --prefix="`pwd`/inst"
+
+# Sanity checks.
+$MAKE install
+find inst -type f
+test -f inst/share/foo
+test -f inst/share/dir
+# We expect the uninstall target of our Makefile to be definitely broken.
+$MAKE uninstall
+test -f inst/share/dir
+rm -rf inst
+
+$MAKE distcheck >output 2>&1 && { cat output; Exit 1; }
+cat output
+
+$FGREP 'ERROR: files left after uninstall:' output
+grep '/share/dir *$' output
+
+# A few trickier corner cases.
+
+cat > Makefile.am << 'END'
+EXTRA_DIST = dir
+install-data-local:
+install-data-local:
+       $(MKDIR_P) '$(DESTDIR)$(prefix)/mu/share/info'
+       cp '$(srcdir)/dir' '$(DESTDIR)$(prefix)/mu/share/info'
+       $(MKDIR_P) '$(DESTDIR)$(infodir)/more'
+       cp '$(srcdir)/dir' '$(DESTDIR)$(infodir)/more'
+END
+
+$AUTOMAKE
+./config.status Makefile
+
+# Sanity checks, again.
+$MAKE install
+find inst -type f
+test -f inst/mu/share/info/dir
+test -f inst/share/info/more/dir
+# We expect the uninstall target of our Makefile to be definitely broken.
+$MAKE uninstall
+test -f inst/mu/share/info/dir
+test -f inst/share/info/more/dir
+rm -rf inst
+
+$MAKE distcheck >output 2>&1 && { cat output; Exit 1; }
+cat output
+
+$FGREP 'ERROR: files left after uninstall:' output
+grep '/mu/share/info/dir *$' output
+grep '/share/info/more/dir *$' output
+
+:
diff --git a/tests/list-of-tests.mk b/tests/list-of-tests.mk
index 820094c..d283360 100644
--- a/tests/list-of-tests.mk
+++ b/tests/list-of-tests.mk
@@ -308,6 +308,8 @@ dirlist.test \
 dirlist2.test \
 dirlist-abspath.test \
 discover.test \
+dist-auxfile-2.test \
+dist-auxfile.test \
 dist-included-parent-dir.test \
 distcleancheck.test \
 distcom2.test \
@@ -327,6 +329,8 @@ distcheck-hook.test \
 distcheck-hook2.test \
 distcheck-missing-m4.test \
 distcheck-outdated-m4.test \
+distcheck-override-infodir.test \
+distcheck-pr9579.test \
 dmalloc.test \
 doc-parsing-buglets-colneq-subst.test \
 doc-parsing-buglets-tabs.test \
@@ -693,6 +697,7 @@ test-driver-strip-vpath.test \
 test-driver-trs-suffix-registered.test \
 test-driver-fail.test \
 test-driver-is-distributed.test \
+test-extensions.test \
 test-harness-vpath-rewrite.test \
 test-log.test \
 test-logs-repeated.test \
diff --git a/tests/nobase-nodist.test b/tests/nobase-nodist.test
old mode 100644
new mode 100755
diff --git a/tests/test-extensions.test b/tests/test-extensions.test
new file mode 100755
index 0000000..dc820ed
--- /dev/null
+++ b/tests/test-extensions.test
@@ -0,0 +1,73 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure that Automake diagnose invalid entries in TEST_EXTENSIONS,
+# and do not diagnose valid (albeit more unusual) ones.
+# See automake bug#9400.
+
+am_parallel_tests=yes
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in <<'END'
+AC_SUBST([ext], [".e"])
+AC_OUTPUT
+END
+
+$ACLOCAL
+$AUTOCONF
+
+cat > Makefile.am << 'END'
+TESTS =
+TEST_EXTENSIONS = .sh .T .t1 ._foo .BAR .x_Y_z ._ @ext@
+END
+
+$AUTOMAKE
+
+$EGREP -i 'log|ext' Makefile.in # For debugging.
+
+for lc in sh T t1 _foo BAR x_Y_z _; do
+  uc=`echo $lc | tr '[a-z]' '[A-Z]'`
+  $FGREP "\$(${uc}_LOG_COMPILER)" Makefile.in
+  grep "^${uc}_LOG_COMPILE =" Makefile.in
+  grep "^\.${lc}\.log:" Makefile.in
+done
+grep "address@hidden@\.log:" Makefile.in
+
+# The produced Makefile is not broken.
+./configure
+$MAKE all check
+
+cat > Makefile.am << 'END'
+TESTS = foo.test bar.sh
+TEST_EXTENSIONS = .test mu .x-y a-b .t.1 .sh .6c .0 .11 .@ .t33 .a=b _&_
+END
+
+AUTOMAKE_fails
+for suf in mu .x-y a-b .t.1 .6c .0 .11 '.@' '.a=b' '_&_'; do
+  suf2=`printf '%s\n' "$suf" | sed -e 's/\./\\./'`
+  $EGREP "^Makefile\.am:2:.*invalid test extension.* $suf2( |$)" stderr
+done
+
+# Verify that we accept valid suffixes, even if intermixed with
+# invalid ones.
+$EGREP '\.(sh|test|t33)' stderr && Exit 1
+
+# Verify that we don't try to handle invalid suffixes.
+$EGREP '(LOG_COMPILER|non-POSIX var|bad character)' stderr && Exit 1
+
+:


hooks/post-receive
-- 
GNU Automake



reply via email to

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