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/>.
20 SRCDIR
="$WORKSPACE/src/babeltrace"
21 TMPDIR
="$WORKSPACE/tmp"
22 PREFIX
="$WORKSPACE/build"
24 # Create build and tmp directories
25 rm -rf "$PREFIX" "$TMPDIR"
26 mkdir
-p "$PREFIX" "$TMPDIR"
30 # Set platform variables
43 BISON
="/opt/csw/bin/bison"
45 export PATH
="$PATH:/usr/perl5/bin"
50 NPROC
="getconf _NPROCESSORS_ONLN"
53 export PATH
="/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
54 export CFLAGS
="-I/opt/local/include"
55 export LDFLAGS
="-L/opt/local/lib"
66 # Set configure options for each build configuration
71 CONF_OPTS
="--enable-static --disable-shared"
74 echo "Build with python bindings"
75 # We only support bindings built with Python 3
76 export PYTHON
="python3"
77 export PYTHON_CONFIG
="/usr/bin/python3-config"
78 CONF_OPTS
="--enable-python-bindings"
86 # Enter the source directory
89 # Run bootstrap in the source directory prior to configure
94 # oot : out-of-tree build
95 # dist: build via make dist
96 # * : normal tree build
98 # Make sure to move to the build_path and configure
103 echo "Out of tree build"
104 BUILD_PATH
="$WORKSPACE/oot"
105 mkdir
-p "$BUILD_PATH"
107 MAKE
=$MAKE BISON
="$BISON" YACC
="$YACC" "$SRCDIR/configure" --prefix="$PREFIX" $CONF_OPTS
111 echo "Distribution out of tree build"
112 BUILD_PATH
="`mktemp -d`"
114 # Initial configure and generate tarball
115 MAKE
=$MAKE BISON
="$BISON" YACC
="$YACC" "$SRCDIR/configure"
118 mkdir
-p "$BUILD_PATH"
119 cp .
/*.
tar.
* "$BUILD_PATH/"
122 # Ignore level 1 of tar
123 $TAR xvf .
/*.
tar.
* --strip 1
125 MAKE
=$MAKE BISON
="$BISON" YACC
="$YACC" "$BUILD_PATH/configure" --prefix="$PREFIX" $CONF_OPTS
129 echo "LLVM clang build"
132 MAKE
=$MAKE BISON
="$BISON" YACC
="$YACC" "$SRCDIR/configure" --prefix="$PREFIX" $CONF_OPTS
135 echo "Standard in-tree build"
136 MAKE
=$MAKE BISON
="$BISON" YACC
="$YACC" "$SRCDIR/configure" --prefix="$PREFIX" $CONF_OPTS
141 $MAKE -j `$NPROC` V
=1
147 # Copy tap logs for the jenkins tap parser
148 rsync
-a --exclude 'test-suite.log' --include '*/' --include '*.log' --exclude='*' tests
/ "$WORKSPACE/tap"
150 # Clean the build directory
153 # Cleanup rpath in executables and shared libraries
154 find "$PREFIX/bin" -type f
-perm -0500 -exec chrpath
--delete {} \
;
155 find "$PREFIX/lib" -name "*.so" -exec chrpath
--delete {} \
;
157 # Remove libtool .la files
158 find "$PREFIX/lib" -name "*.la" -exec rm -f {} \
;
160 # Clean temp dir for dist build
161 if [ "$build" = "dist" ]; then
This page took 0.0338850000000001 seconds and 4 git commands to generate.