summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalUnixMakefileGenerator3.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-12-06 12:36:52 (GMT)
committerBrad King <brad.king@kitware.com>2014-12-06 12:36:52 (GMT)
commit6c67b8168cd44e5900982ca3e36049792934d83d (patch)
tree6e6b39869b23123cc725fb61874188d4609262b3 /Source/cmLocalUnixMakefileGenerator3.cxx
parent65ea5eb721d820551653bf6471e83ed5f4a5ba13 (diff)
downloadCMake-6c67b8168cd44e5900982ca3e36049792934d83d.zip
CMake-6c67b8168cd44e5900982ca3e36049792934d83d.tar.gz
CMake-6c67b8168cd44e5900982ca3e36049792934d83d.tar.bz2
Makefile: Workaround Borland Make bug with multiple outputs
Given a rule of the form out1 out2: dep1 out1 out2: dep2 Borland Make complains that there are multiple rules for "out1" even though this works when there is only one output. Instead generate out1 out2: dep1 dep2 for Borland Make, but only when there are multiple outputs.
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator3.cxx')
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 56b2b97..812ded3 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -92,6 +92,7 @@ cmLocalUnixMakefileGenerator3::cmLocalUnixMakefileGenerator3()
this->SkipAssemblySourceRules = false;
this->MakeCommandEscapeTargetTwice = false;
this->BorlandMakeCurlyHack = false;
+ this->NoMultiOutputMultiDepRules = false;
}
//----------------------------------------------------------------------------
@@ -696,6 +697,19 @@ cmLocalUnixMakefileGenerator3
// No dependencies. The commands will always run.
os << cmMakeSafe(tgt) << space << ":\n";
}
+ else if(this->NoMultiOutputMultiDepRules && outputs.size() >= 2)
+ {
+ // Borland make does not understand multiple dependency rules when
+ // there are multiple outputs, so write them all on one line.
+ os << cmMakeSafe(tgt) << space << ":";
+ for(std::vector<std::string>::const_iterator dep = depends.begin();
+ dep != depends.end(); ++dep)
+ {
+ replace = this->Convert(*dep, HOME_OUTPUT, MAKERULE);
+ os << " " << cmMakeSafe(replace);
+ }
+ os << "\n";
+ }
else
{
// Split dependencies into multiple rule lines. This allows for