From 5ed471a80a5a88b26db31adf7bc673b5026cc907 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Mon, 5 Nov 2018 15:13:22 +0100 Subject: [PATCH] qmake: Escape '=' in dependency paths for unix make '=' cannot be handled in the same manner as other "critical" characters as no amount of backslashes will escape it. Use a variable instead. The documentation for nmake suggests that '=' in file names is not among the "Special Characters in a Makefile". Therefore, we assume nmake can handle it and don't escape it. Fixes: QTBUG-67262 Change-Id: Ib60f808d7d4e981c98f7d8bf2075d55b2b7f3b7d Reviewed-by: Oswald Buddenhagen Reviewed-by: Michael Brasser --- qmake/generators/makefile.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index b7e591d2ab..7247d1f8df 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -2325,6 +2325,7 @@ MakefileGenerator::writeHeader(QTextStream &t) if (ofile.lastIndexOf(Option::dir_sep) != -1) ofile.remove(0, ofile.lastIndexOf(Option::dir_sep) +1); t << "MAKEFILE = " << escapeFilePath(ofile) << endl << endl; + t << "EQ = =\n\n"; } QList @@ -2869,6 +2870,7 @@ MakefileGenerator::escapeDependencyPath(const QString &path) const static const QRegExp criticalChars(QStringLiteral("([\t #])")); #endif ret.replace(criticalChars, QStringLiteral("\\\\1")); + ret.replace(QLatin1Char('='), QStringLiteral("$(EQ)")); debug_msg(2, "escapeDependencyPath: %s -> %s", path.toLatin1().constData(), ret.toLatin1().constData()); } return ret;