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-1057


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-1057-g8b27c5b
Date: Thu, 06 Oct 2011 12:31:38 +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=8b27c5b5678b4502d15c0a6c8fdcda7a45ddbb16

The branch, master has been updated
       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  b100d18da312f4b22be283b9a877b221667b2245 (commit)
       via  a2498fe8d148c507e5e09b7de8a5aee9f2418e5c (commit)
      from  68b42720afb1bc015592d7b70f0165d01e878b88 (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 8b27c5b5678b4502d15c0a6c8fdcda7a45ddbb16
Merge: 68b4272 59919b1
Author: Stefano Lattarini <address@hidden>
Date:   Thu Oct 6 13:56:49 2011 +0200

    Merge branch 'maint'
    
    * maint:
      fix: make a test script executable
      coverage: expose automake bug#9651
      parallel-tests: automake error our on invalid TEST_EXTENSIONS
      fix: regenerate Makefile
      docs: don't suggest installing `.m4' files in hard-coded location
      distuninstallcheck: fail also when only one file is left installed

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

Summary of changes:
 ChangeLog                                          |   55 +++++++++++
 Makefile.in                                        |   14 +++-
 NEWS                                               |    9 ++
 automake.in                                        |   12 ++-
 doc/automake.texi                                  |   29 +++++--
 lib/am/distdir.am                                  |   22 ++++-
 tests/Makefile.am                                  |    7 ++
 tests/Makefile.in                                  |   14 ++-
 ...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/test-extensions.test                         |   73 +++++++++++++++
 13 files changed, 459 insertions(+), 71 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 97083dd..9105370 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,58 @@
+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>
 
        maintcheck: fix usage of `cd' instead of `$(am__cd)'
diff --git a/Makefile.in b/Makefile.in
index 6e03d9d..6466418 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -160,6 +160,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@
@@ -808,8 +810,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 004341b..d43efe0 100644
--- a/NEWS
+++ b/NEWS
@@ -84,6 +84,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
@@ -96,6 +102,9 @@ Bugs fixed in 1.11a:
 
 * Long standing bugs:
 
+  - "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 5a44f3a..4055e58 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;
@@ -4837,7 +4839,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 18dcf3f..21f4cfb 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -3252,8 +3252,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
@@ -3428,6 +3432,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}
 
@@ -3489,8 +3494,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
@@ -8754,9 +8763,15 @@ Each log file is created when the 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
address@hidden removed, and @file{.log} appended.
address@hidden defaults to @file{.test}.  Results are undefined
-if a test file name ends in several concatenated suffixes.
address@hidden removed, and @file{.log} appended.  Results
+are undefined if a test file name ends in several concatenated suffixes.
address@hidden 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/tests/Makefile.am b/tests/Makefile.am
index 4c9cf13..530024b 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -23,6 +23,8 @@ XFAIL_TESTS = \
 all.test \
 auxdir2.test \
 cond17.test \
+dist-auxfile.test \
+dist-auxfile-2.test \
 gcj6.test \
 override-conditional-2.test \
 java-nobase.test \
@@ -399,6 +401,8 @@ destdir.test \
 dirlist.test \
 dirlist2.test \
 discover.test \
+dist-auxfile.test \
+dist-auxfile-2.test \
 dist-included-parent-dir.test \
 distcleancheck.test \
 distcom2.test \
@@ -418,6 +422,8 @@ distcheck-hook.test \
 distcheck-hook2.test \
 distcheck-missing-m4.test \
 distcheck-outdated-m4.test \
+distcheck-pr9579.test \
+distcheck-override-infodir.test \
 dmalloc.test \
 doc-parsing-buglets-colneq-subst.test \
 doc-parsing-buglets-tabs.test \
@@ -750,6 +756,7 @@ parallel-tests-log-override-recheck.test \
 parallel-tests-cmdline-override.test \
 parallel-tests-log-compiler-example.test \
 parallel-tests-fork-bomb.test \
+test-extensions.test \
 parse.test \
 percent.test \
 percent2.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 779e0a2..5f78d77 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -302,10 +302,11 @@ top_srcdir = @top_srcdir@
 MAINTAINERCLEANFILES = $(parallel_tests) $(instspc_tests)
 EXTRA_DIST = ChangeLog-old gen-parallel-tests instspc-tests.sh \
        $(TESTS) distcheck-hook-m4.am
-XFAIL_TESTS = all.test auxdir2.test cond17.test gcj6.test \
-       override-conditional-2.test java-nobase.test \
-       pr8365-remake-timing.test yacc-dist-nobuild-subdir.test \
-       vala-vpath.test txinfo5.test $(instspc_xfail_tests)
+XFAIL_TESTS = all.test auxdir2.test cond17.test dist-auxfile.test \
+       dist-auxfile-2.test gcj6.test override-conditional-2.test \
+       java-nobase.test pr8365-remake-timing.test \
+       yacc-dist-nobuild-subdir.test vala-vpath.test txinfo5.test \
+       $(instspc_xfail_tests)
 parallel_tests = backcompat5-p.test check-concurrency-bug9245-p.test \
        check-exported-srcdir-p.test check-tests-in-builddir-p.test \
        check-tests_environment-p.test check-p.test check10-p.test \
@@ -676,6 +677,8 @@ destdir.test \
 dirlist.test \
 dirlist2.test \
 discover.test \
+dist-auxfile.test \
+dist-auxfile-2.test \
 dist-included-parent-dir.test \
 distcleancheck.test \
 distcom2.test \
@@ -695,6 +698,8 @@ distcheck-hook.test \
 distcheck-hook2.test \
 distcheck-missing-m4.test \
 distcheck-outdated-m4.test \
+distcheck-pr9579.test \
+distcheck-override-infodir.test \
 dmalloc.test \
 doc-parsing-buglets-colneq-subst.test \
 doc-parsing-buglets-tabs.test \
@@ -1027,6 +1032,7 @@ parallel-tests-log-override-recheck.test \
 parallel-tests-cmdline-override.test \
 parallel-tests-log-compiler-example.test \
 parallel-tests-fork-bomb.test \
+test-extensions.test \
 parse.test \
 percent.test \
 percent2.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 dcc3705..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/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..1d5872c
--- /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.
+
+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]