jjb: babeltrace: disable python doc in 'std' build
[lttng-ci.git] / scripts / babeltrace / build.sh
index cf4906393e0647be73938abc88c236a4aabd167e..71ee6c5e0684337faeb52fada3fed41f8e5117e9 100755 (executable)
@@ -144,7 +144,7 @@ clang-7)
     ;;
 esac
 
-if [ "x$CC" != "x" ]; then
+if [ "x${CC:-}" != "x" ]; then
     echo "Selected compiler:"
     "$CC" -v
 fi
@@ -196,6 +196,11 @@ cd "$SRCDIR"
 # Get source version from configure script
 eval "$(grep '^PACKAGE_VERSION=' ./configure)"
 
+# Enable dev mode by default for BT 2.0 builds
+export BABELTRACE_DEBUG_MODE=1
+export BABELTRACE_DEV_MODE=1
+export BABELTRACE_MINIMAL_LOG_LEVEL=TRACE
+
 # Set configure options for each build configuration
 CONF_OPTS=""
 case "$conf" in
@@ -210,16 +215,41 @@ python-bindings)
     echo "Build with python bindings"
     # We only support bindings built with Python 3
     export PYTHON="python3"
-    export PYTHON_CONFIG="/usr/bin/python3-config"
+    export PYTHON_CONFIG="python3-config"
     CONF_OPTS="--enable-python-bindings"
 
     if vergte "$PACKAGE_VERSION" "2.0"; then
         CONF_OPTS="${CONF_OPTS} --enable-python-bindings-doc --enable-python-plugins"
     fi
     ;;
+prod)
+    echo "Production build"
+
+    # Unset the developper variables
+    unset BABELTRACE_DEBUG_MODE
+    unset BABELTRACE_DEV_MODE
+    unset BABELTRACE_MINIMAL_LOG_LEVEL
+
+    # Enable the python bindings
+    export PYTHON="python3"
+    export PYTHON_CONFIG="python3-config"
+    CONF_OPTS="--enable-python-bindings --enable-python-bindings-doc --enable-python-plugins"
+    ;;
+min)
+    echo "Minimal build"
+    CONF_OPTS=""
+    ;;
 *)
     echo "Standard build"
     CONF_OPTS=""
+
+    # Enable the python bindings / plugins by default with babeltrace2
+    # the test suite is mostly useless without it.
+    if vergte "$PACKAGE_VERSION" "2.0"; then
+        export PYTHON="python3"
+        export PYTHON_CONFIG="python3-config"
+        CONF_OPTS="${CONF_OPTS} --enable-python-bindings --enable-python-plugins"
+    fi
     ;;
 esac
 
This page took 0.025395 seconds and 4 git commands to generate.