Fix: wrong path for configure
[lttng-ci.git] / lttng-ust / lttng-ust-master.sh
CommitLineData
047da710
JRJ
1# Create build directory
2rm -rf $WORKSPACE/build
3mkdir -p $WORKSPACE/build
4
5# liburcu
6URCU_INCS="$WORKSPACE/dependencies/liburcu/build/include/"
7URCU_LIBS="$WORKSPACE/dependencies/liburcu/build/lib/"
8
9export CPPFLAGS="-I$URCU_INCS"
10export LDFLAGS="-L$URCU_LIBS"
11export LD_LIBRARY_PATH="$URCU_LIBS:$LD_LIBRARY_PATH"
12
13PREFIX="$WORKSPACE/build"
14
15./bootstrap
16
17CONF_OPTS=""
18
19case "$conf" in
20# Unsupported! liblttng-ust can't pull in it's static (.a) dependencies.
21#static)
22# echo "Static build"
23# CONF_OPTS="--enable-static --disable-shared"
24# ;;
25java-agent)
26 echo "Java agent build"
27 export CLASSPATH="/usr/share/java/log4j-1.2.jar"
28 CONF_OPTS="--enable-java-agent-all"
29 ;;
394e01b4
JR
30python-agent)
31 echo "Python agent build"
32 CONF_OPTS="--enable-python-agent"
1fe5a885 33 ;;
047da710
JRJ
34*)
35 echo "Standard build"
36 CONF_OPTS=""
37 ;;
38esac
39
db6ef590
JR
40# Build type
41# oot : out-of-tree build
42# dist: build via make dist
43# * : normal tree build
e9d51536 44#
58d447bc
JR
45# Make sure to move to the build_path and configure
46# before continuing
e9d51536
JR
47
48BUILD_PATH=$WORKSPACE
db6ef590
JR
49case "$build" in
50 oot)
51 BUILD_PATH=$WORKSPACE/oot
52 mkdir -p $BUILD_PATH
53 cd $BUILD_PATH
58d447bc 54 $WORKSPACE/configure --prefix=$PREFIX $CONF_OPTS
db6ef590
JR
55 ;;
56 dist)
e9d51536
JR
57 BUILD_PATH=/tmp/dist
58
59 # Initial configure and generate tarball
60 ./configure
61 make dist
62
63 mkdir -p $BUILD_PATH
64 cp *.tar.* $BUILD_PATH/
65 cd $BUILD_PATH
58d447bc 66 $BUILD_PATH/configure --prefix=$PREFIX $CONF_OPTS
e9d51536
JR
67
68 # Ignore level 1 of tar
69 tar xvf *.tar.* --strip 1
db6ef590
JR
70 ;;
71 *)
e9d51536 72 BUILD_PATH=$WORKSPACE
58d447bc 73 $WORKSPACE/configure --prefix=$PREFIX $CONF_OPTS
db6ef590
JR
74 ;;
75esac
76
047da710
JRJ
77make V=1
78make install
79
80# Run tests
81rm -rf $WORKSPACE/tap
82mkdir -p $WORKSPACE/tap/unit
83
3b28c859 84cd $BUILD_PATH/tests
047da710 85
db6ef590 86prove --merge --exec '' - < $BUILD_PATH/tests/unit_tests --archive $WORKSPACE/tap/unit/ || true
047da710
JRJ
87
88# TAP plugin is having a hard time with .yml files.
89rm -f $WORKSPACE/tap/unit/meta.yml
90
91# And also with files without extension, so rename all result to *.tap
92find $WORKSPACE/tap/unit/ -type f -exec mv {} {}.tap \;
93
94# Cleanup
95make clean
96
97# Cleanup rpath and libtool .la files
98find $WORKSPACE/build/lib -name "*.so" -exec chrpath --delete {} \;
99find $WORKSPACE/build/lib -name "*.la" -exec rm -f {} \;
This page took 0.028982 seconds and 4 git commands to generate.