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. Release-1-


From: Ralf Wildenhues
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. Release-1-10-171-g196abe9
Date: Sun, 07 Sep 2008 06:29:50 +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=196abe9a7bcfe78d06b6fa88fe5100d607d3aef1

The branch, master has been updated
       via  196abe9a7bcfe78d06b6fa88fe5100d607d3aef1 (commit)
      from  92a09f69728ee6db2438add8835ee683e921c9e3 (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 196abe9a7bcfe78d06b6fa88fe5100d607d3aef1
Author: Ralf Wildenhues <address@hidden>
Date:   Sun Sep 7 00:43:38 2008 +0200

    Exit upon `install' failure, part one.
    
    * lib/am/data.am (install-%DIR%%PRIMARY%): Exit if any install
    command fails.
    * lib/am/python.am (install-%DIR%PYTHON): Likewise.
    * lib/am/scripts.am (install-%DIR%SCRIPTS): Likewise.
    * lib/am/texinfos.am (install-dvi-am, install-html-am)
    (install-info-am:, install-pdf-am): Likewise.
    * tests/instmany.test: New test, for SCRIPTS, DATA, and HEADERS.
    * tests/instmany-python.test: New test, for PYTHON.
    * tests/Makefile.am: Adjust.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

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

Summary of changes:
 ChangeLog                  |   14 +++
 Makefile.in                |    2 +-
 doc/Makefile.in            |   17 +++--
 lib/Automake/Makefile.in   |    6 +-
 lib/Makefile.in            |    6 +-
 lib/am/Makefile.in         |    3 +-
 lib/am/data.am             |    5 +-
 lib/am/python.am           |   10 ++-
 lib/am/scripts.am          |    6 +-
 lib/am/texinfos.am         |   14 ++--
 m4/Makefile.in             |    3 +-
 tests/Makefile.am          |    2 +
 tests/Makefile.in          |    2 +
 tests/instmany-python.test |  135 +++++++++++++++++++++++++++++++
 tests/instmany.test        |  193 ++++++++++++++++++++++++++++++++++++++++++++
 15 files changed, 389 insertions(+), 29 deletions(-)
 create mode 100755 tests/instmany-python.test
 create mode 100755 tests/instmany.test

diff --git a/ChangeLog b/ChangeLog
index 2f0f54e..cc4739e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2008-09-07  Ralf Wildenhues  <address@hidden>
+
+       Exit upon `install' failure, part one.
+
+       * lib/am/data.am (install-%DIR%%PRIMARY%): Exit if any install
+       command fails.
+       * lib/am/python.am (install-%DIR%PYTHON): Likewise.
+       * lib/am/scripts.am (install-%DIR%SCRIPTS): Likewise.
+       * lib/am/texinfos.am (install-dvi-am, install-html-am)
+       (install-info-am:, install-pdf-am): Likewise.
+       * tests/instmany.test: New test, for SCRIPTS, DATA, and HEADERS.
+       * tests/instmany-python.test: New test, for PYTHON.
+       * tests/Makefile.am: Adjust.
+
 2008-09-06  Ralf Wildenhues  <address@hidden>
 
        Fix multi-file installation for files in srcdir.
diff --git a/Makefile.in b/Makefile.in
index 18ea0d7..0086251 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -274,7 +274,7 @@ install-binSCRIPTS: $(bin_SCRIPTS)
          if test -f $$d$$p; then \
            f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
            echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \
-           $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
+           $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f" || exit 
$$?; \
          else :; fi; \
        done
 
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 5f8bd59..a57c942 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -406,7 +406,8 @@ install-dist_docDATA: $(dist_doc_DATA)
        done | $(am__base_list) | \
        while read files; do \
          echo " $(dist_docDATA_INSTALL) $$files '$(DESTDIR)$(docdir)'"; \
-         $(dist_docDATA_INSTALL) $$files "$(DESTDIR)$(docdir)"; done
+         $(dist_docDATA_INSTALL) $$files "$(DESTDIR)$(docdir)" || exit $$?; \
+       done
 
 uninstall-dist_docDATA:
        @$(NORMAL_UNINSTALL)
@@ -562,7 +563,8 @@ install-dvi-am: $(DVIS)
        done | $(am__base_list) | \
        while read files; do \
          echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \
-         $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)"; done
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \
+       done
 install-exec-am:
 
 install-html: install-html-am
@@ -577,7 +579,7 @@ install-html-am: $(HTMLS)
            echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \
            $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
            echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
-           $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
+           $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \
          else \
            list2="$$list2 $$d$$p"; \
          fi; \
@@ -585,7 +587,8 @@ install-html-am: $(HTMLS)
        test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \
        while read files; do \
          echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \
-         $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)"; done; }
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \
+       done; }
 install-info: install-info-am
 
 install-info-am: $(INFO_DEPS)
@@ -608,7 +611,7 @@ install-info-am: $(INFO_DEPS)
        done | $(am__base_list) | \
        while read files; do \
          echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \
-         $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)"; done
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done
        @$(POST_INSTALL)
        @if (install-info --version && \
             install-info --version 2>&1 | sed 1q | grep -i -v debian) 
>/dev/null 2>&1; then \
@@ -632,7 +635,7 @@ install-pdf-am: $(PDFS)
        done | $(am__base_list) | \
        while read files; do \
          echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \
-         $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)"; done
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done
 install-ps: install-ps-am
 
 install-ps-am: $(PSS)
@@ -644,7 +647,7 @@ install-ps-am: $(PSS)
        done | $(am__base_list) | \
        while read files; do \
          echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \
-         $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)"; done
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
diff --git a/lib/Automake/Makefile.in b/lib/Automake/Makefile.in
index ef6df71..3b27b1e 100644
--- a/lib/Automake/Makefile.in
+++ b/lib/Automake/Makefile.in
@@ -275,7 +275,8 @@ install-dist_perllibDATA: $(dist_perllib_DATA)
        done | $(am__base_list) | \
        while read files; do \
          echo " $(dist_perllibDATA_INSTALL) $$files 
'$(DESTDIR)$(perllibdir)'"; \
-         $(dist_perllibDATA_INSTALL) $$files "$(DESTDIR)$(perllibdir)"; done
+         $(dist_perllibDATA_INSTALL) $$files "$(DESTDIR)$(perllibdir)" || exit 
$$?; \
+       done
 
 uninstall-dist_perllibDATA:
        @$(NORMAL_UNINSTALL)
@@ -293,7 +294,8 @@ install-nodist_perllibDATA: $(nodist_perllib_DATA)
        done | $(am__base_list) | \
        while read files; do \
          echo " $(nodist_perllibDATA_INSTALL) $$files 
'$(DESTDIR)$(perllibdir)'"; \
-         $(nodist_perllibDATA_INSTALL) $$files "$(DESTDIR)$(perllibdir)"; done
+         $(nodist_perllibDATA_INSTALL) $$files "$(DESTDIR)$(perllibdir)" || 
exit $$?; \
+       done
 
 uninstall-nodist_perllibDATA:
        @$(NORMAL_UNINSTALL)
diff --git a/lib/Makefile.in b/lib/Makefile.in
index abfb4ec..54daf75 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -251,7 +251,8 @@ install-dist_pkgvdataDATA: $(dist_pkgvdata_DATA)
        done | $(am__base_list) | \
        while read files; do \
          echo " $(dist_pkgvdataDATA_INSTALL) $$files 
'$(DESTDIR)$(pkgvdatadir)'"; \
-         $(dist_pkgvdataDATA_INSTALL) $$files "$(DESTDIR)$(pkgvdatadir)"; done
+         $(dist_pkgvdataDATA_INSTALL) $$files "$(DESTDIR)$(pkgvdatadir)" || 
exit $$?; \
+       done
 
 uninstall-dist_pkgvdataDATA:
        @$(NORMAL_UNINSTALL)
@@ -269,7 +270,8 @@ install-dist_scriptDATA: $(dist_script_DATA)
        done | $(am__base_list) | \
        while read files; do \
          echo " $(dist_scriptDATA_INSTALL) $$files '$(DESTDIR)$(scriptdir)'"; \
-         $(dist_scriptDATA_INSTALL) $$files "$(DESTDIR)$(scriptdir)"; done
+         $(dist_scriptDATA_INSTALL) $$files "$(DESTDIR)$(scriptdir)" || exit 
$$?; \
+       done
 
 uninstall-dist_scriptDATA:
        @$(NORMAL_UNINSTALL)
diff --git a/lib/am/Makefile.in b/lib/am/Makefile.in
index 7188542..c48675c 100644
--- a/lib/am/Makefile.in
+++ b/lib/am/Makefile.in
@@ -242,7 +242,8 @@ install-dist_amDATA: $(dist_am_DATA)
        done | $(am__base_list) | \
        while read files; do \
          echo " $(dist_amDATA_INSTALL) $$files '$(DESTDIR)$(amdir)'"; \
-         $(dist_amDATA_INSTALL) $$files "$(DESTDIR)$(amdir)"; done
+         $(dist_amDATA_INSTALL) $$files "$(DESTDIR)$(amdir)" || exit $$?; \
+       done
 
 uninstall-dist_amDATA:
        @$(NORMAL_UNINSTALL)
diff --git a/lib/am/data.am b/lib/am/data.am
index 3536f94..a7039c0 100644
--- a/lib/am/data.am
+++ b/lib/am/data.am
@@ -43,7 +43,8 @@ if %?BASE%
        done | $(am__base_list) | \
        while read files; do \
          echo " $(%DIR%%PRIMARY%_INSTALL) $$files '$(DESTDIR)$(%NDIR%dir)'"; \
-         $(%DIR%%PRIMARY%_INSTALL) $$files "$(DESTDIR)$(%NDIR%dir)"; done
+         $(%DIR%%PRIMARY%_INSTALL) $$files "$(DESTDIR)$(%NDIR%dir)" || exit 
$$?; \
+       done
 else !%?BASE%
        @list='$(%DIR%_%PRIMARY%)'; $(am__nobase_list) | \
        while read dir files; do \
@@ -55,7 +56,7 @@ else !%?BASE%
              echo "$(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \
              $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)/$$dir"; }; \
            echo " $(%DIR%%PRIMARY%_INSTALL) $$xfiles 
'$(DESTDIR)$(%NDIR%dir)/$$dir'"; \
-           $(%DIR%%PRIMARY%_INSTALL) $$xfiles "$(DESTDIR)$(%NDIR%dir)/$$dir"; 
}; \
+           $(%DIR%%PRIMARY%_INSTALL) $$xfiles "$(DESTDIR)$(%NDIR%dir)/$$dir" 
|| exit $$?; }; \
        done
 endif !%?BASE%
 endif %?INSTALL%
diff --git a/lib/am/python.am b/lib/am/python.am
index 2c02275..7a1cdb2 100644
--- a/lib/am/python.am
+++ b/lib/am/python.am
@@ -43,10 +43,12 @@ if %?BASE%
            list2="$$list2 $$b$$p"; \
          else :; fi; \
        done; \
-       test -z "$$list2" || { \
+       for file in $$list2; do echo $$file; done | $(am__base_list) | \
+       while read files; do \
 ## Don't perform translation, since script name is important.
-         echo " $(%DIR%PYTHON_INSTALL) $$list2 '$(DESTDIR)$(%NDIR%dir)'"; \
-         $(%DIR%PYTHON_INSTALL) $$list2 "$(DESTDIR)$(%NDIR%dir)"; }; \
+         echo " $(%DIR%PYTHON_INSTALL) $$files '$(DESTDIR)$(%NDIR%dir)'"; \
+         $(%DIR%PYTHON_INSTALL) $$files "$(DESTDIR)$(%NDIR%dir)" || exit $$?; \
+       done || exit $$?; \
 ## Byte-compile must be done at install time, since file times are
 ## encoded in the actual files.
        if test -n "$$dlist"; then \
@@ -70,7 +72,7 @@ else !%?BASE%
              $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)/$$dir"; }; \
 ## Don't perform translation, since script name is important.
            echo " $(%DIR%PYTHON_INSTALL) $$xfiles 
'$(DESTDIR)$(%NDIR%dir)/$$dir'"; \
-           $(%DIR%PYTHON_INSTALL) $$xfiles "$(DESTDIR)$(%NDIR%dir)/$$dir"; }; \
+           $(%DIR%PYTHON_INSTALL) $$xfiles "$(DESTDIR)$(%NDIR%dir)/$$dir" || 
exit $$?; }; \
 ## Byte-compile must be done at install time, since file times are
 ## encoded in the actual files.
          if test -n "$$dlist"; then \
diff --git a/lib/am/scripts.am b/lib/am/scripts.am
index 64b194b..56f491a 100644
--- a/lib/am/scripts.am
+++ b/lib/am/scripts.am
@@ -1,6 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996, 1998, 1999, 2001, 2003, 2004, 2006, 2007
-## Free Software Foundation, Inc.
+## Copyright (C) 1994, 1995, 1996, 1998, 1999, 2001, 2003, 2004, 2006, 2007,
+## 2008 Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -50,7 +50,7 @@ install-%DIR%SCRIPTS: $(%DIR%_SCRIPTS)
 ## Prepend the directory part if nobase_ is used.
 ?!BASE?            f=`echo "$$p" | sed 's|[^/]*$$||'`"$$f"; \
            echo " $(%DIR%SCRIPT_INSTALL) '$$d$$p' 
'$(DESTDIR)$(%NDIR%dir)/$$f'"; \
-           $(%DIR%SCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(%NDIR%dir)/$$f"; \
+           $(%DIR%SCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(%NDIR%dir)/$$f" || 
exit $$?; \
          else :; fi; \
        done
 endif %?INSTALL%
diff --git a/lib/am/texinfos.am b/lib/am/texinfos.am
index 0f482a8..9cfc645 100644
--- a/lib/am/texinfos.am
+++ b/lib/am/texinfos.am
@@ -150,7 +150,8 @@ install-dvi-am: $(DVIS)
        done | $(am__base_list) | \
        while read files; do \
          echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \
-         $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)"; done
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \
+       done
 
 install-html-am: $(HTMLS)
        @$(NORMAL_INSTALL)
@@ -162,7 +163,7 @@ install-html-am: $(HTMLS)
            echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \
            $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
            echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
-           $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
+           $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \
          else \
            list2="$$list2 $$d$$p"; \
          fi; \
@@ -170,7 +171,8 @@ install-html-am: $(HTMLS)
        test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \
        while read files; do \
          echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \
-         $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)"; done; }
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \
+       done; }
 
 install-info-am: $(INFO_DEPS)
        @$(NORMAL_INSTALL)
@@ -202,7 +204,7 @@ install-info-am: $(INFO_DEPS)
        done | $(am__base_list) | \
        while read files; do \
          echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \
-         $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)"; done
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done
        @$(POST_INSTALL)
 ## Only run this code if install-info actually exists, and it is not
 ## the Debian install-info.  FIXME: once Debian install-info goes
@@ -241,7 +243,7 @@ install-pdf-am: $(PDFS)
        done | $(am__base_list) | \
        while read files; do \
          echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \
-         $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)"; done
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done
 
 install-ps-am: $(PSS)
        @$(NORMAL_INSTALL)
@@ -252,7 +254,7 @@ install-ps-am: $(PSS)
        done | $(am__base_list) | \
        while read files; do \
          echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \
-         $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)"; done
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done
 
 else ! %?LOCAL-TEXIS%
 install-dvi-am:
diff --git a/m4/Makefile.in b/m4/Makefile.in
index 69bdd1f..1b8b56c 100644
--- a/m4/Makefile.in
+++ b/m4/Makefile.in
@@ -239,7 +239,8 @@ install-dist_m4dataDATA: $(dist_m4data_DATA)
        done | $(am__base_list) | \
        while read files; do \
          echo " $(dist_m4dataDATA_INSTALL) $$files '$(DESTDIR)$(m4datadir)'"; \
-         $(dist_m4dataDATA_INSTALL) $$files "$(DESTDIR)$(m4datadir)"; done
+         $(dist_m4dataDATA_INSTALL) $$files "$(DESTDIR)$(m4datadir)" || exit 
$$?; \
+       done
 
 uninstall-dist_m4dataDATA:
        @$(NORMAL_UNINSTALL)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 6aa5d5c..54ac671 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -306,6 +306,8 @@ instexec.test \
 insthook.test \
 instman.test \
 instman2.test \
+instmany.test \
+instmany-python.test \
 instspc.test \
 interp.test \
 interp2.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index ac99bac..9dca1ae 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -457,6 +457,8 @@ instexec.test \
 insthook.test \
 instman.test \
 instman2.test \
+instmany.test \
+instmany-python.test \
 instspc.test \
 interp.test \
 interp2.test \
diff --git a/tests/instmany-python.test b/tests/instmany-python.test
new file mode 100755
index 0000000..beace0c
--- /dev/null
+++ b/tests/instmany-python.test
@@ -0,0 +1,135 @@
+#! /bin/sh
+# Copyright (C) 2008  Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, 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/>.
+
+# Installing many files should not exceed the command line length limit.
+
+# This is the python sister test of instmany.test, see there for details.
+
+required='non-root python'
+. ./defs || Exit 1
+
+set -e
+
+limit=2500
+subdir=long_subdir_name_with_many_characters
+nfiles=81
+
+list=`(seq 1 $nfiles) 2>/dev/null || {
+  i=1
+  while test $i -le $nfiles; do
+    echo $i
+    i=\`expr $i + 1\`
+  done; }`
+
+sed "s|@limit@|$limit|g" >myinstall.in <<'END'
+#! /bin/sh
+# Fake install script.  This doesn't really install
+# (the INSTALL path below would be wrong outside this directory).
address@hidden@
+INSTALL='@INSTALL@'
+len=`expr "$INSTALL $*" : ".*" 2>/dev/null || echo $limit`
+if test $len -ge $limit; then
+  echo "$0: safe command line limit of $limit characters exceeded" >&2
+  exit 1
+fi
+exit 0
+END
+
+# Creative quoting in the next line to please maintainer-check.
+sed "s|@limit@|$limit|g" >'rm' <<'END'
+#! /bin/sh
address@hidden@
+PATH=$save_PATH
+export PATH
+RM='rm -f'
+len=`expr "$RM $*" : ".*" 2>/dev/null || echo $limit`
+if test $len -ge $limit; then
+  echo "$0: safe command line limit of $limit characters exceeded" >&2
+  exit 1
+fi
+exec $RM "$@"
+exit 1
+END
+
+chmod +x rm
+
+cat >>configure.in <<END
+AM_PATH_PYTHON
+AC_CONFIG_FILES([myinstall], [chmod +x ./myinstall])
+AC_CONFIG_FILES([$subdir/Makefile])
+AC_OUTPUT
+END
+
+cat >Makefile.am <<END
+SUBDIRS = $subdir
+END
+
+mkdir $subdir
+cd $subdir
+
+cat >Makefile.am <<'END'
+python_PYTHON =
+nobase_python_PYTHON =
+END
+
+for n in $list; do
+  cat >>Makefile.am <<END
+python_PYTHON += python$n.py
+nobase_python_PYTHON += npython$n.py
+END
+  echo >python$n.py
+  echo >npython$n.py
+done
+
+cd ..
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+instdir=`pwd`/inst
+mkdir build
+cd build
+../configure --prefix="$instdir"
+$MAKE
+# Try whether native install (or install-sh) works.
+$MAKE install
+$MAKE uninstall
+test `find "$instdir" -type f -print | wc -l` = 0
+
+# Try whether we don't exceed the low limit.
+INSTALL='$(SHELL) $(top_builddir)/myinstall' $MAKE -e install
+env save_PATH="$PATH" PATH="`pwd`/..:$PATH" $MAKE uninstall
+
+cd $subdir
+srcdir=../../$subdir
+
+# Ensure 'make install' fails when 'install' fails.
+
+for file in python3.py python$nfiles.py
+do
+  chmod a-r $srcdir/$file
+  $MAKE install && Exit 1
+  chmod u+r $srcdir/$file
+done
+
+for file in npython3.py npython$nfiles.py
+do
+  chmod a-r $srcdir/$file
+  $MAKE install && Exit 1
+  chmod u+r $srcdir/$file
+done
+
+:
diff --git a/tests/instmany.test b/tests/instmany.test
new file mode 100755
index 0000000..f67e6fa
--- /dev/null
+++ b/tests/instmany.test
@@ -0,0 +1,193 @@
+#! /bin/sh
+# Copyright (C) 2008  Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, 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/>.
+
+# Installing many files should not exceed the command line length limit.
+# Here, the main issue is that we may prepend `$(srcdir)/' to each file,
+# which may cause much longer command lines.  The list of files must
+# anyway remain below the limit, otherwise `make' won't be able to even
+# fork the command.
+#
+# Further, the install rule should honor failures of the install program.
+
+# Python is done in the sister test.
+# For texinfos, we expand names using $(srcdir) in the first place.
+# Let's hope nobody uses many texinfos.
+
+
+required=non-root    # hope to catch 'chmod a-r'-challenged file systems.
+. ./defs || Exit 1
+
+set -e
+
+# In order to have a useful test on modern systems (which have a high
+# limit, if any), use a fake install program that errors out for more
+# than 2K characters in a command line.  The POSIX limit is 4096, but
+# that may include space taken up by the environment.
+
+limit=2500
+subdir=long_subdir_name_with_many_characters
+nfiles=81
+
+# Let's use `seq' if available, it's faster than the loop.
+list=`(seq 1 $nfiles) 2>/dev/null || {
+  i=1
+  while test $i -le $nfiles; do
+    echo $i
+    i=\`expr $i + 1\`
+  done; }`
+
+sed "s|@limit@|$limit|g" >myinstall.in <<'END'
+#! /bin/sh
+# Fake install script.  This doesn't really install
+# (the INSTALL path below would be wrong outside this directory).
address@hidden@
+INSTALL='@INSTALL@'
+len=`expr "$INSTALL $*" : ".*" 2>/dev/null || echo $limit`
+if test $len -ge $limit; then
+  echo "$0: safe command line limit of $limit characters exceeded" >&2
+  exit 1
+fi
+exit 0
+END
+
+# Creative quoting in the next line to please maintainer-check.
+sed "s|@limit@|$limit|g" >'rm' <<'END'
+#! /bin/sh
address@hidden@
+PATH=$save_PATH
+export PATH
+RM='rm -f'
+len=`expr "$RM $*" : ".*" 2>/dev/null || echo $limit`
+if test $len -ge $limit; then
+  echo "$0: safe command line limit of $limit characters exceeded" >&2
+  exit 1
+fi
+exec $RM "$@"
+exit 1
+END
+
+chmod +x rm
+
+cat >>configure.in <<END
+AC_CONFIG_FILES([myinstall], [chmod +x ./myinstall])
+AC_CONFIG_FILES([$subdir/Makefile])
+AC_OUTPUT
+END
+
+cat >Makefile.am <<END
+SUBDIRS = $subdir
+END
+
+mkdir $subdir
+cd $subdir
+
+cat >Makefile.am <<'END'
+bin_SCRIPTS =
+nobase_bin_SCRIPTS =
+data_DATA =
+nobase_data_DATA =
+include_HEADERS =
+nobase_include_HEADERS =
+END
+
+for n in $list; do
+  cat >>Makefile.am <<END
+bin_SCRIPTS += script$n
+nobase_bin_SCRIPTS += nscript$n
+data_DATA += data$n
+nobase_data_DATA += ndata$n
+include_HEADERS += header$n.h
+nobase_include_HEADERS += nheader$n.h
+END
+  echo >script$n
+  echo >nscript$n
+  echo >data$n
+  echo >ndata$n
+  echo >header$n.h
+  echo >nheader$n.h
+done
+
+cd ..
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+instdir=`pwd`/inst
+mkdir build
+cd build
+../configure --prefix="$instdir"
+$MAKE
+# Try whether native install (or install-sh) works.
+$MAKE install
+$MAKE uninstall
+test `find "$instdir" -type f -print | wc -l` = 0
+
+# Try whether we don't exceed the low limit.
+INSTALL='$(SHELL) $(top_builddir)/myinstall' $MAKE -e install
+env save_PATH="$PATH" PATH="`pwd`/..:$PATH" $MAKE uninstall
+
+cd $subdir
+srcdir=../../$subdir
+
+# Ensure 'make install' fails when 'install' fails.
+
+# We cheat here, for efficiency, knowing the internal rule names.
+# For correctness, one should `$MAKE install' here always, or at
+# least use install-exec or install-data.
+
+for file in script3 script$nfiles
+do
+  chmod a-r $srcdir/$file
+  $MAKE install-binSCRIPTS && Exit 1
+  chmod u+r $srcdir/$file
+done
+
+for file in nscript3 nscript$nfiles
+do
+  chmod a-r $srcdir/$file
+  $MAKE install-nobase_binSCRIPTS && Exit 1
+  chmod u+r $srcdir/$file
+done
+
+for file in data3 data$nfiles
+do
+  chmod a-r $srcdir/$file
+  $MAKE install-dataDATA && Exit 1
+  chmod u+r $srcdir/$file
+done
+
+for file in ndata3 ndata$nfiles
+do
+  chmod a-r $srcdir/$file
+  $MAKE install-nobase_dataDATA && Exit 1
+  chmod u+r $srcdir/$file
+done
+
+for file in header3.h header$nfiles.h
+do
+  chmod a-r $srcdir/$file
+  $MAKE install-includeHEADERS && Exit 1
+  chmod u+r $srcdir/$file
+done
+
+for file in nheader3.h nheader$nfiles.h
+do
+  chmod a-r $srcdir/$file
+  $MAKE install-nobase_includeHEADERS && Exit 1
+  chmod u+r $srcdir/$file
+done
+
+:


hooks/post-receive
--
GNU Automake




reply via email to

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