summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@qt.io>2018-07-25 18:21:05 +0200
committerOswald Buddenhagen <oswald.buddenhagen@qt.io>2018-08-02 15:15:30 +0000
commit9d4d05ec536289d8d62cfed60e02f38febfc3052 (patch)
tree017713574114eee624b1e26eafd0ef74328fca36 /qmake
parentc07a73837426bc1463fb64b9ee064583bffa6358 (diff)
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>
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/makefile.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index 580df85c1e..73e09a1025 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -2829,7 +2829,16 @@ MakefileGenerator::escapeDependencyPath(const QString &path) const
QString ret = path;
if (!ret.isEmpty()) {
// 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 :#])"));
+#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"));
debug_msg(2, "escapeDependencyPath: %s -> %s", path.toLatin1().constData(), ret.toLatin1().constData());
}