diff options
Diffstat (limited to 'Source/cmMakefileUtilityTargetGenerator.cxx')
-rw-r--r-- | Source/cmMakefileUtilityTargetGenerator.cxx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Source/cmMakefileUtilityTargetGenerator.cxx b/Source/cmMakefileUtilityTargetGenerator.cxx index 51a848f..6ab1863 100644 --- a/Source/cmMakefileUtilityTargetGenerator.cxx +++ b/Source/cmMakefileUtilityTargetGenerator.cxx @@ -17,7 +17,7 @@ #include "cmMakefileUtilityTargetGenerator.h" #include "cmGeneratedFileStream.h" -#include "cmGlobalGenerator.h" +#include "cmGlobalUnixMakefileGenerator3.h" #include "cmLocalUnixMakefileGenerator3.h" #include "cmMakefile.h" #include "cmSourceFile.h" @@ -58,6 +58,17 @@ void cmMakefileUtilityTargetGenerator::WriteRuleFiles() objTarget += this->BuildFileName; this->LocalGenerator->AppendRuleDepend(depends, objTarget.c_str()); + // If the rule is empty add the special empty rule dependency needed + // by some make tools. + if(depends.empty() && commands.empty()) + { + std::string hack = this->GlobalGenerator->GetEmptyRuleHackDepends(); + if(!hack.empty()) + { + depends.push_back(hack); + } + } + // Write the rule. this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0, this->Target->GetName(), |