ENH: add depends for utility targets

This commit is contained in:
Bill Hoffman 2002-04-23 11:33:28 -04:00
parent 6083e3c127
commit 361f17802f
1 changed files with 13 additions and 1 deletions

View File

@ -799,10 +799,22 @@ void cmUnixMakefileGenerator::OutputUtilityRule(std::ostream& fout,
} }
std::string comment = "Rule to build Utility "; std::string comment = "Rule to build Utility ";
comment += name; comment += name;
std::string depends;
const std::vector<cmCustomCommand> &ccs = t.GetCustomCommands();
for(std::vector<cmCustomCommand>::const_iterator i = ccs.begin();
i != ccs.end(); ++i)
{
const std::vector<std::string> & dep = i->GetDepends();
for(std::vector<std::string>::const_iterator d = dep.begin();
d != dep.end(); ++d)
{
depends += *d + "\\\n";
}
}
this->OutputMakeRule(fout, this->OutputMakeRule(fout,
comment.c_str(), comment.c_str(),
name, name,
0, depends.c_str(),
cc); cc);
} }