# shellcheck disable=SC2103
#
# Copyright (C) 2016 Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
-# 2016-2019 Michael Jeanson <mjeanson@efficios.com>
+# Copyright (C) 2016-2020 Michael Jeanson <mjeanson@efficios.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
;;
esac
+# If we have modules, build them
+if [ -d "$WORKSPACE/src/lttng-modules" ]; then
+ cd "$WORKSPACE/src/lttng-modules"
+ $MAKE -j"$($NPROC)" V=1
+ $MAKE modules_install V=1
+ depmod
+fi
+
# Enter the source directory
cd "$SRCDIR"
# Most build configs require the python bindings
CONF_OPTS=("--prefix=$PREFIX" "--enable-python-bindings")
+DIST_CONF_OPTS=()
+
# Set configure options and environment variables for each build
# configuration.
case "$conf" in
no-ust)
echo "Build without UST support"
CONF_OPTS+=("$NO_UST")
+ DIST_CONF_OPTS+=("$NO_UST")
;;
agents)
# Run configure and generate the tar file
# in the source directory
- ./configure
+ ./configure "${DIST_CONF_OPTS[@]}"
$MAKE dist
# Create and enter a temporary build directory
cd "$builddir"
# Run configure out of tree and generate the tar file
- "$SRCDIR/configure"
+ "$SRCDIR/configure" "${DIST_CONF_OPTS[@]}"
$MAKE dist
dist_srcdir="$(mktemp -d)"