BUG: Work-around borland make bug that drops a rule completely if it has no dependencies or commands.

This commit is contained in:
Brad King 2006-02-16 18:50:16 -05:00
parent 53821a505e
commit f09778c4a5
3 changed files with 14 additions and 0 deletions

View File

@ -21,6 +21,7 @@
cmGlobalBorlandMakefileGenerator::cmGlobalBorlandMakefileGenerator()
{
m_EmptyRuleHackDepends = "NUL";
m_FindMakeProgramFile = "CMakeBorlandFindMake.cmake";
m_ForceUnixPaths = false;
}

View File

@ -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",

View File

@ -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