fix MSVC build for non-standard command line interpreters

In our incremental linking command block we relied on del never
returning a non-zero exit code. Other command line interpreters
than cmd.exe, e.g. TCC, behave differently.
We now check for existence before trying to delete the manifest
file.

Task-number: QTBUG-29698

Change-Id: I94d125998da6f2c0377104f7e83cdd9e8b838329
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This commit is contained in:
Joerg Bornemann 2013-02-14 15:32:19 +01:00 committed by The Qt Project
parent dbbb4d1654
commit 37e4e33c50

View File

@ -414,7 +414,8 @@ void NmakeMakefileGenerator::writeBuildRulesPart(QTextStream &t)
<< cQuoted(unescapeFilePath(manifest)) << ">" << manifest_rc;
if (generateManifest) {
t << "\n\tif not exist $(DESTDIR_TARGET) del " << manifest << ">NUL 2>&1";
t << "\n\tif not exist $(DESTDIR_TARGET) if exist " << manifest
<< " del " << manifest;
t << "\n\tif exist " << manifest << " copy /Y " << manifest << ' ' << manifest_bak;
const QString extraInlineFileContent = "\n!IF EXIST(" + manifest_res + ")\n" + manifest_res + "\n!ENDIF";
t << "\n\t";