diff options
author | Tomasz Olszak <olszak.tomasz@gmail.com> | 2015-02-26 15:41:34 +0100 |
---|---|---|
committer | Tomasz Olszak <olszak.tomasz@gmail.com> | 2015-02-26 15:41:34 +0100 |
commit | b756e6e57882751e130950ef838149ebfcd11e2d (patch) | |
tree | b36d382b16c7c0ecbf186029d804e15166a96205 /configure | |
parent | 0a4f971d4fc83495f1b7fc839e4e7324cc984f75 (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-x | configure | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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) } |