[cmake-commits] king committed cmGlobalUnixMakefileGenerator3.cxx 1.97 1.98 cmLocalUnixMakefileGenerator3.cxx 1.181 1.182

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Oct 10 13:47:54 EDT 2006


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv16100

Modified Files:
	cmGlobalUnixMakefileGenerator3.cxx 
	cmLocalUnixMakefileGenerator3.cxx 
Log Message:
BUG: Avoid duplicate conversion to output path.


Index: cmGlobalUnixMakefileGenerator3.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalUnixMakefileGenerator3.cxx,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -d -r1.97 -r1.98
--- cmGlobalUnixMakefileGenerator3.cxx	8 Sep 2006 14:42:13 -0000	1.97
+++ cmGlobalUnixMakefileGenerator3.cxx	10 Oct 2006 17:47:50 -0000	1.98
@@ -464,9 +464,6 @@
   std::string makeTarget = lg->GetMakefile()->GetStartOutputDirectory();
   makeTarget += "/";
   makeTarget += pass;
-  makeTarget = lg->Convert(makeTarget.c_str(),
-                           cmLocalGenerator::HOME_OUTPUT,
-                           cmLocalGenerator::MAKEFILE);
 
   // The directory-level rule should depend on the target-level rules
   // for all targets in the directory.
@@ -502,9 +499,6 @@
     std::string subdir = slg->GetMakefile()->GetStartOutputDirectory();
     subdir += "/";
     subdir += pass;
-    subdir = slg->Convert(subdir.c_str(),
-                          cmLocalGenerator::HOME_OUTPUT,
-                          cmLocalGenerator::MAKEFILE);
     depends.push_back(subdir);
     }
 

Index: cmLocalUnixMakefileGenerator3.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalUnixMakefileGenerator3.cxx,v
retrieving revision 1.181
retrieving revision 1.182
diff -u -d -r1.181 -r1.182
--- cmLocalUnixMakefileGenerator3.cxx	5 Oct 2006 18:51:20 -0000	1.181
+++ cmLocalUnixMakefileGenerator3.cxx	10 Oct 2006 17:47:50 -0000	1.182
@@ -1465,10 +1465,11 @@
   std::vector<std::string> commands;
 
   // Write the all rule.
-  std::string dir = this->Makefile->GetStartOutputDirectory();
-  dir += "/all";
+  std::string dir;
+  std::string recursiveTarget = this->Makefile->GetStartOutputDirectory();
+  recursiveTarget += "/all";
 
-  dir = this->Convert(dir.c_str(),HOME_OUTPUT,MAKEFILE);
+  dir = this->Convert(recursiveTarget.c_str(),HOME_OUTPUT,MAKEFILE);
 
   depends.push_back("cmake_check_build_system");
 
@@ -1487,7 +1488,7 @@
   std::string mf2Dir = cmake::GetCMakeFilesDirectoryPostSlash();
   mf2Dir += "Makefile2";
   commands.push_back(this->GetRecursiveMakeCall(mf2Dir.c_str(),
-                                                dir.c_str()));  
+                                                recursiveTarget.c_str()));
   this->CreateCDCommand(commands,
                         this->Makefile->GetHomeOutputDirectory(),
                         this->Makefile->GetStartOutputDirectory());
@@ -1504,13 +1505,13 @@
                       depends, commands, true);
 
   // Write the clean rule.
-  dir = this->Makefile->GetStartOutputDirectory();
-  dir += "/clean";
-  dir = this->Convert(dir.c_str(),HOME_OUTPUT,MAKEFILE);
+  recursiveTarget = this->Makefile->GetStartOutputDirectory();
+  recursiveTarget += "/clean";
+  dir = this->Convert(recursiveTarget.c_str(),HOME_OUTPUT,MAKEFILE);
   commands.clear();
   depends.clear();
   commands.push_back(this->GetRecursiveMakeCall(mf2Dir.c_str(),
-                                                dir.c_str()));  
+                                                recursiveTarget.c_str()));
   this->CreateCDCommand(commands,
                                 this->Makefile->GetHomeOutputDirectory(),
                                 this->Makefile->GetStartOutputDirectory());
@@ -1523,9 +1524,9 @@
                       depends, commands, true);
 
   // Write the preinstall rule.
-  dir = this->Makefile->GetStartOutputDirectory();
-  dir += "/preinstall";
-  dir = this->Convert(dir.c_str(), HOME_OUTPUT,MAKEFILE);
+  recursiveTarget = this->Makefile->GetStartOutputDirectory();
+  recursiveTarget += "/preinstall";
+  dir = this->Convert(recursiveTarget.c_str(), HOME_OUTPUT,MAKEFILE);
   commands.clear();
   depends.clear();
   const char* noall =
@@ -1541,7 +1542,7 @@
     depends.push_back("cmake_check_build_system");
     }
   commands.push_back
-    (this->GetRecursiveMakeCall(mf2Dir.c_str(), dir.c_str()));
+    (this->GetRecursiveMakeCall(mf2Dir.c_str(), recursiveTarget.c_str()));
   this->CreateCDCommand(commands,
                         this->Makefile->GetHomeOutputDirectory(),
                         this->Makefile->GetStartOutputDirectory());



More information about the Cmake-commits mailing list