summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileUtilityTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-12-14 19:30:41 (GMT)
committerBrad King <brad.king@kitware.com>2006-12-14 19:30:41 (GMT)
commitf7611f167cef7d5d517e901984f5f6c72aa61cf9 (patch)
tree49feb363a4022eaa70bffc59f01a5a7562c4e1ba /Source/cmMakefileUtilityTargetGenerator.cxx
parent1fe21ae35ec49db320955a6d9c1cbf4807e2f9f3 (diff)
downloadCMake-f7611f167cef7d5d517e901984f5f6c72aa61cf9.zip
CMake-f7611f167cef7d5d517e901984f5f6c72aa61cf9.tar.gz
CMake-f7611f167cef7d5d517e901984f5f6c72aa61cf9.tar.bz2
ENH: Made cmMakefileTargetGenerator::GlobalGenerator have full type cmGlobalUnixMakefileGenerator3 to give access to all methods. Fixed broken custom targets with no commands for Borland makefiles when CMAKE_SKIP_RULE_DEPENDENCY is set.
Diffstat (limited to 'Source/cmMakefileUtilityTargetGenerator.cxx')
-rw-r--r--Source/cmMakefileUtilityTargetGenerator.cxx13
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(),