diff options
author | Ken Martin <ken.martin@kitware.com> | 2005-05-19 14:52:59 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2005-05-19 14:52:59 (GMT) |
commit | 1e78125a7b43bc2a6e447180017f78cfa88b3935 (patch) | |
tree | afa9216082250e73ba49b025b6e28be0068600fe /Source/cmLocalUnixMakefileGenerator3.cxx | |
parent | 1137970d541efc2cb6edb8f7c80aef2894e5c0d7 (diff) | |
download | CMake-1e78125a7b43bc2a6e447180017f78cfa88b3935.zip CMake-1e78125a7b43bc2a6e447180017f78cfa88b3935.tar.gz CMake-1e78125a7b43bc2a6e447180017f78cfa88b3935.tar.bz2 |
ENH: some performance improvements
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator3.cxx')
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator3.cxx | 43 |
1 files changed, 41 insertions, 2 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 38296cc..1563b75 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -60,6 +60,11 @@ void cmLocalUnixMakefileGenerator3::Generate() // Setup our configuration variables for this directory. this->ConfigureOutputPaths(); + // write the custom commands, this must happen before writing the targets, + // but... it may be that it needs to happen after the TraveVSDependencies + // call + this->WriteCustomCommands(); + // Generate the rule files for each target. cmTargets& targets = m_Makefile->GetTargets(); std::string empty; @@ -80,8 +85,6 @@ void cmLocalUnixMakefileGenerator3::Generate() } } - this->WriteCustomCommands(); - // write the local Makefile this->WriteLocalMakefile(); @@ -377,6 +380,21 @@ cmLocalUnixMakefileGenerator3 } this->WriteDisclaimer(ruleFileStream); + this->WriteMakeVariables(ruleFileStream); + + // include the custom commands rules + if (m_CustomRuleFiles.size()) + { + // do the include + std::string dir = m_Makefile->GetStartOutputDirectory(); + dir += "/CMakeCustomRules.dir/build.make"; + dir = this->Convert(dir.c_str(),HOME_OUTPUT,MAKEFILE); + ruleFileStream + << m_IncludeDirective << " " + << this->ConvertToOutputForExisting(dir.c_str()).c_str() + << "\n"; + } + // Include the rule file for each object. std::string relPath = this->GetHomeRelativeOutputPath(); std::string objTarget; @@ -821,9 +839,23 @@ cmLocalUnixMakefileGenerator3 return; } this->WriteDisclaimer(ruleFileStream); + this->WriteMakeVariables(ruleFileStream); ruleFileStream << "# Utility rule file for " << target.GetName() << ".\n\n"; + // include the custom commands rules + if (m_CustomRuleFiles.size()) + { + // do the include + std::string dir = m_Makefile->GetStartOutputDirectory(); + dir += "/CMakeCustomRules.dir/build.make"; + dir = this->Convert(dir.c_str(),HOME_OUTPUT,MAKEFILE); + ruleFileStream + << m_IncludeDirective << " " + << this->ConvertToOutputForExisting(dir.c_str()).c_str() + << "\n"; + } + // Collect the commands and dependencies. std::vector<std::string> commands; std::vector<std::string> depends; @@ -2300,6 +2332,12 @@ cmLocalUnixMakefileGenerator3 } // Loop over all utility dependencies. + + // Ken --- we trust that the parent build system handled the utility + // targets, really we trust that it also handled the libs but there is no + // harm in listing the libs as depends, if the libs are not present they + // cannot be built (the rules are not there) but at least it will squak +#if 0 const std::set<cmStdString>& tutils = target.GetUtilities(); for(std::set<cmStdString>::const_iterator util = tutils.begin(); util != tutils.end(); ++util) @@ -2311,6 +2349,7 @@ cmLocalUnixMakefileGenerator3 this->AppendAnyDepend(depends, util->c_str()); } } +#endif } //---------------------------------------------------------------------------- |