From a5501b11f63c9fbde9a849a362ed6583b75abd75 Mon Sep 17 00:00:00 2001
From: Ken Martin <ken.martin@kitware.com>
Date: Mon, 28 Feb 2005 16:11:21 -0500
Subject: FIXTHIS THING: fix the bug

---
 Source/cmLocalVisualStudio6Generator.cxx | 20 +++++++-------------
 1 file changed, 7 insertions(+), 13 deletions(-)

diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx
index 6c27d95..1425aba 100644
--- a/Source/cmLocalVisualStudio6Generator.cxx
+++ b/Source/cmLocalVisualStudio6Generator.cxx
@@ -624,10 +624,6 @@ cmLocalVisualStudio6Generator::CreateTargetRules(const cmTarget &target,
       customRuleCode += "PreLink_Cmds=";
       init = true;
       }
-    else
-      {
-      customRuleCode += "\\\n\t";
-      }
     customRuleCode += this->ConstructScript(cr->GetCommandLines(), "\\\n\t");
     }
 
@@ -641,13 +637,15 @@ cmLocalVisualStudio6Generator::CreateTargetRules(const cmTarget &target,
       customRuleCode += "PreLink_Cmds=";
       init = true;
       }
-    else
-      {
-      customRuleCode += "\\\n\t";
-      }
     customRuleCode += this->ConstructScript(cr->GetCommandLines(), "\\\n\t");
     }
-
+  // remove trailing \\\n\t and replace with \n as this
+  // is a new command and not a continuation 
+  if(init)
+    {
+    customRuleCode.erase(customRuleCode.size()-3, 3);
+    customRuleCode += "\n";
+    }
   // do the post build rules
   init = false;
   for (std::vector<cmCustomCommand>::const_iterator cr = 
@@ -660,10 +658,6 @@ cmLocalVisualStudio6Generator::CreateTargetRules(const cmTarget &target,
       customRuleCode += "PostBuild_Cmds=";
       init = true;
       }
-    else
-      {
-      customRuleCode += "\\\n\t";
-      }
     customRuleCode += this->ConstructScript(cr->GetCommandLines(), "\\\n\t");
     }
 
-- 
cgit v0.12