Jelajahi Sumber

BUG: Fixed dependency generation to work for when there are many, many dependencies. Output is now easier to ready anyway because each dependency is on its own line.

Brad King 24 tahun lalu
induk
melakukan
1f2c84f284
1 mengubah file dengan 3 tambahan dan 10 penghapusan
  1. 3 10
      Source/cmDSPWriter.cxx

+ 3 - 10
Source/cmDSPWriter.cxx

@@ -317,13 +317,12 @@ void cmDSPWriter::WriteCustomRule(std::ostream& fout,
       fout << "!ELSEIF  \"$(CFG)\" == " << i->c_str() << std::endl;
       fout << "!ELSEIF  \"$(CFG)\" == " << i->c_str() << std::endl;
       }
       }
     
     
-    // Write out the dependencies (this seems to be the only way to
-    //  get VC6 to actually take these dependencies into account.
-    fout << "USERDEP__HACK= ";
+    // Write out the dependencies for the rule.
+    fout << "USERDEP__HACK=";
     for(std::set<std::string>::const_iterator d = depends.begin();
     for(std::set<std::string>::const_iterator d = depends.begin();
 	d != depends.end(); ++d)
 	d != depends.end(); ++d)
       {
       {
-	fout << " \"" << d->c_str() << "\"";
+	fout << "\\\n\t\"" << d->c_str() << "\"";
       }
       }
     fout << "\n";
     fout << "\n";
 
 
@@ -340,12 +339,6 @@ void cmDSPWriter::WriteCustomRule(std::ostream& fout,
       {
       {
       fout << "\"" << output->c_str()
       fout << "\"" << output->c_str()
            << "\" :  \"$(SOURCE)\" \"$(INTDIR)\" \"$(OUTDIR)\"";
            << "\" :  \"$(SOURCE)\" \"$(INTDIR)\" \"$(OUTDIR)\"";
-      // Write out all the dependencies for this rule.
-      for(std::set<std::string>::const_iterator d = depends.begin();
-          d != depends.end(); ++d)
-        {
-        fout << " \"" << d->c_str() << "\"";
-        }
       fout << command << "\n\n";
       fout << command << "\n\n";
       }
       }