[Qt-interest] [PATCH 1/2] configure: handle shell vars in QMAKE_CXX
Grant Likely
grant.likely at secretlab.ca
Thu Jan 14 19:38:31 CET 2010
The configure script fails if the QMAKE_CXX setting uses an
environmental variable. For example, $(CROSS_COMPILE) is often used
to set the gcc prefix. This patch adds a sed command to convert qmake
$() expressions to ${} and passes the result through 'eval' so that the
shell expands it correctly.
This patch makes me feel a bit dirty since it is only a bandaid over the
real problem. The real solution involves implementing full qmake
configuration parsing in shell script, which is not something I'm keen
to take on.
---
configure | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/configure b/configure
index 19fe613..f7d3b5f 100755
--- a/configure
+++ b/configure
@@ -2949,7 +2949,7 @@ else
CFG_FRAMEWORK=no
fi
-QMAKE_CONF_COMPILER=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" | sed "s,.* *= *\(.*\)$,\1," | tail -1`
+eval QMAKE_CONF_COMPILER=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" | sed "s,.* *= *\(.*\)$,\1," | tail -1 | sed 's/\\$\\$/$/g;s/(/{/g;s/)/}/g'`
TEST_COMPILER="$CC"
[ -z "$TEST_COMPILER" ] && TEST_COMPILER=$QMAKE_CONF_COMPILER
if [ -z "$TEST_COMPILER" ]; then
More information about the Qt-interest-old
mailing list