X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=scripts%2Flttng-modules%2Fbuild.sh;h=b52aead53a04d82fb6cc61247bedcf76557058dd;hb=b2f18af4604f35660d9162f65f87e8d59f35e8ea;hp=0d83cf41750a963056cb9d100fdc10cda2161e8a;hpb=584d8735f3f31b4511edc674bbcbbdbea1412dd0;p=lttng-ci.git diff --git a/scripts/lttng-modules/build.sh b/scripts/lttng-modules/build.sh index 0d83cf4..b52aead 100755 --- a/scripts/lttng-modules/build.sh +++ b/scripts/lttng-modules/build.sh @@ -1,4 +1,4 @@ -#!/bin/sh -exu +#!/bin/sh # # Copyright (C) 2015 - Jonathan Rajotte-Julien # Michael Jeanson @@ -16,6 +16,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +set -exu + # Kernel version compare functions verlte() { [ "$1" = "`printf '%s\n%s' $1 $2 | sort -V | head -n1`" ] @@ -37,9 +39,9 @@ vergt() { # Use all CPU cores NPROC=$(nproc) -SRCDIR="${WORKSPACE}/lttng-modules" +SRCDIR="${WORKSPACE}/src/lttng-modules" BUILDDIR="${WORKSPACE}/build" -LNXSRCDIR="${WORKSPACE}/linux" +LNXSRCDIR="${WORKSPACE}/src/linux" LNXBINDIR="${WORKSPACE}/deps/linux/build" # Create build directory @@ -65,7 +67,7 @@ if { vergte "$KVERSION" "3.10" && verlte "$KVERSION" "3.10.13"; } || \ set +e # Build modules - make -j${NPROC} -C "${LNXBINDIR}" M="$(pwd)" V=1 CONFIG_LTTNG=m + KERNELDIR="${LNXBINDIR}" make -j${NPROC} V=1 CONFIG_LTTNG=m # We expect this build to fail, if it doesn't, fail the job. if [ "$?" -eq 0 ]; then @@ -80,10 +82,10 @@ if { vergte "$KVERSION" "3.10" && verlte "$KVERSION" "3.10.13"; } || \ else # Regular build # Build modules - make -j${NPROC} -C "${LNXBINDIR}" M="$(pwd)" V=1 CONFIG_LTTNG=m + KERNELDIR="${LNXBINDIR}" make -j${NPROC} V=1 CONFIG_LTTNG=m # Install modules to build dir - make INSTALL_MOD_PATH="${BUILDDIR}" -C "${LNXBINDIR}" M="$(pwd)" modules_install + KERNELDIR="${LNXBINDIR}" make INSTALL_MOD_PATH="${BUILDDIR}" modules_install fi # EOF