فهرست منبع

BUG: Fixed implementation of long dependency list support. The proxy target must have a corresponding file to work correctly. Instead of using a proxy target, we now just list one line for each dependency and then print one copy of the build rule at the end.

Brad King 22 سال پیش
والد
کامیت
df2280a7ab
1فایلهای تغییر یافته به همراه7 افزوده شده و 18 حذف شده
  1. 7 18
      Source/cmLocalUnixMakefileGenerator.cxx

+ 7 - 18
Source/cmLocalUnixMakefileGenerator.cxx

@@ -2802,35 +2802,24 @@ void cmLocalUnixMakefileGenerator::OutputMakeRule(std::ostream& fout,
   replace = target;
   m_Makefile->ExpandVariablesInString(replace);
   
-  if(depends.size() > 1)
+  std::string tgt = cmSystemTools::ConvertToOutputPath(replace.c_str());
+  if(depends.empty())
     {
-    // Create a proxy target collecting all the dependencies.  This
-    // allows for very long dependency lists.
-    std::string tgt = cmSystemTools::ConvertToOutputPath(replace.c_str());
-    for(std::vector<std::string>::const_iterator dep = depends.begin();
-        dep != depends.end(); ++dep)
-      {
-      replace = *dep;
-      m_Makefile->ExpandVariablesInString(replace);
-      fout << tgt.c_str() << ".dependency_list:: " << replace.c_str() << "\n";
-      }
-
-    // Forward dependencies through the proxy target.
-    fout << tgt.c_str() << ": " << tgt.c_str() << ".dependency_list\n";
+    fout << tgt.c_str() << ":\n";
     }
   else
     {
-    fout << cmSystemTools::ConvertToOutputPath(replace.c_str()) << ":";
-  
+    // Split dependencies into multiple rule lines.  This allows for
+    // very long dependency lists.
     for(std::vector<std::string>::const_iterator dep = depends.begin();
         dep != depends.end(); ++dep)
       {
       replace = *dep;
       m_Makefile->ExpandVariablesInString(replace);
-      fout << " " << replace.c_str();
+      fout << tgt.c_str() << ": " << replace.c_str() << "\n";
       }
-    fout << "\n";
     }
+  
   int count = 0;
   for (std::vector<std::string>::const_iterator i = commands.begin();
        i != commands.end(); ++i)