From 361f17802f179c6313004475f43c32b617dd0277 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Tue, 23 Apr 2002 11:33:28 -0400 Subject: [PATCH] ENH: add depends for utility targets --- Source/cmUnixMakefileGenerator.cxx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Source/cmUnixMakefileGenerator.cxx b/Source/cmUnixMakefileGenerator.cxx index 8e9a64550..133d4c5c9 100644 --- a/Source/cmUnixMakefileGenerator.cxx +++ b/Source/cmUnixMakefileGenerator.cxx @@ -799,10 +799,22 @@ void cmUnixMakefileGenerator::OutputUtilityRule(std::ostream& fout, } std::string comment = "Rule to build Utility "; comment += name; + std::string depends; + const std::vector &ccs = t.GetCustomCommands(); + for(std::vector::const_iterator i = ccs.begin(); + i != ccs.end(); ++i) + { + const std::vector & dep = i->GetDepends(); + for(std::vector::const_iterator d = dep.begin(); + d != dep.end(); ++d) + { + depends += *d + "\\\n"; + } + } this->OutputMakeRule(fout, comment.c_str(), name, - 0, + depends.c_str(), cc); }