Commit bc7ef693 authored by Tobias Hunger (external)'s avatar Tobias Hunger (external) Committed by Tobias Hunger
Browse files

AutoTools: Handle "-I /some/path" as well as "-I/some/path"



Do the same for -D and -U.

Change-Id: I66ea3c03a58e59602e70f6eb39c471cdf063b456
Reviewed-by: default avatarDaniel Teske <daniel.teske@theqtcompany.com>
parent 0e7e521a
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment