From: Jonathan Rajotte Date: Wed, 28 Jan 2015 16:50:22 +0000 (-0500) Subject: add out-of-tree build to babeltrace stable 1.2 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=d05d558c5ed4c03b5ba5b5f693bd868a59c05154;p=lttng-ci.git add out-of-tree build to babeltrace stable 1.2 --- diff --git a/babeltrace/babeltrace-master.sh b/babeltrace/babeltrace-master.sh index 99417a2..b37c4de 100755 --- a/babeltrace/babeltrace-master.sh +++ b/babeltrace/babeltrace-master.sh @@ -67,7 +67,7 @@ case "$build" in ;; esac -make V=1 +make make install rm -rf $WORKSPACE/tap diff --git a/babeltrace/babeltrace-stable-1.2.sh b/babeltrace/babeltrace-stable-1.2.sh index 8391abe..b37c4de 100755 --- a/babeltrace/babeltrace-stable-1.2.sh +++ b/babeltrace/babeltrace-stable-1.2.sh @@ -26,7 +26,46 @@ python_bindings) ;; 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 + +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.* --strip 1 + + $BUILD_PATH/configure --prefix=$PREFIX $CONF_OPTS + ;; + *) + BUILD_PATH=$WORKSPACE + echo "Standard tree build" + $WORKSPACE/configure --prefix=$PREFIX $CONF_OPTS + ;; +esac make make install @@ -34,10 +73,10 @@ make install rm -rf $WORKSPACE/tap mkdir -p $WORKSPACE/tap -cd $WORKSPACE/tests +cd $BUILD_PATH/tests # Run make check tests -prove --merge --exec '' - < $WORKSPACE/tests/tests --archive $WORKSPACE/tap/ || true +prove --merge --exec '' - < $BUILD_PATH/tests/tests --archive $WORKSPACE/tap/ || true # TAP plugin is having a hard time with .yml files. rm -f $WORKSPACE/tap/meta.yml @@ -51,3 +90,7 @@ make clean find $WORKSPACE/build/bin -executable -type f -exec chrpath --delete {} \; 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