-#!/bin/sh -exu
+#!/bin/sh
#
# Copyright (C) 2015 - Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
# Michael Jeanson <mjeanson@efficios.com>
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+set -exu
+
# Kernel version compare functions
verlte() {
[ "$1" = "`printf '%s\n%s' $1 $2 | sort -V | head -n1`" ]
# 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
set +e
# Build modules
- make -j${NPROC} -C "${LNXBINDIR}" M="$(pwd)"
+ 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
else # Regular build
# Build modules
- make -j${NPROC} -C "${LNXBINDIR}" M="$(pwd)" V=1
+ 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