diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2018-11-05 15:13:22 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2018-11-30 14:47:42 +0000 |
commit | 5ed471a80a5a88b26db31adf7bc673b5026cc907 (patch) | |
tree | 98bf1b749367ca38c3b01b50e939037545f41e8b | |
parent | 2afe4a1a074096a3a6476aae21e732c418717da7 (diff) |
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 <oswald.buddenhagen@qt.io>
Reviewed-by: Michael Brasser <michael.brasser@live.com>
-rw-r--r-- | qmake/generators/makefile.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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<MakefileGenerator::SubTarget*> @@ -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; |