diff options
Diffstat (limited to 'Source/cmMakefileTargetGenerator.cxx')
-rw-r--r-- | Source/cmMakefileTargetGenerator.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 523a6f7..54d7835 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -35,7 +35,7 @@ cmMakefileTargetGenerator::cmMakefileTargetGenerator() this->BuildFileStream = 0; this->InfoFileStream = 0; this->FlagFileStream = 0; - this->DriveCustomCommandsOnDepends = false; + this->CustomCommandDriver = OnBuild; } cmMakefileTargetGenerator * @@ -788,7 +788,7 @@ void cmMakefileTargetGenerator::WriteTargetDependRules() commands.push_back(depCmd.str()); // Make sure all custom command outputs in this target are built. - if(this->DriveCustomCommandsOnDepends) + if(this->CustomCommandDriver == OnDepends) { this->DriveCustomCommands(depends); } @@ -874,6 +874,10 @@ void cmMakefileTargetGenerator std::vector<std::string> depends; this->LocalGenerator->AppendCustomDepend(depends, cc); + // Add a dependency on the rule file itself. + this->LocalGenerator->AppendRuleDepend(depends, + this->BuildFileNameFull.c_str()); + // Check whether we need to bother checking for a symbolic output. bool need_symbolic = this->GlobalGenerator->GetNeedSymbolicMark(); @@ -1096,7 +1100,7 @@ void cmMakefileTargetGenerator::WriteTargetDriverRule(const char* main_output, comment = "Rule to build all files generated by this target."; // Make sure all custom command outputs in this target are built. - if(!this->DriveCustomCommandsOnDepends) + if(this->CustomCommandDriver == OnBuild) { this->DriveCustomCommands(depends); } |