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


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-2090-gdb1138c
Date: Sun, 18 Mar 2012 21:35:08 +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=db1138c5e74d4f5b4713bf29127cb1430c5fc32e

The branch, master has been updated
       via  db1138c5e74d4f5b4713bf29127cb1430c5fc32e (commit)
       via  45ffbe9f8746224daf11a3980d69b10fc0520384 (commit)
       via  368f1c4c295e3cc4c442af986a1cbb0daa16e3ad (commit)
       via  6743961843f3d810500aabe20cfe2cb0e9ae5839 (commit)
       via  a75a1a52679feed85a181dcf514e32e17117157b (commit)
      from  295c5f26d0646c6f2308fea50899dd961ef87abd (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 db1138c5e74d4f5b4713bf29127cb1430c5fc32e
Merge: 295c5f2 45ffbe9
Author: Stefano Lattarini <address@hidden>
Date:   Sun Mar 18 22:31:45 2012 +0100

    Merge branch 'maint'
    
    * maint:
      install-mans: avoid spurious failure with NetBSD make
      install: don't create empty dirs when an empty 'foo_PRIMARY' is used
      aclocal: remove a couple of useless imports
      aclocal: create local directory where to install m4 files
    
    Signed-off-by: Stefano Lattarini <address@hidden>

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

Summary of changes:
 HACKING                                            |    3 +
 NEWS                                               |   41 +++++++
 THANKS                                             |    3 +
 aclocal.in                                         |   36 +++++-
 lib/am/data.am                                     |   11 ++-
 lib/am/java.am                                     |    3 +-
 lib/am/libs.am                                     |    9 +-
 lib/am/lisp.am                                     |    8 +-
 lib/am/ltlib.am                                    |    9 +-
 lib/am/mans.am                                     |   37 +++++--
 lib/am/progs.am                                    |    5 +-
 lib/am/python.am                                   |    9 ++-
 lib/am/scripts.am                                  |    5 +-
 lib/am/texinfos.am                                 |   25 +++-
 tests/Makefile.am                                  |    2 +-
 tests/aclocal-install-fail.test                    |   65 ++++++++++
 tests/aclocal-install-mkdir.test                   |   72 ++++++++++++
 ...mopts.test => aclocal-no-install-no-mkdir.test} |   25 +++-
 tests/aclocal-verbose-install.test                 |   54 +++++++++
 tests/installdir.test                              |   37 ++++++-
 tests/instdir-cond.test                            |    3 +-
 tests/{instdir-empty.test => instdir-cond2.test}   |   47 ++++----
 tests/instdir-no-empty.test                        |  123 ++++++++++++++++++++
 tests/java3.test                                   |    5 +-
 tests/list-of-tests.mk                             |    7 +-
 25 files changed, 570 insertions(+), 74 deletions(-)
 create mode 100755 tests/aclocal-install-fail.test
 create mode 100755 tests/aclocal-install-mkdir.test
 copy tests/{silent-amopts.test => aclocal-no-install-no-mkdir.test} (65%)
 create mode 100755 tests/aclocal-verbose-install.test
 rename tests/{instdir-empty.test => instdir-cond2.test} (54%)
 create mode 100755 tests/instdir-no-empty.test

diff --git a/HACKING b/HACKING
index 6b98952..2e74d9a 100644
--- a/HACKING
+++ b/HACKING
@@ -75,6 +75,9 @@
   "important" command it runs.  The printed commands should be preceded
   by a single space.
 
+* Ensure install rules do not create any installation directory where
+  nothing is to be actually installed.  See automake bug#11030.
+
 ================================================================
 = Editing automake.in and aclocal.in
 
diff --git a/NEWS b/NEWS
index 1b2e190..7f6b923 100644
--- a/NEWS
+++ b/NEWS
@@ -375,6 +375,26 @@ New in 1.11.2:
     `AM_UPDATE_INFO_DIR' to the value "no".
 
 Bugs fixed in 1.11.2:
+  - For programs and libraries, automake now detects EXTRA_foo_DEPENDENCIES
+    and adds them to the normal list of dependencies, but without
+    overwriting the foo_DEPENDENCIES variable, which is normally computed
+    by automake.
+
+  - The 'ar-lib' script now ignores the "s" (symbol index) and "S" (no
+    symbol index) modifiers as well as the "s" action, as the symbol index
+    is created unconditionally by Microsoft lib.  Also, the "q" (quick)
+    action is now a synonym for "r" (replace).  Also, the script has been
+    ignoring the "v" (verbose) modifier already since Automake 1.11.3.
+
+  - When the 'compile' script is used to wrap MSVC, it now accepts an
+    optional space between the -I, -L and -l options and their respective
+    arguments, for better POSIX compliance.
+
+  - If "aclocal --install" is used, and the first directory specified with
+    '-I' is non-existent, aclocal will now create it before trying to copy
+    files in it.
+
+Bugs fixed in 1.11.0a:
 
 * Bugs introduced by 1.11.2:
 
@@ -409,6 +429,27 @@ Bugs fixed in 1.11.2:
   - The order of Yacc and Lex flags is fixed to be consistent with other
     languages: $(AM_YFLAGS) comes before $(YFLAGS), and $(AM_LFLAGS) before
     $(LFLAGS), so that the user variables override the developer variables.
+  - An empty declaration of a "foo_PRIMARY" don't cause anymore the
+    generated install rules to create an empty $(foodir) directory;
+    for example, if Makefile.am contains something like:
+
+      pkglibexec_SCRIPTS =
+      if FALSE
+      pkglibexec_SCRIPTS += bar.sh
+      endif
+
+    the $(pkglibexec) directory will not be created upon "make install".
+
+  - It is now possible for a foo_SOURCES variable to hold Vala sources
+    together with C header files, as well as with sources and headers for
+    other supported languages (e.g., C++).  Previously, only mixing C and
+    Vala sources was supported.
+
+  - Vala support now works better in VPATH setups.
+
+  - The "deleted header file problem" for *.am files is avoided by stub
+    rules.  This allows `make' to trigger a rerun of `automake' also if
+    some previously needed `.am' file has been removed.
 
   - "make distcheck" now correctly complains also when "make uninstall"
     leaves one and only one file installed in $(prefix).
diff --git a/THANKS b/THANKS
index 23c1d5d..158d919 100644
--- a/THANKS
+++ b/THANKS
@@ -64,6 +64,7 @@ Christina Gratorp     address@hidden
 Claudio Fontana                address@hidden
 Clifford Wolf          address@hidden
 Dagobert Michelsen     address@hidden
+Daiki Ueno             address@hidden
 Dalibor Topic          address@hidden
 danbp                  address@hidden
 Daniel Jacobowitz      address@hidden
@@ -76,6 +77,7 @@ Dave Hart             address@hidden
 Dave Korn              address@hidden
 Dave Morrison          address@hidden
 David A. Swierczek     address@hidden
+David A. Wheeler       address@hidden
 David Byron            address@hidden
 Davyd Madeley          address@hidden
 David Pashley          address@hidden
@@ -152,6 +154,7 @@ Janos Farkas                address@hidden
 Jared Davis            address@hidden
 Jason Duell            address@hidden
 Jason Molenda          address@hidden
+Javier Jardón         address@hidden
 Jeff Bailey            address@hidden
 Jeff A. Daily          address@hidden
 Jeff Garzik            address@hidden
diff --git a/aclocal.in b/aclocal.in
index 243c2b5..85528af 100644
--- a/aclocal.in
+++ b/aclocal.in
@@ -41,8 +41,7 @@ use Automake::ChannelDefs;
 use Automake::XFile;
 use Automake::FileUtils;
 use File::Basename;
-use File::stat;
-use Cwd;
+use File::Path ();
 
 # Some globals.
 
@@ -179,6 +178,17 @@ sub unlink_tmp
 $SIG{'INT'} = $SIG{'TERM'} = $SIG{'QUIT'} = $SIG{'HUP'} = 'unlink_tmp';
 END { unlink_tmp }
 
+sub xmkdir_p ($)
+{
+  my $dir = shift;
+  local $@ = undef;
+  return
+    if -d $dir or eval { File::Path::mkpath $dir };
+  chomp $@;
+  $@ =~ s/\s+at\s.*\bline\s\d+.*$//;
+  fatal "could not create directory '$dir': $@";
+}
+
 # Check macros in acinclude.m4.  If one is not used, warn.
 sub check_acinclude ()
 {
@@ -207,12 +217,15 @@ sub reset_maps ()
   undef &search;
 }
 
-# install_file ($SRC, $DEST)
+# install_file ($SRC, $DESTDIR)
 sub install_file ($$)
 {
-  my ($src, $dest) = @_;
+  my ($src, $destdir) = @_;
+  my $dest = $destdir . "/" . basename ($src);
   my $diff_dest;
 
+  verb "installing $src to $dest";
+
   if ($force_output
       || !exists $file_contents{$dest}
       || $file_contents{$src} ne $file_contents{$dest})
@@ -265,6 +278,7 @@ sub install_file ($$)
        }
       elsif (!$dry_run)
        {
+          xmkdir_p ($destdir);
          xsystem ('cp', $src, $dest);
        }
     }
@@ -304,6 +318,7 @@ sub list_compare (address@hidden@)
 # --------------------------
 # Scan all M4 files installed in @DIRS for new macro definitions.
 # Register each file as of type $TYPE (one of the FT_* constants).
+my $first_user_m4dir = 1;
 sub scan_m4_dirs ($@)
 {
   my ($type, @dirlist) = @_;
@@ -312,6 +327,15 @@ sub scan_m4_dirs ($@)
     {
       if (! opendir (DIR, $m4dir))
        {
+         if ($install && $type == FT_USER && $first_user_m4dir)
+            {
+              # We will try to create this directory later, so don't
+              # complain if it doesn't exist.
+              # TODO: maybe we should avoid complaining only if errno
+              # is ENONENT?
+              $first_user_m4dir = 0;
+              next;
+            }
          fatal "couldn't open directory '$m4dir': $!";
        }
 
@@ -770,9 +794,7 @@ sub write_aclocal ($@)
              my $dest;
              for my $ifile (@{$file_includes{$file}}, $file)
                {
-                 $dest = "$user_includes[0]/" . basename $ifile;
-                 verb "installing $ifile to $dest";
-                 install_file ($ifile, $dest);
+                 install_file ($ifile, $user_includes[0]);
                }
              $installed = 1;
            }
diff --git a/lib/am/data.am b/lib/am/data.am
index 65ee638..98a38a8 100644
--- a/lib/am/data.am
+++ b/lib/am/data.am
@@ -27,11 +27,14 @@ am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
 .PHONY install-%EXEC?exec:data%-am: install-%DIR%%PRIMARY%
 install-%DIR%%PRIMARY%: $(%DIR%_%PRIMARY%)
        @$(NORMAL_INSTALL)
-       test -z "$(%NDIR%dir)" || $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)"
 if %?BASE%
 ## Funny invocation because Makefile variable can be empty, leading to
 ## a syntax error in sh.
        @list='$(%DIR%_%PRIMARY%)'; test -n "$(%NDIR%dir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
+         $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)' || exit 1; \
+       fi; \
        for p in $$list; do \
 ## A file can be in the source directory or the build directory.
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
@@ -46,13 +49,17 @@ if %?BASE%
        done
 else !%?BASE%
        @list='$(%DIR%_%PRIMARY%)'; test -n "$(%NDIR%dir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
+       fi; \
        $(am__nobase_list) | while read dir files; do \
          xfiles=; for file in $$files; do \
            if test -f "$$file"; then xfiles="$$xfiles $$file"; \
            else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \
          test -z "$$xfiles" || { \
            test "x$$dir" = x. || { \
-             echo "$(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \
+             echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \
              $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)/$$dir"; }; \
            echo " $(INSTALL_%ONE_PRIMARY%) $$xfiles 
'$(DESTDIR)$(%NDIR%dir)/$$dir'"; \
            $(INSTALL_%ONE_PRIMARY%) $$xfiles "$(DESTDIR)$(%NDIR%dir)/$$dir" || 
exit $$?; }; \
diff --git a/lib/am/java.am b/lib/am/java.am
index 692824e..6c163b5 100644
--- a/lib/am/java.am
+++ b/lib/am/java.am
@@ -47,11 +47,12 @@ am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
 ?!EXEC?.PHONY install-data-am: install-%DIR%JAVA
 install-%DIR%JAVA: class%NDIR%.stamp
        @$(NORMAL_INSTALL)
-       test -z "$(%NDIR%dir)" || $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)"
 ## A single .java file can be compiled into multiple .class files.  So
 ## we just install all the .class files that got built into this
 ## directory.  This is not optimal, but will have to do for now.
        @test -n "$(%DIR%_JAVA)" && test -n "$(%NDIR%dir)" || exit 0; \
+       echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
+       $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)"; \
        set x *.class; shift; test "$$1" != "*.class" || exit 0; \
        echo " $(INSTALL_DATA)" "$$@" "'$(DESTDIR)$(%NDIR%dir)/$$p'"; \
        $(INSTALL_DATA) "$$@" "$(DESTDIR)$(%NDIR%dir)"
diff --git a/lib/am/libs.am b/lib/am/libs.am
index d66473f..4006bd0 100644
--- a/lib/am/libs.am
+++ b/lib/am/libs.am
@@ -27,7 +27,6 @@ am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
 .PHONY install-%EXEC?exec:data%-am: install-%DIR%LIBRARIES
 install-%DIR%LIBRARIES: $(%DIR%_LIBRARIES)
        @$(NORMAL_INSTALL)
-       test -z "$(%NDIR%dir)" || $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)"
 if %?BASE%
 ## Funny invocation because Makefile variable can be empty, leading to
 ## a syntax error in sh.
@@ -38,18 +37,24 @@ if %?BASE%
          else :; fi; \
        done; \
        test -z "$$list2" || { \
+         echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
          echo " $(INSTALL_DATA) $$list2 '$(DESTDIR)$(%NDIR%dir)'"; \
          $(INSTALL_DATA) $$list2 "$(DESTDIR)$(%NDIR%dir)" || exit $$?; }
 else !%?BASE%
 ## Funny invocation because Makefile variable can be empty, leading to
 ## a syntax error in sh.
        @list='$(%DIR%_LIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
+         $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)' || exit 1; \
+       fi; \
        $(am__nobase_list) | while read dir files; do \
          xfiles=; for p in $$files; do \
            if test -f "$$p"; then xfiles="$$xfiles $$p"; else :; fi; done; \
          test -z "$$xfiles" || { \
            test "x$$dir" = x. || { \
-             echo "$(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \
+             echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \
              $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)/$$dir"; }; \
            echo " $(INSTALL_DATA) $$xfiles '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \
            $(INSTALL_DATA) $$xfiles "$(DESTDIR)$(%NDIR%dir)/$$dir" || exit 
$$?; }; \
diff --git a/lib/am/lisp.am b/lib/am/lisp.am
index 21d7f48..ba5c92a 100644
--- a/lib/am/lisp.am
+++ b/lib/am/lisp.am
@@ -89,11 +89,15 @@ install-%DIR%LISP: $(%DIR%_LISP) $(ELCFILES)
        @$(NORMAL_INSTALL)
 ## Do not install anything if EMACS was not found.
        @if test "$(EMACS)" != no && test -n "$(%NDIR%dir)"; then \
-         $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)"; \
 ?!BASE?          $(am__vpath_adj_setup) \
 ## Funny invocation because Makefile variable can be empty, leading to
 ## a syntax error in sh.
-         list='$(%DIR%_LISP)'; for p in $$list; do \
+         list='$(%DIR%_LISP)'; \
+         if test -n "$$list"; then \
+           echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
+           $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
+         fi; \
+         for p in $$list; do \
 ## A lisp file can be in the source directory or the build directory.
            if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
            %BASE?$(am__strip_dir):$(am__vpath_adj)% \
diff --git a/lib/am/ltlib.am b/lib/am/ltlib.am
index ee20a90..10ce7ce 100644
--- a/lib/am/ltlib.am
+++ b/lib/am/ltlib.am
@@ -27,7 +27,6 @@ am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
 .PHONY install-%EXEC?exec:data%-am: install-%DIR%LTLIBRARIES
 install-%DIR%LTLIBRARIES: $(%DIR%_LTLIBRARIES)
        @$(NORMAL_INSTALL)
-       test -z "$(%NDIR%dir)" || $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)"
 if %?BASE%
 ## Funny invocation because Makefile variable can be empty, leading to
 ## a syntax error in sh.
@@ -38,6 +37,8 @@ if %?BASE%
          else :; fi; \
        done; \
        test -z "$$list2" || { \
+         echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
+         $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)' || exit 1; \
 ## Note that we explicitly set the libtool mode.  This avoids any lossage
 ## if the program doesn't have a name that libtool expects.
 ## Use INSTALL and not INSTALL_DATA because libtool knows the right
@@ -49,6 +50,10 @@ if %?BASE%
        }
 else !%?BASE%
        @list='$(%DIR%_LTLIBRARIES)'; test -n "$(%NDIR%dir)"  || list=; \
+       if test -n "$$list"; then \
+           echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
+           $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
+       fi; \
        for p in $$list; do if test -f "$$p"; then echo "$$p $$p"; else :; fi; 
done | \
        sed '/ .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
        $(AWK) 'BEGIN { cur = "." } \
@@ -58,7 +63,7 @@ else !%?BASE%
        while read dir files; do \
          test -z "$$files" || { \
            test "x$$dir" = x. || { \
-             echo "$(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \
+             echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \
              $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)/$$dir"; }; \
 ## Note that we explicitly set the libtool mode.  This avoids any lossage
 ## if the program doesn't have a name that libtool expects.
diff --git a/lib/am/mans.am b/lib/am/mans.am
index 5c563b3..bfc71dc 100644
--- a/lib/am/mans.am
+++ b/lib/am/mans.am
@@ -30,16 +30,24 @@ man%SECTION%dir = $(mandir)/man%SECTION%
 .PHONY install-man: install-man%SECTION%
 install-man%SECTION%: %DEPS%
        @$(NORMAL_INSTALL)
-       test -z "$(man%SECTION%dir)" || $(MKDIR_P) 
"$(DESTDIR)$(man%SECTION%dir)"
 if %?NOTRANS_MANS%
 ## Handle MANS with notrans_ prefix
-       @list='%NOTRANS_SECT_LIST%'; test -n "$(man%SECTION%dir)" || exit 0; \
-       { for i in $$list; do echo "$$i"; done;  \
+       @list1='%NOTRANS_SECT_LIST%'; \
+?!HAVE_NOTRANS?        list2=''; \
+?HAVE_NOTRANS? list2='%NOTRANS_LIST%'; \
+       test -n "$(man%SECTION%dir)" \
+         && test -n "`echo $$list1$$list2`" \
+         || exit 0; \
+       echo " $(MKDIR_P) '$(DESTDIR)$(man%SECTION%dir)'"; \
+       $(MKDIR_P) "$(DESTDIR)$(man%SECTION%dir)" || exit 1; \
+       { for i in $$list1; do echo "$$i"; done;  \
 ## Extract all items from notrans_man_MANS that should go in this section.
 ## This must be done dynamically to support conditionals.
-?HAVE_NOTRANS? l2='%NOTRANS_LIST%'; for i in $$l2; do echo "$$i"; done | \
+       if test -n "$$list2"; then \
+         for i in $$list2; do echo "$$i"; done \
 ## Accept for 'man1' files like 'foo.1c' but not 'sub.1/foo.2' or 'foo-2.1.4'.
-?HAVE_NOTRANS?   sed -n '/\.%SECTION%[a-z]*$$/p'; \
+           | sed -n '/\.%SECTION%[a-z]*$$/p'; \
+       fi; \
 ## Extract basename of manpage, change the extension if needed.
        } | while read p; do \
 ## Find the file.
@@ -65,13 +73,22 @@ if %?NOTRANS_MANS%
 endif %?NOTRANS_MANS%
 if %?TRANS_MANS%
 ## Handle MANS without notrans_ prefix
-       @list='%TRANS_SECT_LIST%'; test -n "$(man%SECTION%dir)" || exit 0; \
-       { for i in $$list; do echo "$$i"; done; \
+       @list1='%TRANS_SECT_LIST%'; \
+?!HAVE_TRANS?  list2=''; \
+?HAVE_TRANS?   list2='%TRANS_LIST%'; \
+       test -n "$(man%SECTION%dir)" \
+         && test -n "`echo $$list1$$list2`" \
+         || exit 0; \
+       echo " $(MKDIR_P) '$(DESTDIR)$(man%SECTION%dir)'"; \
+       $(MKDIR_P) "$(DESTDIR)$(man%SECTION%dir)" || exit 1; \
+       { for i in $$list1; do echo "$$i"; done;  \
 ## Extract all items from notrans_man_MANS that should go in this section.
 ## This must be done dynamically to support conditionals.
-?HAVE_TRANS?   l2='%TRANS_LIST%'; for i in $$l2; do echo "$$i"; done | \
-## Accept for 'man1' files like 'foo.1c' but not 'sub.1/foo.2' or 'foo-2.1.4'.
-?HAVE_TRANS?     sed -n '/\.%SECTION%[a-z]*$$/p'; \
+       if test -n "$$list2"; then \
+         for i in $$list2; do echo "$$i"; done \
+## Accept for 'man1' files like `foo.1c' but not 'sub.1/foo.2' or 'foo-2.1.4'.
+           | sed -n '/\.%SECTION%[a-z]*$$/p'; \
+       fi; \
 ## Extract basename of manpage, change the extension if needed.
        } | while read p; do \
 ## Find the file.
diff --git a/lib/am/progs.am b/lib/am/progs.am
index 0e2cc02..2be8bca 100644
--- a/lib/am/progs.am
+++ b/lib/am/progs.am
@@ -23,10 +23,13 @@ am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
 .PHONY install-%EXEC?exec:data%-am: install-%DIR%PROGRAMS
 install-%DIR%PROGRAMS: $(%DIR%_PROGRAMS)
        @$(NORMAL_INSTALL)
-       test -z "$(%NDIR%dir)" || $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)"
 ## Funny invocation because Makefile variable can be empty, leading to
 ## a syntax error in sh.
        @list='$(%DIR%_PROGRAMS)'; test -n "$(%NDIR%dir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
+       fi; \
        for p in $$list; do echo "$$p $$p"; done | \
 ## On Cygwin with libtool test won't see 'foo.exe' but instead 'foo'.
 ## So we check for both.
diff --git a/lib/am/python.am b/lib/am/python.am
index bb2748c..cab6129 100644
--- a/lib/am/python.am
+++ b/lib/am/python.am
@@ -29,9 +29,12 @@ am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
 .PHONY install-%EXEC?exec:data%-am: install-%DIR%PYTHON
 install-%DIR%PYTHON: $(%DIR%_PYTHON)
        @$(NORMAL_INSTALL)
-       test -z "$(%NDIR%dir)" || $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)"
 if %?BASE%
        @list='$(%DIR%_PYTHON)'; dlist=; list2=; test -n "$(%NDIR%dir)" || 
list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
+       fi; \
        for p in $$list; do \
 ## A file can be in the source directory or the build directory.
          if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
@@ -58,6 +61,10 @@ if %?BASE%
        else :; fi
 else !%?BASE%
        @list='$(%DIR%_PYTHON)'; test -n "$(%NDIR%dir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
+       fi; \
        $(am__nobase_list) | while read dir files; do \
          xfiles=; for p in $$files; do \
 ## A file can be in the source directory or the build directory.
diff --git a/lib/am/scripts.am b/lib/am/scripts.am
index 29e3e78..64e093e 100644
--- a/lib/am/scripts.am
+++ b/lib/am/scripts.am
@@ -28,10 +28,13 @@ am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
 .PHONY install-%EXEC?exec:data%-am: install-%DIR%SCRIPTS
 install-%DIR%SCRIPTS: $(%DIR%_SCRIPTS)
        @$(NORMAL_INSTALL)
-       test -z "$(%NDIR%dir)" || $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)"
 ## Funny invocation because Makefile variable can be empty, leading to
 ## a syntax error in sh.
        @list='$(%DIR%_SCRIPTS)'; test -n "$(%NDIR%dir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
+       fi; \
 ?!BASE?        $(am__nobase_strip_setup); \
        for p in $$list; do \
 ## A file can be in the source directory or the build directory.
diff --git a/lib/am/texinfos.am b/lib/am/texinfos.am
index fbc7a05..8e75ef3 100644
--- a/lib/am/texinfos.am
+++ b/lib/am/texinfos.am
@@ -142,8 +142,11 @@ include inst-vars.am
 
 install-dvi-am: $(DVIS)
        @$(NORMAL_INSTALL)
-       test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)"
        @list='$(DVIS)'; test -n "$(dvidir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(dvidir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(dvidir)" || exit 1; \
+       fi; \
        for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          echo "$$d$$p"; \
@@ -155,8 +158,11 @@ install-dvi-am: $(DVIS)
 
 install-html-am: $(HTMLS)
        @$(NORMAL_INSTALL)
-       test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
        @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(htmldir)" || exit 1; \
+       fi; \
        for p in $$list; do \
          if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \
          $(am__strip_dir) \
@@ -183,9 +189,12 @@ install-html-am: $(HTMLS)
 
 install-info-am: $(INFO_DEPS)
        @$(NORMAL_INSTALL)
-       test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)"
        @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
        list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(infodir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(infodir)" || exit 1; \
+       fi; \
        for file in $$list; do \
 ## Strip possible $(srcdir) prefix.
          case $$file in \
@@ -241,8 +250,11 @@ install-info-am: $(INFO_DEPS)
 
 install-pdf-am: $(PDFS)
        @$(NORMAL_INSTALL)
-       test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)"
        @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(pdfdir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(pdfdir)" || exit 1; \
+       fi; \
        for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          echo "$$d$$p"; \
@@ -253,8 +265,11 @@ install-pdf-am: $(PDFS)
 
 install-ps-am: $(PSS)
        @$(NORMAL_INSTALL)
-       test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)"
        @list='$(PSS)'; test -n "$(psdir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(psdir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(psdir)" || exit 1; \
+       fi; \
        for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          echo "$$d$$p"; \
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 1126204..baebb1f 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -40,7 +40,7 @@ cond17.test \
 gcj6.test \
 override-conditional-2.test \
 dist-pr109765.test \
-instdir-cond.test \
+instdir-cond2.test \
 java-nobase.test \
 objext-pr10128.test \
 parallel-tests-many.test \
diff --git a/tests/aclocal-install-fail.test b/tests/aclocal-install-fail.test
new file mode 100755
index 0000000..cf493aa
--- /dev/null
+++ b/tests/aclocal-install-fail.test
@@ -0,0 +1,65 @@
+#! /bin/sh
+# Copyright (C) 2012 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that "aclocal --install" fails when it should.
+# FIXME: this is a good candidate for a conversion to TAP.
+
+am_create_testdir=empty
+required=ro-dir
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+MY_MACRO
+END
+
+mkdir sys-acdir
+cat > sys-acdir/my-defs.m4 <<END
+AC_DEFUN([MY_MACRO], [:])
+END
+
+ACLOCAL="$ACLOCAL -Wnone --system-acdir=sys-acdir"
+
+: > a-regular-file
+mkdir unwritable-dir
+chmod a-w unwritable-dir
+
+$ACLOCAL -I a-regular-file --install 2>stderr \
+  && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+$EGREP '(mkdir:|directory ).*a-regular-file' stderr
+test ! -f aclocal.m4
+
+$ACLOCAL --install -I unwritable-dir/sub 2>stderr \
+  && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+$EGREP '(mkdir:|directory ).*unwritable-dir/sub' stderr
+test ! -f aclocal.m4
+
+$ACLOCAL -I unwritable-dir --install 2>stderr \
+  && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+$EGREP '(cp:|copy ).*unwritable-dir' stderr
+test ! -f aclocal.m4
+
+# Sanity check.
+mkdir m4
+$ACLOCAL -I m4 --install && test -f aclocal.m4 \
+  || fatal_ "aclocal failed also when expected to succeed"
+
+:
diff --git a/tests/aclocal-install-mkdir.test b/tests/aclocal-install-mkdir.test
new file mode 100755
index 0000000..54e97ab
--- /dev/null
+++ b/tests/aclocal-install-mkdir.test
@@ -0,0 +1,72 @@
+#! /bin/sh
+# Copyright (C) 2012 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that "aclocal --install" creates the local m4 directory if
+# necessary.
+# FIXME: this is a good candidate for a conversion to TAP.
+
+am_create_testdir=empty
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+MY_MACRO
+END
+
+mkdir sys-acdir
+cat > sys-acdir/my-defs.m4 <<END
+AC_DEFUN([MY_MACRO], [:])
+END
+
+ACLOCAL="$ACLOCAL --system-acdir=sys-acdir"
+
+$ACLOCAL -I foo --install
+test -f foo/my-defs.m4
+
+$ACLOCAL --install -I "`pwd`/bar"
+test -f bar/my-defs.m4
+
+$ACLOCAL --install -I baz/sub/sub2
+test -f baz/sub/sub2/my-defs.m4
+
+# What should happen:
+#  * zardoz1 should be created, and required m4 files copied into there.
+#  * zardoz2 shouldn't be preferred to quux, even if the former exists
+#    while the latter does not.
+mkdir zardoz2
+$ACLOCAL --install -I zardoz1 -I zardoz2
+test -d zardoz1
+grep MY_MACRO zardoz1/my-defs.m4
+ls zardoz2 | grep . && Exit 1
+
+# Directories in ACLOCAL_PATH should never be created if they don't
+# exist.
+ACLOCAL_PATH="`pwd`/none:`pwd`/none2" $ACLOCAL --install && Exit 1
+test ! -d none
+test ! -d none2
+ACLOCAL_PATH="`pwd`/none:`pwd`/none2" $ACLOCAL --install -I x
+test -f x/my-defs.m4
+test ! -d none
+test ! -d none2
+
+# It's better if aclocal doesn't create the first include dir on failure.
+$ACLOCAL --install -I none -I none2 && Exit 1
+test ! -d none
+test ! -d none2
+
+:
diff --git a/tests/silent-amopts.test b/tests/aclocal-no-install-no-mkdir.test
similarity index 65%
copy from tests/silent-amopts.test
copy to tests/aclocal-no-install-no-mkdir.test
index f71ad13..73a6116 100755
--- a/tests/silent-amopts.test
+++ b/tests/aclocal-no-install-no-mkdir.test
@@ -1,4 +1,4 @@
-#!/bin/sh
+#! /bin/sh
 # Copyright (C) 2012 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -14,15 +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/>.
 
-# Check that automake complaints if the 'silent-rules' option is
-# used in AUTOMAKE_OPTIONS.
+# Check that aclocal does not create a non-existent local m4 directory
+# if the '--install' option is not given.
 
+am_create_testdir=empty
 . ./defs || Exit 1
 
-echo AUTOMAKE_OPTIONS = silent-rules > Makefile.am
+set -e
 
-$ACLOCAL
-AUTOMAKE_fails
-grep "^Makefile\.am:1:.*'silent-rules'.*AM_INIT_AUTOMAKE" stderr
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+MY_MACRO
+END
+
+mkdir sys-acdir
+cat > sys-acdir/my-defs.m4 <<END
+AC_DEFUN([MY_MACRO], [:])
+END
+
+$ACLOCAL -I foo --system-acdir=sys-acdir && Exit 1
+test ! -d foo
+test ! -r foo
 
 :
diff --git a/tests/aclocal-verbose-install.test 
b/tests/aclocal-verbose-install.test
new file mode 100755
index 0000000..589d540
--- /dev/null
+++ b/tests/aclocal-verbose-install.test
@@ -0,0 +1,54 @@
+#! /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 verbose messages by `aclocal --install'.
+
+am_create_testdir=empty
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+MY_MACRO_BAR
+MY_MACRO_QUUX
+END
+
+mkdir sys-acdir
+cat > sys-acdir/bar.m4 <<END
+AC_DEFUN([MY_MACRO_BAR], [:])
+END
+cat > sys-acdir/quux.m4 <<END
+AC_DEFUN([MY_MACRO_QUUX], [:])
+END
+
+mkdir foodir
+: > foodir/bar.m4
+
+$ACLOCAL --system-acdir=sys-acdir --install --verbose -I foodir 2>stderr \
+ || { cat stderr >&2; Exit 1; }
+cat stderr >&2
+grep ' installing .*sys-acdir/bar\.m4.* to .*foodir/bar\.m4' stderr
+grep ' installing .*sys-acdir/quux\.m4.* to .*foodir/quux\.m4' stderr
+grep ' overwriting .*foodir/bar\.m4.* with .*sys-acdir/bar\.m4' stderr
+grep ' installing .*foodir/quux\.m4.* from .*sys-acdir/quux\.m4' stderr
+
+# Sanity checks.
+ls -l foodir
+grep MY_MACRO_BAR foodir/bar.m4
+grep MY_MACRO_QUUX foodir/quux.m4
+
+:
diff --git a/tests/installdir.test b/tests/installdir.test
index c5a3824..1147ee7 100755
--- a/tests/installdir.test
+++ b/tests/installdir.test
@@ -15,19 +15,50 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test for PR 203.
-# == Report ==
+# See also automake bug#11030.
+#
+# == Original Report for PR/203 ==
 # Some standard targets are missing '-local' hooks.  For instance,
 # installdirs is missing this.  Ideally this would be an automatic
 # feature of any exported target.
 
 . ./defs || Exit 1
 
+echo AC_OUTPUT >> configure.in
+
 cat > Makefile.am << 'END'
+foodir = $(datadir)/$(distdir)
 installdirs-local:
-       @echo here
+       $(MKDIR_P) $(DESTDIR)$(foodir)
+install-data-hook: installdirs-local
 END
 
 $ACLOCAL
 $AUTOMAKE
 
-test `grep installdirs-local Makefile.in | wc -l` -eq 3
+test `grep installdirs-local Makefile.in | wc -l` -eq 4
+
+cwd=`pwd` || fatal_ "getting current working directory"
+
+$AUTOCONF
+./configure --prefix="$cwd/inst"
+
+$MAKE installdirs
+test -d inst/share/$me-1.0
+rm -rf inst
+
+$MAKE install
+test -d inst/share/$me-1.0
+rm -rf inst
+
+./configure --prefix=/foo
+
+$MAKE installdirs DESTDIR="$cwd/dest"
+test -d dest/foo/share/$me-1.0
+rm -rf dest
+
+$MAKE install DESTDIR="$cwd/dest"
+test -d dest/foo/share/$me-1.0
+rm -rf dest
+
+:
diff --git a/tests/instdir-cond.test b/tests/instdir-cond.test
index d078a8c..2965ff1 100644
--- a/tests/instdir-cond.test
+++ b/tests/instdir-cond.test
@@ -28,9 +28,10 @@ END
 : > bar
 
 cat > Makefile.am << 'END'
+pkglibexec_SCRIPTS =
 if ENABLE_FOO
 pkgdata_DATA = foo
-pkglibexec_SCRIPTS = bar
+pkglibexec_SCRIPTS += bar
 endif
 END
 
diff --git a/tests/instdir-empty.test b/tests/instdir-cond2.test
similarity index 54%
rename from tests/instdir-empty.test
rename to tests/instdir-cond2.test
index ccac92d..a2c07d7 100644
--- a/tests/instdir-empty.test
+++ b/tests/instdir-cond2.test
@@ -14,43 +14,38 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# An empty "foo_PRIMARY" declaration should cause "make install" to create
-# directory $(foodir).  Suggested in discussion on automake bug#10997.
+# Check against automake bug#10997: directories holding only
+# conditionally-installed files should not be created unconditionally.
+# FIXME: this test tries to check that the above also hold for the
+# FIXME: "installdirs" target, but that doesn't currently work :-(
+# FIXME: So this test is still xfailing.
+# See sister test 'instdir-cond.test' for the succeeding part.
 
 . ./defs || Exit 1
 
-echo AC_OUTPUT >> configure.ac
+cat >> configure.in << 'END'
+AM_CONDITIONAL([ENABLE_FOO], [false])
+AC_OUTPUT
+END
+
+: > foo
+: > bar
 
 cat > Makefile.am << 'END'
-pkgdata_DATA =
-libexec_SCRIPTS =
+pkglibexec_SCRIPTS =
+if ENABLE_FOO
+pkgdata_DATA = foo
+pkglibexec_SCRIPTS += bar
+endif
 END
 
 $ACLOCAL
 $AUTOMAKE
 $AUTOCONF
 
-cwd=`pwd`
-./configure --prefix="$cwd/inst"
-
-$MAKE install
-test -d inst/share/$me
-test -d inst/libexec
-rm -rf inst
-
-$MAKE install-exec
-test ! -d inst/share
-test -d inst/libexec
-rm -rf inst
-
-$MAKE install-data
-test -d inst/share/$me
-test ! -d inst/libexec
-rm -rf inst
+./configure --prefix="`pwd`/inst"
 
-./configure --prefix=/foo
-$MAKE install DESTDIR=$cwd/dest
-test -d dest/foo/share/$me
-test -d dest/foo/libexec
+$MAKE installdirs
+test ! -d inst || { find inst; Exit 1; }
 
 :
diff --git a/tests/instdir-no-empty.test b/tests/instdir-no-empty.test
new file mode 100755
index 0000000..cf57996
--- /dev/null
+++ b/tests/instdir-no-empty.test
@@ -0,0 +1,123 @@
+#! /bin/sh
+# Copyright (C) 2012 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# An empty "foo_PRIMARY" declaration should *not* cause "make install"
+# to create directory $(foodir).  See automake bug#10997 and bug#11030.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in <<END
+AC_SUBST([CC], [whatever])
+AC_SUBST([JAVAC], [whatever])
+AM_PATH_PYTHON(,,:)
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = no-dependencies
+mydir = $(prefix)/my
+myexecdir = $(prefix)/myexec
+javadir = $(prefix)/java
+END
+
+# Write Makefile.am.
+{
+
+  for dir in sbin bin libexec pkglibexec myexec; do
+    for dst in '' dist_ nodist_; do
+      echo "${dst}${dir}_SCRIPTS ="
+    done
+    echo "${dir}_PROGRAMS ="
+  done
+
+  for dir in lib pkglib myexec my; do
+    echo "${dir}_LIBRARIES ="
+    echo "${dir}_LTLIBRARIES ="
+  done
+
+  for p1 in '' notrans_; do
+    for p2 in '' dist_ nodist_; do
+      for s in '' 1 2 3 4 5 6 7 8 9; do
+        echo "${p1}${p2}man${s}_MANS ="
+      done
+    done
+  done
+
+  for dst in '' dist_ nodist_; do
+    for dir in dataroot data pkgdata doc lisp my; do
+      echo "${dst}${dir}_DATA ="
+    done
+    for dir in include pkginclude oldinclude my; do
+      echo "${dst}${dir}_HEADERS ="
+    done
+    for dir in python my; do
+      echo "${dst}${dir}_PYTHON ="
+    done
+    for dir in info my; do
+      echo "${dst}${dir}_TEXINFOS ="
+    done
+    for dir in java my; do
+      echo "${dst}${dir}_JAVA ="
+    done
+    for dir in lisp my; do
+      echo "${dst}${dir}_LISP ="
+    done
+  done
+
+} > t
+
+cat t >> Makefile.am
+sed 's/^/nobase_/' t >> Makefile.am
+rm -f t
+
+cat Makefile.am # For debugging.
+
+# Sanity check.
+grep '^oldinclude_HEADERS =' Makefile.am \
+  && grep '^nodist_my_PYTHON =' Makefile.am \
+  && grep '^notrans_dist_man5_MANS =' Makefile.am \
+  || fatal_ "creating Makefile.am"
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+cwd=`pwd` || fatal_ "getting current working directory"
+
+doinst ()
+{
+  $MAKE install install-pdf install-ps install-dvi ${1+"$@"}
+}
+
+: > foo.sh
+
+./configure --prefix="$cwd/inst"
+doinst
+test ! -d inst || { find inst; Exit 1; }
+$MAKE uninstall
+doinst bin_SCRIPTS=foo.sh
+test -f inst/bin/foo.sh
+
+./configure
+doinst DESTDIR="$cwd/dest"
+test ! -d dest || { find dest; Exit 1; }
+$MAKE uninstall
+doinst DESTDIR="$cwd/dest" bin_SCRIPTS=foo.sh
+test -f dest/usr/local/bin/foo.sh
+
+:
diff --git a/tests/java3.test b/tests/java3.test
index c8162b1..7d94635 100755
--- a/tests/java3.test
+++ b/tests/java3.test
@@ -46,8 +46,11 @@ cwd=`pwd` || Exit 1
 ./configure --prefix="$cwd/_inst"
 $MAKE
 $MAKE install
-ls -l . _inst/java # For debugging.
+ls -l .
 find . -name '*.class' | grep . && Exit 1
+# If we have nothing to install, we shouldn't create any installation
+# directory.  Related to automake bug#11030.
+test ! -d _inst
 $MAKE uninstall
 $MAKE distcheck
 
diff --git a/tests/list-of-tests.mk b/tests/list-of-tests.mk
index 70fc8c8..c00b571 100644
--- a/tests/list-of-tests.mk
+++ b/tests/list-of-tests.mk
@@ -69,6 +69,10 @@ aclocal-path-install.test \
 aclocal-path-install-serial.test \
 aclocal-path-nonexistent.test \
 aclocal-path-precedence.test \
+aclocal-install-fail.test \
+aclocal-install-mkdir.test \
+aclocal-no-install-no-mkdir.test \
+aclocal-verbose-install.test \
 ac-output-old.tap \
 acsilent.test \
 acsubst.test \
@@ -473,7 +477,8 @@ instdat2.test \
 instdir.test \
 instdir2.test \
 instdir-cond.test \
-instdir-empty.test \
+instdir-cond2.test \
+instdir-no-empty.test \
 instdir-java.test \
 instdir-lisp.test \
 instdir-ltlib.test \


hooks/post-receive
-- 
GNU Automake



reply via email to

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