summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2013-03-02 18:28:57 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-04 14:54:57 +0100
commit4c1e7305e5a8687bbb029b3e5a3a0ec206909567 (patch)
treea36def674a1c17e0622fc30e574ea4401f86e5e8 /configure
parente3f36e7290aef480df1aaae90611691bfb2f1f95 (diff)
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>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure3
1 files changed, 2 insertions, 1 deletions
diff --git a/configure b/configure
index c9a26b30bc..213c15cbfb 100755
--- a/configure
+++ b/configure
@@ -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