summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalVisualStudio6Generator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-10-25 16:49:27 (GMT)
committerBrad King <brad.king@kitware.com>2006-10-25 16:49:27 (GMT)
commit89f098bc59a41fa1a3387c493f97705242315311 (patch)
treec784d48c82dc0a535fba5d6ac56ecb7719cb80a8 /Source/cmLocalVisualStudio6Generator.cxx
parente23b82c2cfee4437bc191f867348076f61f81dc3 (diff)
downloadCMake-89f098bc59a41fa1a3387c493f97705242315311.zip
CMake-89f098bc59a41fa1a3387c493f97705242315311.tar.gz
CMake-89f098bc59a41fa1a3387c493f97705242315311.tar.bz2
BUG: Adjust prebuild/prelink/postbuild script construction to account for ConstructScript no longer producing trailing newlines. This addresses bug#3977.
Diffstat (limited to 'Source/cmLocalVisualStudio6Generator.cxx')
-rw-r--r--Source/cmLocalVisualStudio6Generator.cxx19
1 files changed, 9 insertions, 10 deletions
diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx
index a24b14b..0c6abd2 100644
--- a/Source/cmLocalVisualStudio6Generator.cxx
+++ b/Source/cmLocalVisualStudio6Generator.cxx
@@ -766,34 +766,33 @@ cmLocalVisualStudio6Generator::CreateTargetRules(cmTarget &target,
// header stuff
customRuleCode += "PreLink_Cmds=";
}
- const char* prelink_newline = "\\\n\t";
for (std::vector<cmCustomCommand>::const_iterator cr =
target.GetPreBuildCommands().begin();
cr != target.GetPreBuildCommands().end(); ++cr)
{
- if(++prelink_count == prelink_total)
+ if(prelink_count++ > 0)
{
- prelink_newline = "";
+ customRuleCode += "\\\n\t";
}
customRuleCode += this->ConstructScript(cr->GetCommandLines(),
cr->GetWorkingDirectory(),
cr->GetEscapeOldStyle(),
cr->GetEscapeAllowMakeVars(),
- prelink_newline);
+ "\\\n\t");
}
for (std::vector<cmCustomCommand>::const_iterator cr =
target.GetPreLinkCommands().begin();
cr != target.GetPreLinkCommands().end(); ++cr)
{
- if(++prelink_count == prelink_total)
+ if(prelink_count++ > 0)
{
- prelink_newline = "";
+ customRuleCode += "\\\n\t";
}
customRuleCode += this->ConstructScript(cr->GetCommandLines(),
cr->GetWorkingDirectory(),
cr->GetEscapeOldStyle(),
cr->GetEscapeAllowMakeVars(),
- prelink_newline);
+ "\\\n\t");
}
if(prelink_total > 0)
{
@@ -814,15 +813,15 @@ cmLocalVisualStudio6Generator::CreateTargetRules(cmTarget &target,
target.GetPostBuildCommands().begin();
cr != target.GetPostBuildCommands().end(); ++cr)
{
- if(++postbuild_count == postbuild_total)
+ if(postbuild_count++ > 0)
{
- postbuild_newline = "";
+ customRuleCode += "\\\n\t";
}
customRuleCode += this->ConstructScript(cr->GetCommandLines(),
cr->GetWorkingDirectory(),
cr->GetEscapeOldStyle(),
cr->GetEscapeAllowMakeVars(),
- postbuild_newline);
+ "\\\n\t");
}
if(postbuild_total > 0)
{