BUG: Work-around borland make bug that drops a rule completely if it has no dependencies or commands.
This commit is contained in:
parent
53821a505e
commit
f09778c4a5
|
@ -21,6 +21,7 @@
|
||||||
|
|
||||||
cmGlobalBorlandMakefileGenerator::cmGlobalBorlandMakefileGenerator()
|
cmGlobalBorlandMakefileGenerator::cmGlobalBorlandMakefileGenerator()
|
||||||
{
|
{
|
||||||
|
m_EmptyRuleHackDepends = "NUL";
|
||||||
m_FindMakeProgramFile = "CMakeBorlandFindMake.cmake";
|
m_FindMakeProgramFile = "CMakeBorlandFindMake.cmake";
|
||||||
m_ForceUnixPaths = false;
|
m_ForceUnixPaths = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -147,6 +147,13 @@ void cmGlobalUnixMakefileGenerator3::WriteMainMakefile2()
|
||||||
|
|
||||||
depends.clear();
|
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:
|
// Write and empty all:
|
||||||
lg->WriteMakeRule(makefileStream,
|
lg->WriteMakeRule(makefileStream,
|
||||||
"The main recursive all target", "all",
|
"The main recursive all target", "all",
|
||||||
|
|
|
@ -119,6 +119,12 @@ protected:
|
||||||
// does this generator need a requires step for any of its targets
|
// does this generator need a requires step for any of its targets
|
||||||
bool NeedRequiresStep(cmLocalUnixMakefileGenerator3 *lg, const char *);
|
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
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue