X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=scripts%2Fliburcu%2Fbuild.sh;h=806371ac91e4f92f47f1b946491a743b6c85da70;hb=fe584a390a4ab7e4be80ee28befbf4b1e09f3241;hp=ef97773b7ba84b4895251126eecf497d46e172d8;hpb=72f4f0c1881d89d5dc8e1a7887500cc6b365aace;p=lttng-ci.git diff --git a/scripts/liburcu/build.sh b/scripts/liburcu/build.sh index ef97773..806371a 100755 --- a/scripts/liburcu/build.sh +++ b/scripts/liburcu/build.sh @@ -15,6 +15,23 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# Version compare functions +verlte() { + [ "$1" = "`printf '%s\n%s' $1 $2 | sort -V | head -n1`" ] +} + +verlt() { + [ "$1" = "$2" ] && return 1 || verlte $1 $2 +} + +vergte() { + [ "$1" = "`printf '%s\n%s' $1 $2 | sort -V | tail -n1`" ] +} + +vergt() { + [ "$1" = "$2" ] && return 1 || vergte $1 $2 +} + # Create build directory rm -rf $WORKSPACE/build @@ -70,6 +87,9 @@ esac # Run bootstrap prior to configure ./bootstrap +# Get source version from configure script +eval `grep '^PACKAGE_VERSION=' ./configure` + # Build type # oot : out-of-tree build @@ -113,14 +133,15 @@ dist) esac # BUILD! -$MAKE -j `$NPROC` +$MAKE -j `$NPROC` V=1 $MAKE install # Run tests $MAKE check -#if [ "$version" >=" 0.9" ]; then +# Only run regtest for 0.9 and up +if vergte "$PACKAGE_VERSION" "0.9"; then $MAKE regtest -#fi +fi # Cleanup $MAKE clean