3 # Copyright (C) 2015 - Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 SRCDIR
="$WORKSPACE/src/babeltrace"
20 TMPDIR
="$WORKSPACE/tmp"
21 PREFIX
="$WORKSPACE/build"
23 # Create build and tmp directories
24 rm -rf "$PREFIX" "$TMPDIR"
25 mkdir
-p "$PREFIX" "$TMPDIR"
27 # Set platform variables
40 BISON
="/opt/csw/bin/bison"
42 export PATH
="$PATH:/usr/perl5/bin"
47 NPROC
="getconf _NPROCESSORS_ONLN"
50 export PATH
="/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
51 export CFLAGS
="-I/opt/local/include"
52 export LDFLAGS
="-L/opt/local/lib"
63 # Set configure options for each build configuration
68 CONF_OPTS
="--enable-static --disable-shared"
71 echo "Build with python bindings"
72 # We only support bindings built with Python 3
73 export PYTHON
="python3"
74 export PYTHON_CONFIG
="/usr/bin/python3-config"
75 CONF_OPTS
="--enable-python-bindings"
83 # Enter the source directory
86 # Run bootstrap in the source directory prior to configure
91 # oot : out-of-tree build
92 # dist: build via make dist
93 # * : normal tree build
95 # Make sure to move to the build_path and configure
100 echo "Out of tree build"
101 BUILD_PATH
=$WORKSPACE/oot
104 MAKE
=$MAKE BISON
="$BISON" YACC
="$YACC" "$SRCDIR/configure" --prefix=$PREFIX $CONF_OPTS
108 echo "Distribution out of tree build"
109 BUILD_PATH
=`mktemp -d`
111 # Initial configure and generate tarball
112 MAKE
=$MAKE BISON
="$BISON" YACC
="$YACC" "$SRCDIR/configure"
116 cp *.
tar.
* $BUILD_PATH/
119 # Ignore level 1 of tar
120 $TAR xvf
*.
tar.
* --strip 1
122 MAKE
=$MAKE BISON
="$BISON" YACC
="$YACC" $BUILD_PATH/configure
--prefix=$PREFIX $CONF_OPTS
126 echo "LLVM clang build"
129 MAKE
=$MAKE BISON
="$BISON" YACC
="$YACC" "$SRCDIR/configure" --prefix=$PREFIX $CONF_OPTS
132 echo "Standard in-tree build"
133 MAKE
=$MAKE BISON
="$BISON" YACC
="$YACC" "$SRCDIR/configure" --prefix=$PREFIX $CONF_OPTS
138 $MAKE -j `$NPROC` V
=1
144 # Copy tap logs for the jenkins tap parser
145 rsync
-a --exclude 'test-suite.log' --include '*/' --include '*.log' --exclude='*' tests
/ "$WORKSPACE/tap"
147 # Clean the build directory
150 # Cleanup rpath in executables and shared libraries
151 find $PREFIX/bin
-type f
-perm -0500 -exec chrpath
--delete {} \
;
152 find $PREFIX/lib
-name "*.so" -exec chrpath
--delete {} \
;
154 # Remove libtool .la files
155 find $PREFIX/lib
-name "*.la" -exec rm -f {} \
;
157 # Clean temp dir for dist build
158 if [ "$build" = "dist" ]; then
This page took 0.032532 seconds and 4 git commands to generate.