diff options
Diffstat (limited to 'src/navigation/build.sh')
-rwxr-xr-x | src/navigation/build.sh | 77 |
1 files changed, 53 insertions, 24 deletions
diff --git a/src/navigation/build.sh b/src/navigation/build.sh index 806c2b0..5277477 100755 --- a/src/navigation/build.sh +++ b/src/navigation/build.sh @@ -1,11 +1,39 @@ #!/bin/bash -clean=0 -capi=0 -navit=0 -poi=0 -dlt_option="-DWITH_DLT=OFF" -commonapi_tools_option="-DWITH_PLUGIN_MIGRATION=OFF" +########################################################################### +# @licence app begin@ +# SPDX-License-Identifier: MPL-2.0 +# +# \copyright Copyright (C) 2013-2017, PSA Group +# +# \file build.sh +# +# \brief This file is part of the Build System for navigation. +# +# \author Philippe Colliot <philippe.colliot@mpsa.com> +# +# \version 1.0 +# +# This Source Code Form is subject to the terms of the +# Mozilla Public License (MPL), v. 2.0. +# If a copy of the MPL was not distributed with this file, +# You can obtain one at http://mozilla.org/MPL/2.0/. +# +# For further information see http://www.genivi.org/. +# +# List of changes: +# +# +# @licence end@ +########################################################################### + +clean=0 #no clean (means no cmake) -> -c option +capi=0 #no common api -> -m option +commonapi_tools_option="-DWITH_PLUGIN_MIGRATION=OFF" +navit=0 #no build of navit -> -n option +poi=0 #no build of poi -> -p option +dlt_option="OFF" #no DLT -> -l option +debug="OFF" #no debug -> -d option function check_path_for_capi { @@ -33,17 +61,22 @@ function check_path_for_capi commonapi_tools_option="-DWITH_PLUGIN_MIGRATION=ON -DWITH_DBUS_INTERFACE=OFF -DDBUS_LIB_PATH="$DBUS_LIB_PATH" -DCOMMONAPI_DBUS_TOOL_DIR="$COMMONAPI_DBUS_TOOL_DIR" -DCOMMONAPI_TOOL_DIR="$COMMONAPI_TOOL_DIR } -while getopts cdmnp opt +while getopts cdlmhnp opt do case $opt in c) clean=1 ;; d) - dlt_option="-DWITH_DLT=ON" + debug="ON" + ;; + l) + dlt_option="ON" ;; m) - capi=1 + capi=1 + #check commonapi settings + check_path_for_capi ;; n) navit=1 @@ -51,24 +84,20 @@ do p) poi=1 ;; - \?) + h) echo "Usage:" - echo "$0 [-cdmnp]" - echo "-c: clean and build" - echo "-d: build with dlt (only with -c)" - echo "-m: build with commonAPI plugins (only with -c) " - echo "-n: build navit" - echo "-p: build poi" + echo "$0 [-cdhlmnp]" + echo "-c: Rebuild with clean" + echo "-d: Enable the debug messages" + echo "-h: Help" + echo "-l: Build with dlt (only with -c)" + echo "-m: Build with commonAPI plugins (only with -c)" + echo "-n: Build navit" + echo "-p: Build poi" exit 1 esac done -#check commonapi settings -if [ "$capi" = 1 ] -then - check_path_for_capi -fi - #clean if [ "$clean" = 1 ] && [ -d "./build" ] then @@ -114,7 +143,7 @@ cd .. echo 'build navigation' if [ "$clean" = 1 ] then - cmake $dlt_option $commonapi_tools_option ../ + cmake -DWITH_DLT=$dlt_option $commonapi_tools_option -DWITH_DEBUG=$debug ../ echo 'replace a missing font in the configuration file of navit instances' sed -i -e 's/Liberation Sans/TakaoPGothic/' ./navit/navit/navit_genivi_mapviewer.xml sed -i -e 's/Liberation Sans/TakaoPGothic/' ./navit/navit/navit_genivi_navigationcore.xml @@ -131,7 +160,7 @@ then echo 'build poi' if [ "$clean" = 1 ] then - cmake -DWITH_PLUGIN_MIGRATION=0 ../ + cmake -DWITH_DLT=$dlt_option -DWITH_DEBUG=$debug -DWITH_PLUGIN_MIGRATION=0 ../ fi make fi |