summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2012-10-26 15:04:02 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-16 05:08:07 +0100
commitcd9c98e8813600a6633c9d8b4deb00ae9560bfc5 (patch)
tree98d1e903a6e5ada48141ac91f9dd8258fead606f /configure
parent603e1882736f77102cebec67729aca8464de958c (diff)
Teach configure to execute $$system() when parsing qmake.conf
This allows for example the iOS mkspecs to use xcode-select to get the path to Xcode's /Developer directory, which is then in turn used to set up QMAKE_CXX (which is needed by configure). Coprocess is GNU awk specific, so we're just using getline. http://www.gnu.org/software/gawk/manual/html_node/Getline_002fPipe.html#Getline_002fPipe Change-Id: I7e88112bea68f039361d6e96ee581eedf129ab02 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure18
1 files changed, 15 insertions, 3 deletions
diff --git a/configure b/configure
index 8661a84452..9cc868492c 100755
--- a/configure
+++ b/configure
@@ -183,13 +183,25 @@ BEGIN {
}
ovalue = ovalue values[var]
}
- ovalue = ovalue value
+ value = ovalue value
+
+ ovalue = ""
+ while (match(value, /\$\$system\((.*?)\)/)) {
+ ovalue = ovalue substr(value, 1, RSTART - 1)
+ cmd = substr(value, RSTART + 9, RLENGTH - 10)
+ value = substr(value, RSTART + RLENGTH)
+ while ((cmd | getline line) > 0) {
+ ovalue = ovalue line
+ }
+ close(cmd)
+ }
+ value = ovalue value
combinedValue = values[variable]
if (append == 1 && length(combinedValue) > 0) {
- combinedValue = combinedValue " " ovalue
+ combinedValue = combinedValue " " value
} else {
- combinedValue = ovalue
+ combinedValue = value
}
values[variable] = combinedValue
}