From: Jonathan Rajotte Date: Tue, 27 Jan 2015 21:26:57 +0000 (-0500) Subject: Add tree build type configuration to liburcu X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=595a34c784b1c2b9170327adeeb4fdadb7dbe4a6;p=lttng-ci.git Add tree build type configuration to liburcu --- diff --git a/userspace-rcu/liburcu-master.sh b/userspace-rcu/liburcu-master.sh index a71dce2..7bccb9e 100755 --- a/userspace-rcu/liburcu-master.sh +++ b/userspace-rcu/liburcu-master.sh @@ -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