diff --git a/3rdParty/buildLinuxDependencies.sh b/3rdParty/buildLinuxDependencies.sh index b71bdcd43f..ae51b62ac0 100755 --- a/3rdParty/buildLinuxDependencies.sh +++ b/3rdParty/buildLinuxDependencies.sh @@ -51,6 +51,7 @@ ROOTDIR=$(pwd) cache_dir="" doclean="" wxoption="" +build_config="Release" while [[ $# -gt 0 ]]; do key="$1" case $key in @@ -63,6 +64,7 @@ while [[ $# -gt 0 ]]; do ;; --debug) wxoption="--debug" + build_config="Debug" ;; *) echo "unrecognized option $key" @@ -82,6 +84,17 @@ else PREFIX="$(pwd)/3rdParty/buildCache/linux" fi +if [ -f "${PREFIX}/build-config" ]; then + cur_config=$(<${PREFIX}/build-config) + if [ "${cur_config}" != "${build_config}" ]; then + doclean="yes" + wxoption="${wxoption} --clean" + fi +else + doclean="yes" + wxoption="${wxoption} --clean" +fi + download_and_build() { cd "${ROOTDIR}/3rdParty/linux" || exit 1 DIRNAME="${1}" @@ -114,6 +127,7 @@ if [ "${doclean}" = "yes" ]; then echo "cleaning cache" rm -rf ${PREFIX} mkdir -p ${PREFIX} + echo ${build_config} >${PREFIX}/build-config fi #download_and_build $DIRNAME $FILENAME $DOWNLOADURL $BUILDSCRIPT diff --git a/3rdParty/buildWxLinux.sh b/3rdParty/buildWxLinux.sh index 02197074b8..bfe2cf6959 100644 --- a/3rdParty/buildWxLinux.sh +++ b/3rdParty/buildWxLinux.sh @@ -61,7 +61,7 @@ else fi doclean="" -configuration="Release" +debug_flag="--disable-debug_flag" lprefix="" cmdline_prefix="" while [[ $# -gt 0 ]]; do @@ -71,7 +71,7 @@ while [[ $# -gt 0 ]]; do doclean="yes" ;; -debug|--debug) - configuration="Debug" + debug_flag="--enable-debug" ;; -prefix|--prefix) lprefix="$2" @@ -82,11 +82,6 @@ while [[ $# -gt 0 ]]; do shift # past argument or value done -debug_flag="--disable-debug_flag" -if [ $configuration = "Debug" ]; then - debug_flag="--enable-debug" -fi - if [ -d buildgtk ] && [ "${doclean}" = "yes" ]; then rm -rf buildgtk fi