From 0af6a703f328205d2185429a44267d80a128b25f Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Wed, 2 Sep 2015 11:32:59 +0300 Subject: Use correct path for mkspecs Fix qtcreator configure script to use the correct path for mkspecs. Also add command line argument to specify the sdktool location. Change-Id: I6534e1df6dc01767e0e9904d12e7c51c9ec3f0bb Reviewed-by: aavit Reviewed-by: Teemu Holappa --- scripts/configure-qtcreator.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/scripts/configure-qtcreator.sh b/scripts/configure-qtcreator.sh index 4ffe64f..7661297 100755 --- a/scripts/configure-qtcreator.sh +++ b/scripts/configure-qtcreator.sh @@ -29,7 +29,7 @@ ABI="arm-linux-generic-elf-32bit" printUsage () { - echo "Usage: $0 [--remove]" + echo "Usage: $0 [--remove] [--sdktool ]" } while test -n "$1"; do @@ -37,17 +37,19 @@ while test -n "$1"; do "--help" | "-h") printUsage exit 0 - shift ;; "--remove") REMOVEONLY=1 + ;; + "--sdktool") shift + SDKTOOL=$1 ;; *) CONFIG=$1 - shift ;; esac + shift done if [ ! -f "$CONFIG" ]; then @@ -65,12 +67,13 @@ fi source $CONFIG -if [ ! -d "${OECORE_NATIVE_SYSROOT}/mkspecs/${MKSPEC}" ]; then - echo Error: $CONFIG is invalid. +MKSPECPATH=$(find ${OECORE_TARGET_SYSROOT} -name $(basename ${MKSPEC})) +if [ ! -d "${MKSPECPATH}" ]; then + echo "Error: could not find mkspec ${MKSPEC} from the toolchain" exit 1 fi -MACHINE=$(grep '^MACHINE' ${OECORE_NATIVE_SYSROOT}/mkspecs/qdevice.pri | cut -d'=' -f2 | tr -d ' ') +MACHINE=$(grep '^MACHINE' ${MKSPECPATH}/../../qdevice.pri | cut -d'=' -f2 | tr -d ' ') RELEASE=$(qmake -query QT_VERSION) -- cgit v1.2.3-54-g00ecf