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>
This commit is contained in:
parent
2afe4a1a07
commit
5ed471a80a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user