[cmake-commits] king committed cmLocalUnixMakefileGenerator3.cxx 1.194 1.195 cmLocalUnixMakefileGenerator3.h 1.66 1.67 cmGlobalUnixMakefileGenerator3.cxx 1.99 1.100

cmake-commits at cmake.org cmake-commits at cmake.org
Thu Mar 8 11:10:24 EST 2007


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

Modified Files:
	cmLocalUnixMakefileGenerator3.cxx 
	cmLocalUnixMakefileGenerator3.h 
	cmGlobalUnixMakefileGenerator3.cxx 
Log Message:
ENH: Removed useless method ConvertToMakeTarget and all calls to it.  It had a buggy implementation that caused it to do nothing.


Index: cmLocalUnixMakefileGenerator3.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalUnixMakefileGenerator3.h,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -d -r1.66 -r1.67
--- cmLocalUnixMakefileGenerator3.h	16 Feb 2007 21:12:16 -0000	1.66
+++ cmLocalUnixMakefileGenerator3.h	8 Mar 2007 16:10:21 -0000	1.67
@@ -186,9 +186,6 @@
 
   std::string CreateMakeVariable(const char* sin, const char* s2in);
 
-  // cleanup the name of a potential target
-  std::string ConvertToMakeTarget(const char* tgt);
-
   /** Called from command-line hook to scan dependencies.  */
   virtual bool ScanDependencies(const char* tgtInfo);
 

Index: cmGlobalUnixMakefileGenerator3.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalUnixMakefileGenerator3.cxx,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -d -r1.99 -r1.100
--- cmGlobalUnixMakefileGenerator3.cxx	8 Mar 2007 13:38:40 -0000	1.99
+++ cmGlobalUnixMakefileGenerator3.cxx	8 Mar 2007 16:10:21 -0000	1.100
@@ -605,7 +605,6 @@
       }
     tname = lg->Convert(tname.c_str(),cmLocalGenerator::HOME_OUTPUT,
                         cmLocalGenerator::MAKEFILE);
-    tname = lg->ConvertToMakeTarget(tname.c_str());
     makeCommand += tname.c_str();
     makeCommand += "\"";
     if (!this->LocalGenerators.size())

Index: cmLocalUnixMakefileGenerator3.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalUnixMakefileGenerator3.cxx,v
retrieving revision 1.194
retrieving revision 1.195
diff -u -d -r1.194 -r1.195
--- cmLocalUnixMakefileGenerator3.cxx	8 Mar 2007 15:19:25 -0000	1.194
+++ cmLocalUnixMakefileGenerator3.cxx	8 Mar 2007 16:10:21 -0000	1.195
@@ -564,7 +564,6 @@
   // Construct the left hand side of the rule.
   replace = target;
   std::string tgt = this->Convert(replace.c_str(),HOME_OUTPUT,MAKEFILE);
-  tgt = this->ConvertToMakeTarget(tgt.c_str());
   const char* space = "";
   if(tgt.size() == 1)
     {
@@ -598,7 +597,6 @@
       {
       replace = *dep;
       replace = this->Convert(replace.c_str(),HOME_OUTPUT,MAKEFILE);
-      replace = this->ConvertToMakeTarget(replace.c_str());
       os << tgt.c_str() << space << ": " << replace.c_str() << "\n";
       }
     }
@@ -1090,28 +1088,6 @@
 }
 
 //----------------------------------------------------------------------------
-//take a tgt path and convert it into a make target, it could be full, or
-//relative
-std::string cmLocalUnixMakefileGenerator3
-::ConvertToMakeTarget(const char* tgt)
-{
-  // Make targets should not have a leading './' for a file in the
-  // directory containing the makefile.
-  std::string ret = tgt;
-  if(ret.size() > 2 && (ret[0] == '.') &&
-     ( (ret[1] == '/') || ret[1] == '\\'))
-    {
-    std::string upath = ret;
-    cmSystemTools::ConvertToUnixSlashes(upath);
-    if(upath.find(2, '/') == upath.npos)
-      {
-      ret = ret.substr(2, ret.size()-2);
-      }
-    }
-  return ret;
-}
-
-//----------------------------------------------------------------------------
 std::string
 cmLocalUnixMakefileGenerator3
 ::CreateMakeVariable(const char* sin, const char* s2in)
@@ -1770,7 +1746,6 @@
   if (tgt && tgt[0] != '\0')
     {
     std::string tgt2 = this->Convert(tgt,HOME_OUTPUT,MAKEFILE);
-    tgt2 = this->ConvertToMakeTarget(tgt2.c_str());
     // for make -f foo bar, foo is a file but bar (tgt2) is 
     // a make target.  make targets should be escaped with "" 
     // and not \, so if we find a "\ " in the path then remove



More information about the Cmake-commits mailing list