BUG: Watcom WMake needs empty rule commands even for symbolic targets. This fixes the cmake_force target.
This commit is contained in:
parent
01c7db07c3
commit
142210997f
|
@ -111,9 +111,9 @@ public:
|
||||||
check-build-system step. */
|
check-build-system step. */
|
||||||
virtual void CheckMultipleOutputs(cmMakefile* mf, bool verbose);
|
virtual void CheckMultipleOutputs(cmMakefile* mf, bool verbose);
|
||||||
|
|
||||||
/** Get the command to use for a non-symbolic target file that has
|
/** Get the command to use for a target that has no rule. This is
|
||||||
no rule. This is used for multiple output dependencies. */
|
used for multiple output dependencies and for cmake_force. */
|
||||||
std::string GetEmptyCommandHack() { return this->EmptyCommandsHack; }
|
std::string GetEmptyRuleHackCommand() { return this->EmptyRuleHackCommand; }
|
||||||
|
|
||||||
/** Get the fake dependency to use when a rule has no real commands
|
/** Get the fake dependency to use when a rule has no real commands
|
||||||
or dependencies. */
|
or dependencies. */
|
||||||
|
@ -175,11 +175,10 @@ protected:
|
||||||
// that can be added.
|
// that can be added.
|
||||||
std::string EmptyRuleHackDepends;
|
std::string EmptyRuleHackDepends;
|
||||||
|
|
||||||
// Some make programs (Watcom) do not like rules with no commands
|
// Some make programs (Watcom) do not like rules with no commands.
|
||||||
// for non-symbolic targets. If non-empty this variable holds a
|
// If non-empty this variable holds a bogus command that may be put
|
||||||
// bogus command that may be put in the rule to satisfy the make
|
// in the rule to satisfy the make program.
|
||||||
// program.
|
std::string EmptyRuleHackCommand;
|
||||||
std::string EmptyCommandsHack;
|
|
||||||
|
|
||||||
typedef std::map<cmStdString, cmStdString> MultipleOutputPairsType;
|
typedef std::map<cmStdString, cmStdString> MultipleOutputPairsType;
|
||||||
MultipleOutputPairsType MultipleOutputPairs;
|
MultipleOutputPairsType MultipleOutputPairs;
|
||||||
|
|
|
@ -24,7 +24,7 @@ cmGlobalWatcomWMakeGenerator::cmGlobalWatcomWMakeGenerator()
|
||||||
this->ForceUnixPaths = false;
|
this->ForceUnixPaths = false;
|
||||||
this->ToolSupportsColor = true;
|
this->ToolSupportsColor = true;
|
||||||
this->NeedSymbolicMark = true;
|
this->NeedSymbolicMark = true;
|
||||||
this->EmptyCommandsHack = "@cd .";
|
this->EmptyRuleHackCommand = "@cd .";
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmGlobalWatcomWMakeGenerator
|
void cmGlobalWatcomWMakeGenerator
|
||||||
|
|
|
@ -714,6 +714,11 @@ cmLocalUnixMakefileGenerator3
|
||||||
{
|
{
|
||||||
no_depends.push_back(hack);
|
no_depends.push_back(hack);
|
||||||
}
|
}
|
||||||
|
std::string hack_cmd = gg->GetEmptyRuleHackCommand();
|
||||||
|
if(!hack_cmd.empty())
|
||||||
|
{
|
||||||
|
no_commands.push_back(hack_cmd);
|
||||||
|
}
|
||||||
|
|
||||||
// Special symbolic target that never exists to force dependers to
|
// Special symbolic target that never exists to force dependers to
|
||||||
// run their rules.
|
// run their rules.
|
||||||
|
|
|
@ -923,7 +923,7 @@ cmMakefileTargetGenerator
|
||||||
// to be created.
|
// to be created.
|
||||||
std::vector<std::string> commands;
|
std::vector<std::string> commands;
|
||||||
std::vector<std::string> depends;
|
std::vector<std::string> depends;
|
||||||
std::string emptyCommand = this->GlobalGenerator->GetEmptyCommandHack();
|
std::string emptyCommand = this->GlobalGenerator->GetEmptyRuleHackCommand();
|
||||||
if(!emptyCommand.empty())
|
if(!emptyCommand.empty())
|
||||||
{
|
{
|
||||||
commands.push_back(emptyCommand);
|
commands.push_back(emptyCommand);
|
||||||
|
|
Loading…
Reference in New Issue