Small cleanup in DLEP code to make sure session cleanup does not block
[oonf.git] / files / build_all_variants.sh
1 #!/bin/bash
2
3 # this script checks out the current revision of the oonf.git repository and builds nine variants of the source
4
5 function build_oonf {
6         echo ""
7         echo "build CMAKE_BUILD_TYPE=${1} OONF_LOGGING_LEVEL=${2}"
8         mkdir build-${1}-${2}
9         cd build-${1}-${2}
10         cmake >/dev/null -D CMAKE_BUILD_TYPE:String=${1} -D OONF_LOGGING_LEVEL:String=${2} ..
11         make >/dev/null all
12         cd ..
13 }
14
15 if [ ! -d "oonf" ]; then
16   # Clone git repository
17   git clone git://olsr.org/oonf.git
18 fi
19
20 # cleanup source directory
21 cd oonf
22 git pull
23 git checkout master
24 git reset --hard
25 git clean -d -f -q
26
27 # build all useful variants of OONF
28 build_oonf Debug debug
29 build_oonf Debug info
30 build_oonf Debug warn
31 build_oonf Release debug
32 build_oonf Release info
33 build_oonf Release warn
34 build_oonf MinSizeRel debug
35 build_oonf MinSizeRel info
36 build_oonf MinSizeRel warn