summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@nokia.com>2012-08-22 16:51:30 +0200
committerQt by Nokia <qt-info@nokia.com>2012-08-22 18:40:17 +0200
commitd45ef221581e61dff737a3d8d00697584c5df0b2 (patch)
tree43a7cef8ed082e1dace25612d1fe80381daf779b /qmake
parent1839151992b7491508fc7ca726242b64562bf1a0 (diff)
qmake: fix embedding of generated manifests in debug mode
The existence of the manifest backup is used as a marker to decide whether to embed the manifest in a second link step or not. If it's present, the embedding took place in the first link step. If it's not present, we must link again incrementally. That logic was implemented faulty. Change-Id: I10154dbbbe70c7981795ac66d46a166907ba13ec Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/win32/msvc_nmake.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp
index 6efd5e2144..de3bd60125 100644
--- a/qmake/generators/win32/msvc_nmake.cpp
+++ b/qmake/generators/win32/msvc_nmake.cpp
@@ -404,12 +404,11 @@ void NmakeMakefileGenerator::writeBuildRulesPart(QTextStream &t)
const QString extraInlineFileContent = "\n!IF EXIST(" + manifest_res + ")\n" + manifest_res + "\n!ENDIF";
t << "\n\t";
writeLinkCommand(t, extraLFlags, extraInlineFileContent);
- const QString check_manifest_bak_existence = "\n\tif exist " + manifest_bak + ' ';
- t << check_manifest_bak_existence << "fc " << manifest << ' ' << manifest_bak << " && del " << manifest_bak;
- t << check_manifest_bak_existence << "rc.exe /fo" << manifest_res << ' ' << manifest_rc;
- t << check_manifest_bak_existence;
+ t << "\n\tif exist " << manifest_bak << " fc /b " << manifest << ' ' << manifest_bak << " >NUL || del " << manifest_bak;
+ t << "\n\tif not exist " << manifest_bak << " rc.exe /fo" << manifest_res << ' ' << manifest_rc;
+ t << "\n\tif not exist " << manifest_bak << ' ';
writeLinkCommand(t, extraLFlags, manifest_res);
- t << check_manifest_bak_existence << "del " << manifest_bak;
+ t << "\n\tif exist " << manifest_bak << " del " << manifest_bak;
} else {
t << "\n\t" << "rc.exe /fo" << manifest_res << " " << manifest_rc;
t << "\n\t";