Teach configure's pro-file parser to parse quoted $$system()
If the command is quoted, it can contain anything but quotes (we do not support escaped quotes, so single quotes have to be used). If the command is unquoted we look for the first closing parenthesis. We used to do this using .*?, but the greedy modifier '?' didn't seem to work, so we now use an inverse character set. Change-Id: I40660ce7aef6a6b6d480292d28da1b079bb161da Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This commit is contained in:
parent
e3f36e7290
commit
4c1e7305e5
3
configure
vendored
3
configure
vendored
@ -187,9 +187,10 @@ BEGIN {
|
||||
value = ovalue value
|
||||
|
||||
ovalue = ""
|
||||
while (match(value, /\$\$system\((.*?)\)/)) {
|
||||
while (match(value, /\$\$system\(("[^"]*"|[^)]*)\)/)) {
|
||||
ovalue = ovalue substr(value, 1, RSTART - 1)
|
||||
cmd = substr(value, RSTART + 9, RLENGTH - 10)
|
||||
gsub(/^"|"$/, "", cmd)
|
||||
value = substr(value, RSTART + RLENGTH)
|
||||
while ((cmd | getline line) > 0) {
|
||||
ovalue = ovalue line
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
# Get path of Xcode's Developer directory
|
||||
QMAKE_XCODE_DEVELOPER_PATH = $$system(xcode-select --print-path)
|
||||
QMAKE_XCODE_DEVELOPER_PATH = $$system("xcode-select --print-path")
|
||||
isEmpty(QMAKE_XCODE_DEVELOPER_PATH): \
|
||||
error("Xcode path is not set. Please use xcode-select to choose Xcode installation path.")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user