2 # Copyright (C) 2008, 2009 Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2, or (at your option)
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 # Installing many files should not exceed the command line length limit.
19 # This is the python sister test of instmany.test, see there for details.
27 subdir
=long_subdir_name_with_many_characters
30 list
=`(seq 1 $nfiles) 2>/dev/null || {
32 while test $i -le $nfiles; do
37 sed "s|@limit@|$limit|g" >myinstall.
in <<'END'
39 # Fake install script. This doesn't really install
40 # (the INSTALL path below would be wrong outside this directory).
43 len=`expr "$INSTALL $*" : ".*" 2>/dev/null || echo $limit`
44 if test $len -ge $limit; then
45 echo "$0: safe command line limit of $limit characters exceeded" >&2
51 # Creative quoting in the next line to please maintainer-check.
52 sed "s|@limit@|$limit|g" >'rm' <<'END'
58 len=`expr "$RM $*" : ".*" 2>/dev/null || echo $limit`
59 if test $len -ge $limit; then
60 echo "$0: safe command line limit of $limit characters exceeded" >&2
69 cat >>configure.
in <<END
71 AC_CONFIG_FILES([myinstall], [chmod +x ./myinstall])
72 AC_CONFIG_FILES([$subdir/Makefile])
76 cat >Makefile.am
<<END
83 cat >Makefile.am
<<'END'
85 nobase_python_PYTHON =
89 cat >>Makefile.am
<<END
90 python_PYTHON += python$n.py
91 nobase_python_PYTHON += npython$n.py
100 $AUTOMAKE --add-missing
105 ..
/configure
--prefix="$instdir"
107 # Try whether native install (or install-sh) works.
109 # Multiple uninstall should work, too.
112 test `find "$instdir" -type f -print | wc -l` = 0
114 # Try whether we don't exceed the low limit.
115 INSTALL
='$(SHELL) $(top_builddir)/myinstall' $MAKE -e install
116 env save_PATH
="$PATH" PATH
="`pwd`/..:$PATH" $MAKE uninstall
121 # Ensure 'make install' fails when 'install' fails.
123 for file in python3.py python
$nfiles.py
125 chmod a-r
$srcdir/$file
126 test ! -r $srcdir/$file || Exit
77
127 $MAKE install && Exit
1
128 chmod u
+r
$srcdir/$file
131 for file in npython3.py npython
$nfiles.py
133 chmod a-r
$srcdir/$file
134 $MAKE install && Exit
1
135 chmod u
+r
$srcdir/$file