Fix: error in copy paste :(
[lttng-ci.git] / userspace-rcu / liburcu-master.sh
index a71dce2b8fd8aac4b7768cfe941651038eb920dd..21bee61bfe2227664ae226c7f27612b8767d4c14 100755 (executable)
@@ -23,12 +23,55 @@ 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.* --strip 1
+
+               $BUILD_PATH/configure --prefix=$PREFIX $CONF_OPTS
+               ;;
+       *)
+               BUILD_PATH=$WORKSPACE
+               echo "Standard tree build"
+               $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.06258 seconds and 4 git commands to generate.