From a59f6bd76b2f65ef200f59f9a60df40d67f40fbb Mon Sep 17 00:00:00 2001 From: Christian Beer Date: Mon, 20 Mar 2017 11:49:31 +0100 Subject: [PATCH] Build: fix wxWidgets Linux build to work without prefix Didn't work with an empty prefix. Also fixes behavior when --clean is specified since we use a special build directory. --- 3rdParty/buildWxLinux.sh | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/3rdParty/buildWxLinux.sh b/3rdParty/buildWxLinux.sh index 15cc31a69a..02197074b8 100644 --- a/3rdParty/buildWxLinux.sh +++ b/3rdParty/buildWxLinux.sh @@ -62,6 +62,8 @@ fi doclean="" configuration="Release" +lprefix="" +cmdline_prefix="" while [[ $# -gt 0 ]]; do key="$1" case $key in @@ -73,6 +75,7 @@ while [[ $# -gt 0 ]]; do ;; -prefix|--prefix) lprefix="$2" + cmdline_prefix="--prefix=${lprefix}" shift ;; esac @@ -84,20 +87,20 @@ if [ $configuration = "Debug" ]; then debug_flag="--enable-debug" fi -if [ "${doclean}" = "yes" ]; then - make clean +if [ -d buildgtk ] && [ "${doclean}" = "yes" ]; then + rm -rf buildgtk fi - -mkdir buildgtk -if [ $? -ne 0 ]; then exit 1; fi +mkdir -p buildgtk cd buildgtk || return 1 -../configure --prefix="${lprefix}" --with-gtk --disable-shared --enable-webview --disable-gtktest --disable-sdltest ${debug_flag} +../configure "${cmdline_prefix}" --with-gtk --disable-shared --enable-webview --disable-gtktest --disable-sdltest ${debug_flag} if [ $? -ne 0 ]; then cd ..; return 1; fi make 1>/dev/null # the wxWidgets build is very noisy so tune it down to warnings and errors only if [ $? -ne 0 ]; then cd ..; return 1; fi -make install -if [ $? -ne 0 ]; then cd ..; return 1; fi +if [ "x${lprefix}" != "x" ]; then + make install + if [ $? -ne 0 ]; then cd ..; return 1; fi +fi cd .. return 0