qmake: don't escape colons in dependency paths on windows, after all
amends 7c34e0a7b4. Change-Id: I2ecdf0a450337e667f55af09b3de79fb47e05428 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This commit is contained in:
parent
c07a738374
commit
9d4d05ec53
@ -2829,7 +2829,16 @@ MakefileGenerator::escapeDependencyPath(const QString &path) const
|
|||||||
QString ret = path;
|
QString ret = path;
|
||||||
if (!ret.isEmpty()) {
|
if (!ret.isEmpty()) {
|
||||||
// Unix make semantics, to be inherited by unix and mingw generators.
|
// Unix make semantics, to be inherited by unix and mingw generators.
|
||||||
|
#ifdef Q_OS_UNIX
|
||||||
|
// When running on Unix, we need to escape colons (which may appear
|
||||||
|
// anywhere in a path, and would be mis-parsed as dependency separators).
|
||||||
static const QRegExp criticalChars(QStringLiteral("([\t :#])"));
|
static const QRegExp criticalChars(QStringLiteral("([\t :#])"));
|
||||||
|
#else
|
||||||
|
// MinGW make has a hack for colons which denote drive letters, and no
|
||||||
|
// other colons may appear in paths. And escaping colons actually breaks
|
||||||
|
// the make from the Android SDK.
|
||||||
|
static const QRegExp criticalChars(QStringLiteral("([\t #])"));
|
||||||
|
#endif
|
||||||
ret.replace(criticalChars, QStringLiteral("\\\\1"));
|
ret.replace(criticalChars, QStringLiteral("\\\\1"));
|
||||||
debug_msg(2, "escapeDependencyPath: %s -> %s", path.toLatin1().constData(), ret.toLatin1().constData());
|
debug_msg(2, "escapeDependencyPath: %s -> %s", path.toLatin1().constData(), ret.toLatin1().constData());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user