From 9d4d05ec536289d8d62cfed60e02f38febfc3052 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 25 Jul 2018 18:21:05 +0200 Subject: qmake: don't escape colons in dependency paths on windows, after all MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit amends 7c34e0a7b4. Change-Id: I2ecdf0a450337e667f55af09b3de79fb47e05428 Reviewed-by: MÃ¥rten Nordheim Reviewed-by: Joerg Bornemann Reviewed-by: Oswald Buddenhagen --- qmake/generators/makefile.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'qmake') 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()); } -- cgit v1.2.3