X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=scripts%2Fbabeltrace%2Fbuild.sh;h=4aa0cb62000c3515d2ca6908d6c2252a5ef8d5b3;hb=4f4f6150a72761b7e8d1ff6de0924e81ead3c158;hp=3af49df6d56e93c616d2bab7493db3ad06bbc576;hpb=9565443101589c6455b3aca9282830668ff175f6;p=lttng-ci.git diff --git a/scripts/babeltrace/build.sh b/scripts/babeltrace/build.sh index 3af49df..4aa0cb6 100755 --- a/scripts/babeltrace/build.sh +++ b/scripts/babeltrace/build.sh @@ -25,6 +25,31 @@ PREFIX="$WORKSPACE/build" CONF_OPTS="" +case "$arch" in +solaris10) + MAKE=gmake + TAR=gtar + NPROC=gnproc + BISON=bison + YACC="$BISON -y" + ;; +solaris11) + MAKE=gmake + TAR=gtar + NPROC=nproc + BISON="/opt/csw/bin/bison" + YACC="$BISON -y" + export PATH="$PATH:/usr/perl5/bin" + ;; +*) + MAKE=make + TAR=tar + NPROC=nproc + BISON=bison + YACC="$BISON -y" + ;; +esac + case "$conf" in static) echo "Static build" @@ -60,63 +85,47 @@ case "$build" in BUILD_PATH=$WORKSPACE/oot mkdir -p $BUILD_PATH cd $BUILD_PATH - $WORKSPACE/configure --prefix=$PREFIX $CONF_OPTS + MAKE=$MAKE BISON="$BISON" YACC="$YACC" $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 + MAKE=$MAKE BISON="$BISON" YACC="$YACC" ./configure + $MAKE dist mkdir -p $BUILD_PATH cp *.tar.* $BUILD_PATH/ cd $BUILD_PATH # Ignore level 1 of tar - tar xvf *.tar.* --strip 1 + $TAR xvf *.tar.* --strip 1 - $BUILD_PATH/configure --prefix=$PREFIX $CONF_OPTS + MAKE=$MAKE BISON="$BISON" YACC="$YACC" $BUILD_PATH/configure --prefix=$PREFIX $CONF_OPTS # Set test plan to dist tar TEST_PLAN_PATH=$BUILD_PATH ;; *) echo "Standard tree build" - $WORKSPACE/configure --prefix=$PREFIX $CONF_OPTS + MAKE=$MAKE BISON="$BISON" YACC="$YACC" $WORKSPACE/configure --prefix=$PREFIX $CONF_OPTS ;; esac -make -make install - -rm -rf $WORKSPACE/tap -mkdir -p $WORKSPACE/tap - -cd $BUILD_PATH/tests - -# Run make check tests -if [ -e $TEST_PLAN_PATH/tests/tests ]; then - prove --merge --exec '' - < $TEST_PLAN_PATH/tests/tests --archive $WORKSPACE/tap/ || true -else - echo "Missing test plan" - exit 1 -fi - -# TAP plugin is having a hard time with .yml files. -rm -f $WORKSPACE/tap/meta.yml - -# And also with files without extension, so rename all result to *.tap -find $WORKSPACE/tap/ -type f -exec mv {} {}.tap \; - -make clean +$MAKE -j `$NPROC` +$MAKE install +$MAKE check +$MAKE clean # Cleanup rpath and libtool .la files -find $WORKSPACE/build/bin -executable -type f -exec chrpath --delete {} \; +#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 + cd $WORKSPACE + rm -rf $BUILD_PATH fi + +# EOF