Teach configure's pro-file parser to understand host_build scopes

Is needed now that we write QMAKE_MAC_SDK with a !host_build scope
in qdevice.pri.

Change-Id: I298cc660b496460190337c175aef684a5522d5cb
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
This commit is contained in:
Tor Arne Vestbø 2013-03-06 23:06:46 +01:00 committed by The Qt Project
parent e11c2165c5
commit e9837f7938

10
configure vendored
View File

@ -160,6 +160,12 @@ BEGIN {
values["LITERAL_WHITESPACE"] = " "
values["LITERAL_DOLLAR"] = "$"
}
/^!?host_build:/ {
scopeStart = index($0, ":") + 1
condition = substr($0, 0, scopeStart - 2)
if (condition != "'"$1"'") { next }
$0 = substr($0, scopeStart)
}
/^[_A-Z0-9.]+[ \t]*\+?=/ {
valStart = index($0, "=") + 1
@ -225,7 +231,7 @@ getSingleQMakeVariable()
getQMakeConf()
{
if [ -z "$specvals" ]; then
specvals=`expandQMakeConf "$QMAKESPEC/qmake.conf" | extractQMakeVariables`
specvals=`expandQMakeConf "$QMAKESPEC/qmake.conf" | extractQMakeVariables "host_build"`
fi
getSingleQMakeVariable "$1" "$specvals"
}
@ -233,7 +239,7 @@ getQMakeConf()
getXQMakeConf()
{
if [ -z "$xspecvals" ]; then
xspecvals=`expandQMakeConf "$XQMAKESPEC/qmake.conf" | extractQMakeVariables`
xspecvals=`expandQMakeConf "$XQMAKESPEC/qmake.conf" | extractQMakeVariables "!host_build"`
fi
getSingleQMakeVariable "$1" "$xspecvals"
}