8e5a9c611d272c50f2ddc5594bd97debde45a7e1
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"
34 CFLAGS
="-D_XOPEN_SOURCE=1 -D_XOPEN_SOURCE_EXTENDED=1 -D__EXTENSIONS__=1"
40 CFLAGS
="-D_XOPEN_SOURCE=1 -D_XOPEN_SOURCE_EXTENDED=1 -D__EXTENSIONS__=1"
41 export PATH
="$PATH:/usr/perl5/bin"
54 CONF_OPTS
="--enable-static --disable-shared"
57 echo "Using pthread_getspecific() to emulate TLS"
58 CONF_OPTS
="--disable-compiler-tls"
67 # oot : out-of-tree build
68 # dist: build via make dist
69 # * : normal tree build
71 # Make sure to move to the build_path and configure
77 echo "Out of tree build"
78 BUILD_PATH
=$WORKSPACE/oot
81 MAKE
=$MAKE CFLAGS
="$CFLAGS" $WORKSPACE/configure
--prefix=$PREFIX $CONF_OPTS
84 echo "Distribution out of tree build"
85 BUILD_PATH
=`mktemp -d`
87 # Initial configure and generate tarball
88 MAKE
=$MAKE .
/configure
92 cp *.
tar.
* $BUILD_PATH/
95 # Ignore level 1 of tar
96 $TAR xvf
*.
tar.
* --strip 1
98 MAKE
=$MAKE CFLAGS
="$CFLAGS" $BUILD_PATH/configure
--prefix=$PREFIX $CONF_OPTS
101 BUILD_PATH
=$WORKSPACE
102 echo "Standard tree build"
103 MAKE
=$MAKE CFLAGS
="$CFLAGS" $WORKSPACE/configure
--prefix=$PREFIX $CONF_OPTS
113 # Cleanup rpath and libtool .la files
114 find $WORKSPACE/build
/lib
-name "*.so" -exec chrpath
--delete {} \
;
115 find $WORKSPACE/build
/lib
-name "*.la" -exec rm -f {} \
;
117 # Cleanup temp directory of dist build
118 if [ $build = "dist" ]; then
This page took 0.03278 seconds and 4 git commands to generate.