summaryrefslogtreecommitdiff
path: root/src/poi-service
diff options
context:
space:
mode:
author <philippe colliot>2016-01-15 09:48:17 +0100
committer <philippe colliot>2016-01-15 09:48:17 +0100
commit9be8508170ae34680ab8107f04a6398db373ecc2 (patch)
tree70e45b11d9be7e1edb8baa1d327a89b605c289cf /src/poi-service
parent8226583ad533da922ae41eafcf184cb3ee362640 (diff)
downloadpoi-service-9be8508170ae34680ab8107f04a6398db373ecc2.tar.gz
Some improvements of scripts and README
Diffstat (limited to 'src/poi-service')
-rwxr-xr-xsrc/poi-service/rebuild_all.sh57
1 files changed, 43 insertions, 14 deletions
diff --git a/src/poi-service/rebuild_all.sh b/src/poi-service/rebuild_all.sh
index 2ef165a..677fc3d 100755
--- a/src/poi-service/rebuild_all.sh
+++ b/src/poi-service/rebuild_all.sh
@@ -1,17 +1,46 @@
#!/bin/bash
-if [ ! $COMMONAPI_TOOL_DIR ]
-then
- echo 'Set the dir of the common api tools'
- echo 'export COMMONAPI_TOOL_DIR=<path>'
- exit 1
-fi
-
-if [ ! $COMMONAPI_DBUS_TOOL_DIR ]
-then
- echo 'Set the dir of the common api dbus tools'
- echo 'export COMMONAPI_DBUS_TOOL_DIR=<path>'
- exit 1
+debug="OFF"
+franca="OFF"
+dbus="ON"
+commonapi_tools_option=""
+
+while getopts df opt
+do
+ case $opt in
+ d)
+ debug="ON"
+ ;;
+ f)
+ franca="ON"
+ dbus="OFF"
+ ;;
+ \?)
+ echo "Usage:"
+ echo "$0 [-df]"
+ echo "-d: Enable the debug messages"
+ echo "-f: Build using the Franca interfaces"
+ exit 1
+ esac
+done
+set -e
+
+if [ $franca="ON" ]
+then
+ if [ ! $COMMONAPI_TOOL_DIR ]
+ then
+ echo 'Set the dir of the common api tools'
+ echo 'export COMMONAPI_TOOL_DIR=<path>'
+ exit 1
+ fi
+
+ if [ ! $COMMONAPI_DBUS_TOOL_DIR ]
+ then
+ echo 'Set the dir of the common api dbus tools'
+ echo 'export COMMONAPI_DBUS_TOOL_DIR=<path>'
+ exit 1
+ fi
+ commonapi_tools_option="-DCOMMONAPI_DBUS_TOOL_DIR="$COMMONAPI_DBUS_TOOL_DIR" -DCOMMONAPI_TOOL_DIR="$COMMONAPI_TOOL_DIR
fi
echo 'delete the build folder'
@@ -20,8 +49,8 @@ rm -rf build
mkdir build
cd build
-echo 'build with CommonAPI'
-cmake -DWITH_FRANCA_DBUS_INTERFACE=ON -DWITH_DBUS_INTERFACE=OFF -DCOMMONAPI_DBUS_TOOL_DIR=$COMMONAPI_DBUS_TOOL_DIR -DCOMMONAPI_TOOL_DIR=$COMMONAPI_TOOL_DIR -DWITH_DEBUG=ON . ../
+echo 'build poi-server'
+cmake -DWITH_FRANCA_DBUS_INTERFACE=$franca -DWITH_DBUS_INTERFACE=$dbus $commonapi_tools_option -DWITH_DEBUG=$debug ../
make