3 # Copyright (C) 2015, Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
4 # 2016, Michael Jeanson <mjeanson@efficios.com>
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
21 URCU_INCS
="$WORKSPACE/deps/liburcu/build/include/"
22 URCU_LIBS
="$WORKSPACE/deps/liburcu/build/lib/"
24 SRCDIR
="$WORKSPACE/src/lttng-ust"
25 TMPDIR
="$WORKSPACE/tmp"
26 PREFIX
="$WORKSPACE/build"
28 # Create build and tmp directories
29 rm -rf "$PREFIX" "$TMPDIR"
30 mkdir
-p "$PREFIX" "$TMPDIR"
34 # Set platform variables
47 export CPPFLAGS
="-I$URCU_INCS"
48 export LDFLAGS
="-L$URCU_LIBS"
49 export LD_LIBRARY_PATH
="$URCU_LIBS:${LD_LIBRARY_PATH:-}"
52 # Set configure options for each build configuration
56 # Unsupported! liblttng-ust can't pull in it's static (.a) dependencies.
58 CONF_OPTS
="--enable-static --disable-shared"
62 echo "Java agent build"
63 export CLASSPATH
="/usr/share/java/log4j-1.2.jar"
64 CONF_OPTS
="--enable-java-agent-all"
68 echo "Python agent build"
69 CONF_OPTS
="--enable-python-agent"
78 # Enter the source directory
81 # Run bootstrap in the source directory prior to configure
86 # oot : out-of-tree build
87 # dist: build via make dist
88 # * : normal tree build
90 # Make sure to move to the build_path and configure
95 echo "Out of tree build"
96 BUILD_PATH
=$WORKSPACE/oot
99 $SRCDIR/configure
--prefix=$PREFIX $CONF_OPTS
103 echo "Distribution out of tree build"
104 BUILD_PATH
=`mktemp -d`
106 # Initial configure and generate tarball
111 cp *.
tar.
* $BUILD_PATH/
114 # Ignore level 1 of tar
115 $TAR xvf
*.
tar.
* --strip 1
117 $BUILD_PATH/configure
--prefix=$PREFIX $CONF_OPTS
121 echo "Standard in-tree build"
122 $BUILD_PATH/configure
--prefix=$PREFIX $CONF_OPTS
127 $MAKE -j `$NPROC` V
=1
133 # Copy tap logs for the jenkins tap parser
134 rsync
-a --exclude 'test-suite.log' --include '*/' --include '*.log' --exclude='*' tests
/ "$WORKSPACE/tap"
136 # Clean the build directory
139 # Cleanup rpath in executables and shared libraries
140 find $PREFIX/lib
-name "*.so" -exec chrpath
--delete {} \
;
142 # Remove libtool .la files
143 find $PREFIX/lib
-name "*.la" -exec rm -f {} \
;
145 # Clean temp dir for dist build
146 if [ "$build" = "dist" ]; then
This page took 0.033759 seconds and 4 git commands to generate.