浏览代码

ENH: Added output of a custom command's m_Source as a dependency.

Brad King 25 年之前
父节点
当前提交
fe25e5873b
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Source/cmUnixMakefileGenerator.cxx

+ 2 - 2
Source/cmUnixMakefileGenerator.cxx

@@ -370,7 +370,7 @@ void cmUnixMakefileGenerator::OutputDepends(std::ostream& fout)
 
 
 
 
 // Output each custom rule in the following format:
 // Output each custom rule in the following format:
-// m_Result: m_Depends[0] m_Depends[1] ...
+// m_Result: m_Source m_Depends[0] m_Depends[1] ...
 //   (tab)   m_Command
 //   (tab)   m_Command
 void cmUnixMakefileGenerator::OutputCustomRules(std::ostream& fout)
 void cmUnixMakefileGenerator::OutputCustomRules(std::ostream& fout)
 {
 {
@@ -378,7 +378,7 @@ void cmUnixMakefileGenerator::OutputCustomRules(std::ostream& fout)
         m_Makefile->GetCustomCommands().begin();
         m_Makefile->GetCustomCommands().begin();
       c != m_Makefile->GetCustomCommands().end(); ++c)
       c != m_Makefile->GetCustomCommands().end(); ++c)
     {
     {
-    fout << c->m_Result.c_str() << ":";
+    fout << c->m_Result.c_str() << ": " << c->m_Source.c_str();
     for(std::vector<std::string>::const_iterator d = c->m_Depends.begin();
     for(std::vector<std::string>::const_iterator d = c->m_Depends.begin();
         d != c->m_Depends.end(); ++ d)
         d != c->m_Depends.end(); ++ d)
       {
       {