summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-02-16 23:50:16 (GMT)
committerBrad King <brad.king@kitware.com>2006-02-16 23:50:16 (GMT)
commitf09778c4a5484d8d26cecdf31c02e44bdb881f9d (patch)
tree5b51055c7c6b6305aa78c46483ac19c624d697f0
parent53821a505ee7b9baee2337c0a93e176d64304896 (diff)
downloadCMake-f09778c4a5484d8d26cecdf31c02e44bdb881f9d.zip
CMake-f09778c4a5484d8d26cecdf31c02e44bdb881f9d.tar.gz
CMake-f09778c4a5484d8d26cecdf31c02e44bdb881f9d.tar.bz2
BUG: Work-around borland make bug that drops a rule completely if it has no dependencies or commands.
-rw-r--r--Source/cmGlobalBorlandMakefileGenerator.cxx1
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.cxx7
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.h6
3 files changed, 14 insertions, 0 deletions
diff --git a/Source/cmGlobalBorlandMakefileGenerator.cxx b/Source/cmGlobalBorlandMakefileGenerator.cxx
index 0b6b6c4..dd2f73c 100644
--- a/Source/cmGlobalBorlandMakefileGenerator.cxx
+++ b/Source/cmGlobalBorlandMakefileGenerator.cxx
@@ -21,6 +21,7 @@
cmGlobalBorlandMakefileGenerator::cmGlobalBorlandMakefileGenerator()
{
+ m_EmptyRuleHackDepends = "NUL";
m_FindMakeProgramFile = "CMakeBorlandFindMake.cmake";
m_ForceUnixPaths = false;
}
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index 70c0ed4..f16d9a1 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -147,6 +147,13 @@ void cmGlobalUnixMakefileGenerator3::WriteMainMakefile2()
depends.clear();
+ // The all and preinstall rules might never have any dependencies
+ // added to them.
+ if(m_EmptyRuleHackDepends != "")
+ {
+ depends.push_back(m_EmptyRuleHackDepends);
+ }
+
// Write and empty all:
lg->WriteMakeRule(makefileStream,
"The main recursive all target", "all",
diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h
index 66e4c68..d2e9d0f 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.h
+++ b/Source/cmGlobalUnixMakefileGenerator3.h
@@ -119,6 +119,12 @@ protected:
// does this generator need a requires step for any of its targets
bool NeedRequiresStep(cmLocalUnixMakefileGenerator3 *lg, const char *);
+ // Some make programs (Borland) do not keep a rule if there are no
+ // dependencies or commands. This is a problem for creating rules
+ // that might not do anything but might have other dependencies
+ // added later. If non-empty this variable holds a fake dependency
+ // that can be added.
+ std::string m_EmptyRuleHackDepends;
};
#endif