diff options
author | Brad King <brad.king@kitware.com> | 2006-06-01 15:45:51 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2006-06-01 15:45:51 (GMT) |
commit | 4189370497f4f00c7a7d3ec6ba221879bfc8b58c (patch) | |
tree | 40e1ca868cd74dd3f3cb21644d7d43107183282f /Source/cmMakefileExecutableTargetGenerator.cxx | |
parent | f54d254a814ff37bf9ad5992c9646bd975822178 (diff) | |
download | CMake-4189370497f4f00c7a7d3ec6ba221879bfc8b58c.zip CMake-4189370497f4f00c7a7d3ec6ba221879bfc8b58c.tar.gz CMake-4189370497f4f00c7a7d3ec6ba221879bfc8b58c.tar.bz2 |
BUG: Custom command outputs listed explicitly as source files in a target should be generated whether or not an object file in the target needs them. This useful and makes Makefile builds more consistent with VS IDE builds.
Diffstat (limited to 'Source/cmMakefileExecutableTargetGenerator.cxx')
-rw-r--r-- | Source/cmMakefileExecutableTargetGenerator.cxx | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index 7bca8bb..7b30dd2 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -29,12 +29,15 @@ void cmMakefileExecutableTargetGenerator::WriteRuleFiles() // create the build.make file and directory, put in the common blocks this->CreateRuleFile(); - // Add in any rules for custom commands - this->WriteCustomCommandsForTarget(); - - // write in rules for object files + // write rules used to help build object files this->WriteCommonCodeRules(); + // write in rules for object files and custom commands + this->WriteTargetBuildRules(); + + // write the per-target per-language flags + this->WriteTargetLanguageFlags(); + // Write the dependency generation rule. this->WriteTargetDependRules(); @@ -379,19 +382,8 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) depends, commands, false); } - // Write convenience targets. - std::string dir = this->Makefile->GetStartOutputDirectory(); - dir += "/"; - dir += this->LocalGenerator->GetTargetDirectory(*this->Target); - std::string buildTargetRuleName = dir; - buildTargetRuleName += relink?"/preinstall":"/build"; - buildTargetRuleName = - this->Convert(buildTargetRuleName.c_str(), - cmLocalGenerator::HOME_OUTPUT, - cmLocalGenerator::MAKEFILE); - this->LocalGenerator->WriteConvenienceRule(*this->BuildFileStream, - targetFullPath.c_str(), - buildTargetRuleName.c_str()); + // Write the main driver rule to build everything in this target. + this->WriteTargetDriverRule(targetFullPath.c_str(), relink); // Clean all the possible executable names and symlinks and object files. this->CleanFiles.insert(this->CleanFiles.end(), |