summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorTomasz Olszak <olszak.tomasz@gmail.com>2015-02-26 15:41:34 +0100
committerTomasz Olszak <olszak.tomasz@gmail.com>2015-02-26 15:41:34 +0100
commitb756e6e57882751e130950ef838149ebfcd11e2d (patch)
treeb36d382b16c7c0ecbf186029d804e15166a96205 /configure
parent0a4f971d4fc83495f1b7fc839e4e7324cc984f75 (diff)
configure: added env variable handling to extractQMakeVariables
Thise makes it possible to extract qmake variables that reference environment variables, e.g.: SOME_QMAKE_VARIABLE = $$(SOME_ENV_VARIABLE) Change-Id: I5b80a9959bc9041413c7549913c4f939a8fda807 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure7
1 files changed, 6 insertions, 1 deletions
diff --git a/configure b/configure
index 5ad29bb784..e877e08978 100755
--- a/configure
+++ b/configure
@@ -213,10 +213,15 @@ BEGIN {
gsub("[ \t]+$", "", value)
ovalue = ""
- while (match(value, /\$\$(\{[_A-Z0-9.]+\}|[_A-Z0-9.]+)/)) {
+ while (match(value, /\$\$(\([_A-Z0-9.]+\)|\{[_A-Z0-9.]+\}|[_A-Z0-9.]+)/)) {
ovalue = ovalue substr(value, 1, RSTART - 1)
var = substr(value, RSTART + 2, RLENGTH - 2)
value = substr(value, RSTART + RLENGTH)
+ if (var ~ /^\(/) {
+ var = substr(var, 2, length(var) - 2)
+ ovalue = ovalue ENVIRON[var]
+ continue
+ }
if (var ~ /^\{/) {
var = substr(var, 2, length(var) - 2)
}