[llvm-commits] [dragonegg] r105166 - in /dragonegg/trunk/extras: buildbot_self_strap buildbot_self_strap-32

Duncan Sands baldrick at free.fr
Sun May 30 06:04:09 PDT 2010


Author: baldrick
Date: Sun May 30 08:04:09 2010
New Revision: 105166

URL: http://llvm.org/viewvc/llvm-project?rev=105166&view=rev
Log:
Fix a possible infinite loop linked with ln commands, and change
directory before the ln command so it can deal well with paths
relative to the build root.  Patch by Galina Kistanova.

Modified:
    dragonegg/trunk/extras/buildbot_self_strap
    dragonegg/trunk/extras/buildbot_self_strap-32

Modified: dragonegg/trunk/extras/buildbot_self_strap
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/extras/buildbot_self_strap?rev=105166&r1=105165&r2=105166&view=diff
==============================================================================
--- dragonegg/trunk/extras/buildbot_self_strap (original)
+++ dragonegg/trunk/extras/buildbot_self_strap Sun May 30 08:04:09 2010
@@ -7,13 +7,20 @@
 DRAGONEGG_SOURCE=$2
 BUILD_DIR=$3
 
-ln -sf $LLVM_SOURCE $BUILD_DIR/llvm
-ln -sf $DRAGONEGG_SOURCE $BUILD_DIR/dragonegg
+# Change the current directory to the build root. 
+cd $BUILD_DIR
+
+# Create links only if target directory or link does not exist.
+if [ ! -d $BUILD_DIR/llvm ] ; then
+   ln -sf $LLVM_SOURCE $BUILD_DIR/llvm
+fi
+if [ ! -d $BUILD_DIR/dragonegg ] ; then
+   ln -sf $DRAGONEGG_SOURCE $BUILD_DIR/dragonegg
+fi
 
 export CPPFLAGS="-I/opt/cfarm/mpfr-2.4.1/include -I/opt/cfarm/gmp-4.2.4/include/ -I /opt/cfarm/mpc-0.8/include/"
 export GCC_OPTIONS="--enable-languages=c,c++,fortran,objc,obj-c++ --with-mpfr=/opt/cfarm/mpfr-2.4.1 --with-gmp=/opt/cfarm/gmp-4.2.4 --with-mpc=/opt/cfarm/mpc-0.8 --with-libelf=/opt/cfarm/libelf-0.8.12"
 
-cd $BUILD_DIR
 if [ -e gcc ] ; then
 	svn cleanup gcc # In case a previous run was interrupted while checking out gcc
 fi

Modified: dragonegg/trunk/extras/buildbot_self_strap-32
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/extras/buildbot_self_strap-32?rev=105166&r1=105165&r2=105166&view=diff
==============================================================================
--- dragonegg/trunk/extras/buildbot_self_strap-32 (original)
+++ dragonegg/trunk/extras/buildbot_self_strap-32 Sun May 30 08:04:09 2010
@@ -7,8 +7,16 @@
 DRAGONEGG_SOURCE=$2
 BUILD_DIR=$3
 
-ln -sf $LLVM_SOURCE $BUILD_DIR/llvm
-ln -sf $DRAGONEGG_SOURCE $BUILD_DIR/dragonegg
+# Change the current directory to the build root. 
+cd $BUILD_DIR
+
+# Create links only if target directory or link does not exist.
+if [ ! -d $BUILD_DIR/llvm ] ; then
+   ln -sf $LLVM_SOURCE $BUILD_DIR/llvm
+fi
+if [ ! -d $BUILD_DIR/dragonegg ] ; then
+   ln -sf $DRAGONEGG_SOURCE $BUILD_DIR/dragonegg
+fi
 
 export CC="gcc -m32"
 export CXX="g++ -m32"
@@ -17,7 +25,6 @@
 export GCC_OPTIONS="--enable-languages=c,c++,fortran,objc,obj-c++ --build=i686-pc-linux-gnu --disable-multilib --enable-targets=all --with-mpfr=$HOME/cfarm-32/ --with-gmp=$HOME/cfarm-32/ --with-mpc=$HOME/cfarm-32/ --with-libelf=$HOME/cfarm-32/"
 export LLVM_OPTIONS="--build=i686-pc-linux-gnu"
 
-cd $BUILD_DIR
 if [ -e gcc ] ; then
 	svn cleanup gcc # In case a previous run was interrupted while checking out gcc
 fi





More information about the llvm-commits mailing list