From d45ef221581e61dff737a3d8d00697584c5df0b2 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Wed, 22 Aug 2012 16:51:30 +0200 Subject: 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 --- qmake/generators/win32/msvc_nmake.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'qmake') 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"; -- cgit v1.2.3