Add tree build type configuration to liburcu
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Tue, 27 Jan 2015 21:26:57 +0000 (16:26 -0500)
committerJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Tue, 27 Jan 2015 21:26:57 +0000 (16:26 -0500)
userspace-rcu/liburcu-master.sh

index a71dce2b8fd8aac4b7768cfe941651038eb920dd..7bccb9e6a2ad7e645ce8f490b53afc433f087905 100755 (executable)
@@ -23,12 +23,53 @@ tls_fallback)
     ;;
 esac
 
-./configure --prefix=$PREFIX $CONF_OPTS
+# Build type
+# oot : out-of-tree build
+# dist: build via make dist
+# *   : normal tree build
+#
+# Make sure to move to the build_path and configure
+# before continuing
 
-make -j $NPROC
+BUILD_PATH=$WORKSPACE
+case "$build" in
+       oot)
+               echo "Out of tree build"
+               BUILD_PATH=$WORKSPACE/oot
+               mkdir -p $BUILD_PATH
+               cd $BUILD_PATH$WORKSPACE/configure --prefix=$PREFIX $CONF_OPTS
+               ;;
+       dist)
+               echo "Distribution out of tree build"
+               BUILD_PATH=`mktemp -d`
+
+               # Initial configure and generate tarball
+               ./configure
+               make dist
+
+               mkdir -p $BUILD_PATH
+               cp *.tar.* $BUILD_PATH/
+               cd $BUILD_PATH
+
+               # Ignore level 1 of tar
+               tar xvf *.tar.* --staticrip 1
+
+               $BUILD_PATH/configure --prefix=$PREFIX $CONF_OPTS
+               ;;
+       *)
+               echo "Standard tree build"
+               BUILD_PATH=$WORKSPACE
+               $WORKSPACE/configure --prefix=$PREFIX $CONF_OPTS;;
+esac
+
+make V=1
 make install
 make clean
 
 # Cleanup rpath and libtool .la files
 find $WORKSPACE/build/lib -name "*.so" -exec chrpath --delete {} \;
 find $WORKSPACE/build/lib -name "*.la" -exec rm -f {} \;
+
+if [ $build = "dist" ] then
+       rm -rf $BUILD_PATH
+fi
This page took 0.023285 seconds and 4 git commands to generate.