123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157 |
- #! /bin/sh
- required='python'
- . test-init.sh
- limit=2500
- subdir=long_subdir_name_with_many_characters
- nfiles=81
- list=$(seq_ 1 $nfiles)
- oPATH=$PATH; export oPATH
- nPATH=$(pwd)/x-bin$PATH_SEPARATOR$PATH; export nPATH
- mkdir x-bin
- sed "s|@limit@|$limit|g" >x-bin/my-install <<'END'
- #! /bin/sh
- limit=@limit@
- PATH=$oPATH; export PATH
- if test -z "$orig_INSTALL"; then
- echo "$0: \$orig_INSTALL variable not set" >&2
- exit 1
- fi
- len=`expr "$orig_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
- exec $orig_INSTALL "$@"
- exit 1
- END
- sed "s|@limit@|$limit|g" >x-bin/'rm' <<'END'
- #! /bin/sh
- limit=@limit@
- PATH=$oPATH; 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 x-bin/'rm' x-bin/my-install
- cat >setenv.in <<'END'
- orig_INSTALL='@INSTALL@'
- case "$orig_INSTALL" in
- /*) ;;
- */*) orig_INSTALL=$(pwd)/$orig_INSTALL;;
- esac
- export orig_INSTALL
- END
- cat >>configure.ac <<END
- AM_PATH_PYTHON
- AC_CONFIG_FILES([setenv.sh:setenv.in])
- 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
- unindent >>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"
- . ./setenv.sh
- test -n "$orig_INSTALL"
- $MAKE
- $MAKE install
- test -n "$(find "$instdir" -name python1.py)"
- $MAKE uninstall
- $MAKE uninstall
- test $(find "$instdir" -type f -print | wc -l) -eq 0
- PATH=$nPATH; export PATH
- run_make INSTALL=my-install install
- test -n "$(find "$instdir" -name python1.py)"
- run_make INSTALL=my-install uninstall
- test $(find "$instdir" -type f -print | wc -l) -eq 0
- PATH=$oPATH; export PATH
- cd $subdir
- srcdir=../../$subdir
- for file in python3.py python$nfiles.py
- do
- chmod a-r $srcdir/$file
- test ! -r $srcdir/$file || skip_ "cannot drop file read permissions"
- $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
- :
|