Fix: missing ; in if
[lttng-ci.git] / userspace-rcu / liburcu-master.sh
CommitLineData
56162e2a
JRJ
1# Create build directory
2rm -rf $WORKSPACE/build
3mkdir -p $WORKSPACE/build
4
5PREFIX="$WORKSPACE/build"
6
7./bootstrap
8
9CONF_OPTS=""
10
11case "$conf" in
12static)
13 echo "Static build"
14 CONF_OPTS="--enable-static --disable-shared"
15 ;;
16tls_fallback)
17 echo "Using pthread_getspecific() to emulate TLS"
18 CONF_OPTS="--disable-compiler-tls"
19 ;;
20*)
21 echo "Standard build"
22 CONF_OPTS=""
23 ;;
24esac
25
595a34c7
JR
26# Build type
27# oot : out-of-tree build
28# dist: build via make dist
29# * : normal tree build
30#
31# Make sure to move to the build_path and configure
32# before continuing
56162e2a 33
595a34c7
JR
34BUILD_PATH=$WORKSPACE
35case "$build" in
36 oot)
37 echo "Out of tree build"
38 BUILD_PATH=$WORKSPACE/oot
39 mkdir -p $BUILD_PATH
40 cd $BUILD_PATH$WORKSPACE/configure --prefix=$PREFIX $CONF_OPTS
41 ;;
42 dist)
43 echo "Distribution out of tree build"
44 BUILD_PATH=`mktemp -d`
45
46 # Initial configure and generate tarball
47 ./configure
48 make dist
49
50 mkdir -p $BUILD_PATH
51 cp *.tar.* $BUILD_PATH/
52 cd $BUILD_PATH
53
54 # Ignore level 1 of tar
55 tar xvf *.tar.* --staticrip 1
56
57 $BUILD_PATH/configure --prefix=$PREFIX $CONF_OPTS
58 ;;
59 *)
60 echo "Standard tree build"
61 BUILD_PATH=$WORKSPACE
62 $WORKSPACE/configure --prefix=$PREFIX $CONF_OPTS;;
63esac
64
65make V=1
56162e2a
JRJ
66make install
67make clean
68
69# Cleanup rpath and libtool .la files
70find $WORKSPACE/build/lib -name "*.so" -exec chrpath --delete {} \;
71find $WORKSPACE/build/lib -name "*.la" -exec rm -f {} \;
595a34c7 72
4f686830 73if [ $build = "dist" ]; then
595a34c7
JR
74 rm -rf $BUILD_PATH
75fi
This page took 0.02593 seconds and 4 git commands to generate.