ENH: Added custom rule support to cmUnixMakefileGenerator.
This commit is contained in:
parent
9f98906e92
commit
278bcbd7be
|
@ -59,6 +59,7 @@ void cmUnixMakefileGenerator::OutputMakefile(const char* file)
|
|||
this->OutputExecutableRules(fout);
|
||||
this->OutputSubDirectoryRules(fout);
|
||||
this->OutputDepends(fout);
|
||||
this->OutputCustomRules(fout);
|
||||
}
|
||||
|
||||
// Output the LIBRARY and SRC_OBJS list based on
|
||||
|
@ -366,3 +367,24 @@ void cmUnixMakefileGenerator::OutputDepends(std::ostream& fout)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Output each custom rule in the following format:
|
||||
// m_Result: m_Depends[0] m_Depends[1] ...
|
||||
// (tab) m_Command
|
||||
void cmUnixMakefileGenerator::OutputCustomRules(std::ostream& fout)
|
||||
{
|
||||
for(std::vector<cmMakefile::customCommand>::const_iterator c =
|
||||
m_Makefile->GetCustomCommands().begin();
|
||||
c != m_Makefile->GetCustomCommands().end(); ++c)
|
||||
{
|
||||
fout << c->m_Result.c_str() << ":";
|
||||
for(std::vector<std::string>::const_iterator d = c->m_Depends.begin();
|
||||
d != c->m_Depends.end(); ++ d)
|
||||
{
|
||||
fout << " " << d->c_str();
|
||||
}
|
||||
fout << "\n\t" << c->m_Command.c_str() << "\n\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -49,6 +49,7 @@ protected:
|
|||
void OutputSubDirectoryRules(std::ostream&);
|
||||
void OutputDependInformation(std::ostream&);
|
||||
void OutputDependLibraries(std::ostream&);
|
||||
void OutputCustomRules(std::ostream&);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue