lttng-ust: out-of-tree build
[lttng-ci.git] / lttng-ust / lttng-ust-master.sh
1 # Create build directory
2 rm -rf $WORKSPACE/build
3 mkdir -p $WORKSPACE/build
4
5 # liburcu
6 URCU_INCS="$WORKSPACE/dependencies/liburcu/build/include/"
7 URCU_LIBS="$WORKSPACE/dependencies/liburcu/build/lib/"
8
9 export CPPFLAGS="-I$URCU_INCS"
10 export LDFLAGS="-L$URCU_LIBS"
11 export LD_LIBRARY_PATH="$URCU_LIBS:$LD_LIBRARY_PATH"
12
13 PREFIX="$WORKSPACE/build"
14
15 ./bootstrap
16
17 CONF_OPTS=""
18
19 case "$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 # ;;
25 java-agent)
26 echo "Java agent build"
27 export CLASSPATH="/usr/share/java/log4j-1.2.jar"
28 CONF_OPTS="--enable-java-agent-all"
29 ;;
30 *)
31 echo "Standard build"
32 CONF_OPTS=""
33 ;;
34 esac
35
36 BUILD_PATH=$WORKSPACE
37 # Build type
38 # oot : out-of-tree build
39 # dist: build via make dist
40 # * : normal tree build
41 case "$build" in
42 oot)
43 BUILD_PATH=$WORKSPACE/oot
44 mkdir -p $BUILD_PATH
45 cd $BUILD_PATH
46 ;;
47 dist)
48 ;;
49 *)
50 ;;
51 esac
52
53 $WORKSPACE/configure --prefix=$PREFIX $CONF_OPTS
54 make V=1
55 make install
56
57 # Run tests
58 rm -rf $WORKSPACE/tap
59 mkdir -p $WORKSPACE/tap/unit
60
61 cd $WORKSPACE/tests
62
63 prove --merge --exec '' - < $BUILD_PATH/tests/unit_tests --archive $WORKSPACE/tap/unit/ || true
64
65 # TAP plugin is having a hard time with .yml files.
66 rm -f $WORKSPACE/tap/unit/meta.yml
67
68 # And also with files without extension, so rename all result to *.tap
69 find $WORKSPACE/tap/unit/ -type f -exec mv {} {}.tap \;
70
71 # Cleanup
72 make clean
73
74 # Cleanup rpath and libtool .la files
75 find $WORKSPACE/build/lib -name "*.so" -exec chrpath --delete {} \;
76 find $WORKSPACE/build/lib -name "*.la" -exec rm -f {} \;
This page took 0.031037 seconds and 4 git commands to generate.