Check that the LLVM source directory exists before changing to it.

main
theraven 15 years ago
parent 34d4c6b12e
commit be68d81286

@ -2,17 +2,19 @@
LLVM_PATH=`llvm-config --src-root` LLVM_PATH=`llvm-config --src-root`
LIBOBJC_PATH=`pwd` LIBOBJC_PATH=`pwd`
if [ x$LLVM_PATH != x ] ; then if [ x$LLVM_PATH != x ] ; then
cd $LLVM_PATH if [ -d $LLVM_PATH ] ; then
cd lib/Transforms cd $LLVM_PATH
if [ ! -d GNURuntime ] ; then cd lib/Transforms
mkdir GNURuntime if [ ! -d GNURuntime ] ; then
fi mkdir GNURuntime
cd GNURuntime
for I in `ls $LIBOBJC_PATH/opts/` ; do
if [ ! $I -nt $LIBOBJC_PATH/opts/$I ] ; then
cp $LIBOBJC_PATH/opts/$I .
fi fi
done cd GNURuntime
$1 $2 for I in `ls $LIBOBJC_PATH/opts/` ; do
cd .. if [ ! $I -nt $LIBOBJC_PATH/opts/$I ] ; then
cp $LIBOBJC_PATH/opts/$I .
fi
done
$1 $2
cd ..
fi
fi fi

Loading…
Cancel
Save