diff options
author | Brad King <brad.king@kitware.com> | 2001-03-02 21:04:26 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2001-03-02 21:04:26 (GMT) |
commit | 278bcbd7be5ff39973221a5cb7bebcbc02e943f9 (patch) | |
tree | b86b54ba05047793b0d2162a5639df3c31fa76bb /Source/cmUnixMakefileGenerator.cxx | |
parent | 9f98906e9218ab92ca78ed73add456363748b123 (diff) | |
download | CMake-278bcbd7be5ff39973221a5cb7bebcbc02e943f9.zip CMake-278bcbd7be5ff39973221a5cb7bebcbc02e943f9.tar.gz CMake-278bcbd7be5ff39973221a5cb7bebcbc02e943f9.tar.bz2 |
ENH: Added custom rule support to cmUnixMakefileGenerator.
Diffstat (limited to 'Source/cmUnixMakefileGenerator.cxx')
-rw-r--r-- | Source/cmUnixMakefileGenerator.cxx | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Source/cmUnixMakefileGenerator.cxx b/Source/cmUnixMakefileGenerator.cxx index c5445f8..84fa092 100644 --- a/Source/cmUnixMakefileGenerator.cxx +++ b/Source/cmUnixMakefileGenerator.cxx @@ -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"; + } + +} |