summaryrefslogtreecommitdiff
path: root/src/plugins/autotoolsprojectmanager/makefileparser.cpp
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@gmail.com>2015-07-09 01:32:29 +0200
committerTobias Hunger <tobias.hunger@theqtcompany.com>2015-07-09 10:48:07 +0000
commitbc7ef69363ecccb50b42e6285c332bb21d85a024 (patch)
treef3d812dbf7b7267da1a700be1255ad145d663732 /src/plugins/autotoolsprojectmanager/makefileparser.cpp
parent0e7e521a0aa4054946725f27dba13c1eab50c63e (diff)
downloadqt-creator-bc7ef69363ecccb50b42e6285c332bb21d85a024.tar.gz
AutoTools: Handle "-I /some/path" as well as "-I/some/path"
Do the same for -D and -U. Change-Id: I66ea3c03a58e59602e70f6eb39c471cdf063b456 Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Diffstat (limited to 'src/plugins/autotoolsprojectmanager/makefileparser.cpp')
-rw-r--r--src/plugins/autotoolsprojectmanager/makefileparser.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/plugins/autotoolsprojectmanager/makefileparser.cpp b/src/plugins/autotoolsprojectmanager/makefileparser.cpp
index 3c1e94d133..53a79134a6 100644
--- a/src/plugins/autotoolsprojectmanager/makefileparser.cpp
+++ b/src/plugins/autotoolsprojectmanager/makefileparser.cpp
@@ -445,7 +445,20 @@ QStringList MakefileParser::parseTermsAfterAssign(const QString &line)
int assignPos = line.indexOf(QLatin1Char('=')) + 1;
if (assignPos >= line.size())
return QStringList();
- return line.mid(assignPos).split(QLatin1Char(' '), QString::SkipEmptyParts);
+
+ const QStringList parts = line.mid(assignPos).split(QLatin1Char(' '), QString::SkipEmptyParts);
+ QStringList result;
+ for (int i = 0; i < parts.count(); ++i) {
+ const QString cur = parts.at(i);
+ const QString next = (i == parts.count() - 1) ? QString() : parts.at(i + 1);
+ if (cur == QLatin1String("-D") || cur == QLatin1String("-U") || cur == QLatin1String("-I")) {
+ result << cur + next;
+ ++i;
+ } else {
+ result << cur;
+ }
+ }
+ return result;
}
bool MakefileParser::maybeParseDefine(const QString &term)