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 # Create build directory
20 rm -rf $WORKSPACE/build
21 mkdir
-p $WORKSPACE/build
23 PREFIX
="$WORKSPACE/build"
25 # Set platform variables
38 BISON
="/opt/csw/bin/bison"
40 export PATH
="$PATH:/usr/perl5/bin"
45 NPROC
="getconf _NPROCESSORS_ONLN"
48 export PATH
="/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
49 export CFLAGS
="-I/opt/local/include"
50 export LDFLAGS
="-L/opt/local/lib"
61 # Set configure options for each build configuration
66 CONF_OPTS
="--enable-static --disable-shared"
69 echo "Build with python bindings"
70 # We only support bindings built with Python 3
71 export PYTHON
="python3"
72 export PYTHON_CONFIG
="/usr/bin/python3-config"
73 CONF_OPTS
="--enable-python-bindings"
82 # Run bootstrap prior to configure
87 # oot : out-of-tree build
88 # dist: build via make dist
89 # * : normal tree build
91 # Make sure to move to the build_path and configure
94 TEST_PLAN_PATH
=$WORKSPACE
97 echo "Out of tree build"
98 BUILD_PATH
=$WORKSPACE/oot
101 MAKE
=$MAKE BISON
="$BISON" YACC
="$YACC" $WORKSPACE/configure
--prefix=$PREFIX $CONF_OPTS
105 echo "Distribution out of tree build"
106 BUILD_PATH
=`mktemp -d`
108 # Initial configure and generate tarball
109 MAKE
=$MAKE BISON
="$BISON" YACC
="$YACC" .
/configure
113 cp *.
tar.
* $BUILD_PATH/
116 # Ignore level 1 of tar
117 $TAR xvf
*.
tar.
* --strip 1
119 MAKE
=$MAKE BISON
="$BISON" YACC
="$YACC" $BUILD_PATH/configure
--prefix=$PREFIX $CONF_OPTS
121 # Set test plan to dist tar
122 TEST_PLAN_PATH
=$BUILD_PATH
126 echo "LLVM clang build"
129 MAKE
=$MAKE BISON
="$BISON" YACC
="$YACC" $WORKSPACE/configure
--prefix=$PREFIX $CONF_OPTS
132 echo "Standard tree build"
133 MAKE
=$MAKE BISON
="$BISON" YACC
="$YACC" $WORKSPACE/configure
--prefix=$PREFIX $CONF_OPTS
138 $MAKE -j `$NPROC` V
=1
144 # Remove global test suite log file, it confuses the tap parser
145 rm -f tests
/test-suite.log
147 # Cleanup rpath in executables and shared libraries
148 find $WORKSPACE/build
/bin
-type f
-perm -0500 -exec chrpath
--delete {} \
;
149 find $WORKSPACE/build
/lib
-name "*.so" -exec chrpath
--delete {} \
;
151 # Remove libtool .la files
152 find $WORKSPACE/build
/lib
-name "*.la" -exec rm -f {} \
;
154 # Clean temp dir for dist build
155 if [ "$build" = "dist" ]; then
This page took 0.056408 seconds and 4 git commands to generate.