summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.h15
-rw-r--r--Source/cmGlobalWatcomWMakeGenerator.cxx2
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx5
-rw-r--r--Source/cmMakefileTargetGenerator.cxx2
4 files changed, 14 insertions, 10 deletions
diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h
index aa901af1c8..5d4ceef2c9 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.h
+++ b/Source/cmGlobalUnixMakefileGenerator3.h
@@ -111,9 +111,9 @@ public:
check-build-system step. */
virtual void CheckMultipleOutputs(cmMakefile* mf, bool verbose);
- /** Get the command to use for a non-symbolic target file that has
- no rule. This is used for multiple output dependencies. */
- std::string GetEmptyCommandHack() { return this->EmptyCommandsHack; }
+ /** Get the command to use for a target that has no rule. This is
+ used for multiple output dependencies and for cmake_force. */
+ std::string GetEmptyRuleHackCommand() { return this->EmptyRuleHackCommand; }
/** Get the fake dependency to use when a rule has no real commands
or dependencies. */
@@ -175,11 +175,10 @@ protected:
// that can be added.
std::string EmptyRuleHackDepends;
- // Some make programs (Watcom) do not like rules with no commands
- // for non-symbolic targets. If non-empty this variable holds a
- // bogus command that may be put in the rule to satisfy the make
- // program.
- std::string EmptyCommandsHack;
+ // Some make programs (Watcom) do not like rules with no commands.
+ // If non-empty this variable holds a bogus command that may be put
+ // in the rule to satisfy the make program.
+ std::string EmptyRuleHackCommand;
typedef std::map<cmStdString, cmStdString> MultipleOutputPairsType;
MultipleOutputPairsType MultipleOutputPairs;
diff --git a/Source/cmGlobalWatcomWMakeGenerator.cxx b/Source/cmGlobalWatcomWMakeGenerator.cxx
index 25053538e3..5505be732c 100644
--- a/Source/cmGlobalWatcomWMakeGenerator.cxx
+++ b/Source/cmGlobalWatcomWMakeGenerator.cxx
@@ -24,7 +24,7 @@ cmGlobalWatcomWMakeGenerator::cmGlobalWatcomWMakeGenerator()
this->ForceUnixPaths = false;
this->ToolSupportsColor = true;
this->NeedSymbolicMark = true;
- this->EmptyCommandsHack = "@cd .";
+ this->EmptyRuleHackCommand = "@cd .";
}
void cmGlobalWatcomWMakeGenerator
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 53707505e4..3d893662cb 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -714,6 +714,11 @@ cmLocalUnixMakefileGenerator3
{
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
// run their rules.
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 54d7835d8b..8eec8c2e69 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -923,7 +923,7 @@ cmMakefileTargetGenerator
// to be created.
std::vector<std::string> commands;
std::vector<std::string> depends;
- std::string emptyCommand = this->GlobalGenerator->GetEmptyCommandHack();
+ std::string emptyCommand = this->GlobalGenerator->GetEmptyRuleHackCommand();
if(!emptyCommand.empty())
{
commands.push_back(emptyCommand);