Skip to content

Commit

Permalink
qmake: don't escape colons in dependency paths on windows, after all
Browse files Browse the repository at this point in the history
amends 7c34e0a.

Change-Id: I2ecdf0a450337e667f55af09b3de79fb47e05428
Reviewed-by: Mårten Nordheim <[email protected]>
Reviewed-by: Joerg Bornemann <[email protected]>
Reviewed-by: Oswald Buddenhagen <[email protected]>
  • Loading branch information
ossilator committed Aug 2, 2018
1 parent c07a738 commit 9d4d05e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions qmake/generators/makefile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down

0 comments on commit 9d4d05e

Please sign in to comment.