summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Source/cmDependsC.cxx8
-rw-r--r--Source/cmDependsFortran.cxx44
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.cxx7
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx9
-rw-r--r--Source/cmMakefileTargetGenerator.cxx23
-rw-r--r--Source/cmMakefileUtilityTargetGenerator.cxx9
6 files changed, 66 insertions, 34 deletions
diff --git a/Source/cmDependsC.cxx b/Source/cmDependsC.cxx
index 619106ffd6..48a32f1887 100644
--- a/Source/cmDependsC.cxx
+++ b/Source/cmDependsC.cxx
@@ -247,9 +247,11 @@ bool cmDependsC::WriteDependencies(const std::set<std::string>& sources,
for (std::set<std::string>::const_iterator i = dependencies.begin();
i != dependencies.end(); ++i) {
makeDepends << obj_m << ": "
- << this->LocalGenerator->Convert(
- *i, cmOutputConverter::HOME_OUTPUT,
- cmOutputConverter::MAKERULE)
+ << cmSystemTools::ConvertToOutputPath(
+ this->LocalGenerator
+ ->ConvertToRelativePath(
+ this->LocalGenerator->GetBinaryDirectory(), *i)
+ .c_str())
<< std::endl;
internalDepends << " " << *i << std::endl;
}
diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx
index 4a4acce894..8317534517 100644
--- a/Source/cmDependsFortran.cxx
+++ b/Source/cmDependsFortran.cxx
@@ -339,9 +339,11 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj,
for (std::set<std::string>::const_iterator i = info.Includes.begin();
i != info.Includes.end(); ++i) {
makeDepends << obj_m << ": "
- << this->LocalGenerator->Convert(
- *i, cmOutputConverter::HOME_OUTPUT,
- cmOutputConverter::MAKERULE)
+ << cmSystemTools::ConvertToOutputPath(
+ this->LocalGenerator
+ ->ConvertToRelativePath(
+ this->LocalGenerator->GetBinaryDirectory(), *i)
+ .c_str())
<< std::endl;
internalDepends << " " << *i << std::endl;
}
@@ -367,8 +369,11 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj,
proxy += "/";
proxy += *i;
proxy += ".mod.proxy";
- proxy = this->LocalGenerator->Convert(
- proxy, cmOutputConverter::HOME_OUTPUT, cmOutputConverter::MAKERULE);
+ proxy = cmSystemTools::ConvertToOutputPath(
+ this->LocalGenerator
+ ->ConvertToRelativePath(this->LocalGenerator->GetBinaryDirectory(),
+ proxy)
+ .c_str());
// since we require some things add them to our list of requirements
makeDepends << obj_m << ".requires: " << proxy << std::endl;
@@ -383,17 +388,22 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj,
}
if (!required->second.empty()) {
// This module is known. Depend on its timestamp file.
- std::string stampFile = this->LocalGenerator->Convert(
- required->second, cmOutputConverter::HOME_OUTPUT,
- cmOutputConverter::MAKERULE);
+ std::string stampFile = cmSystemTools::ConvertToOutputPath(
+ this->LocalGenerator
+ ->ConvertToRelativePath(this->LocalGenerator->GetBinaryDirectory(),
+ required->second)
+ .c_str());
makeDepends << obj_m << ": " << stampFile << "\n";
} else {
// This module is not known to CMake. Try to locate it where
// the compiler will and depend on that.
std::string module;
if (this->FindModule(*i, module)) {
- module = this->LocalGenerator->Convert(
- module, cmOutputConverter::HOME_OUTPUT, cmOutputConverter::MAKERULE);
+ module = cmSystemTools::ConvertToOutputPath(
+ this->LocalGenerator
+ ->ConvertToRelativePath(this->LocalGenerator->GetBinaryDirectory(),
+ module)
+ .c_str());
makeDepends << obj_m << ": " << module << "\n";
}
}
@@ -406,8 +416,11 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj,
proxy += "/";
proxy += *i;
proxy += ".mod.proxy";
- proxy = this->LocalGenerator->Convert(
- proxy, cmOutputConverter::HOME_OUTPUT, cmOutputConverter::MAKERULE);
+ proxy = cmSystemTools::ConvertToOutputPath(
+ this->LocalGenerator
+ ->ConvertToRelativePath(this->LocalGenerator->GetBinaryDirectory(),
+ proxy)
+ .c_str());
makeDepends << proxy << ": " << obj_m << ".provides" << std::endl;
}
@@ -454,8 +467,11 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj,
// the target finishes building.
std::string driver = this->TargetDirectory;
driver += "/build";
- driver = this->LocalGenerator->Convert(
- driver, cmOutputConverter::HOME_OUTPUT, cmOutputConverter::MAKERULE);
+ driver = cmSystemTools::ConvertToOutputPath(
+ this->LocalGenerator
+ ->ConvertToRelativePath(this->LocalGenerator->GetBinaryDirectory(),
+ driver)
+ .c_str());
makeDepends << driver << ": " << obj_m << ".provides.build\n";
}
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index c17eb233c7..52ae46968c 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -480,9 +480,10 @@ void cmGlobalUnixMakefileGenerator3::WriteDirectoryRules2(
}
// Begin the directory-level rules section.
- std::string dir = lg->GetCurrentBinaryDirectory();
- dir = lg->Convert(dir, cmOutputConverter::HOME_OUTPUT,
- cmOutputConverter::MAKERULE);
+ std::string dir = cmSystemTools::ConvertToOutputPath(
+ lg->ConvertToRelativePath(lg->GetBinaryDirectory(),
+ lg->GetCurrentBinaryDirectory())
+ .c_str());
lg->WriteDivider(ruleFileStream);
ruleFileStream << "# Directory level rules for directory " << dir << "\n\n";
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 697d856bbd..59dc4458b3 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -556,8 +556,8 @@ void cmLocalUnixMakefileGenerator3::WriteMakeRule(
}
// Construct the left hand side of the rule.
- std::string tgt = this->Convert(target, cmOutputConverter::HOME_OUTPUT,
- cmOutputConverter::MAKERULE);
+ std::string tgt = cmSystemTools::ConvertToOutputPath(
+ this->ConvertToRelativePath(this->GetBinaryDirectory(), target).c_str());
const char* space = "";
if (tgt.size() == 1) {
@@ -584,8 +584,9 @@ void cmLocalUnixMakefileGenerator3::WriteMakeRule(
for (std::vector<std::string>::const_iterator dep = depends.begin();
dep != depends.end(); ++dep) {
replace = *dep;
- replace = this->Convert(replace, cmOutputConverter::HOME_OUTPUT,
- cmOutputConverter::MAKERULE);
+ replace = cmSystemTools::ConvertToOutputPath(
+ this->ConvertToRelativePath(this->GetBinaryDirectory(), replace)
+ .c_str());
os << cmMakeSafe(tgt) << space << ": " << cmMakeSafe(replace) << "\n";
}
}
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index fc5af4a211..9809be6b78 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -216,8 +216,11 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules()
*this->BuildFileStream
<< "# Include any dependencies generated for this target.\n"
<< this->GlobalGenerator->IncludeDirective << " " << root
- << this->Convert(dependFileNameFull, cmOutputConverter::HOME_OUTPUT,
- cmOutputConverter::MAKERULE)
+ << cmSystemTools::ConvertToOutputPath(
+ this->LocalGenerator
+ ->ConvertToRelativePath(this->LocalGenerator->GetBinaryDirectory(),
+ dependFileNameFull)
+ .c_str())
<< "\n\n";
if (!this->NoRuleMessages) {
@@ -225,9 +228,12 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules()
*this->BuildFileStream
<< "# Include the progress variables for this target.\n"
<< this->GlobalGenerator->IncludeDirective << " " << root
- << this->Convert(this->ProgressFileNameFull,
- cmOutputConverter::HOME_OUTPUT,
- cmOutputConverter::MAKERULE)
+ << cmSystemTools::ConvertToOutputPath(
+ this->LocalGenerator
+ ->ConvertToRelativePath(
+ this->LocalGenerator->GetBinaryDirectory(),
+ this->ProgressFileNameFull)
+ .c_str())
<< "\n\n";
}
@@ -257,8 +263,11 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules()
*this->BuildFileStream
<< "# Include the compile flags for this target's objects.\n"
<< this->GlobalGenerator->IncludeDirective << " " << root
- << this->Convert(this->FlagFileNameFull, cmOutputConverter::HOME_OUTPUT,
- cmOutputConverter::MAKERULE)
+ << cmSystemTools::ConvertToOutputPath(
+ this->LocalGenerator
+ ->ConvertToRelativePath(this->LocalGenerator->GetBinaryDirectory(),
+ this->FlagFileNameFull)
+ .c_str())
<< "\n\n";
}
diff --git a/Source/cmMakefileUtilityTargetGenerator.cxx b/Source/cmMakefileUtilityTargetGenerator.cxx
index b709545fa3..8bf0a23d13 100644
--- a/Source/cmMakefileUtilityTargetGenerator.cxx
+++ b/Source/cmMakefileUtilityTargetGenerator.cxx
@@ -53,9 +53,12 @@ void cmMakefileUtilityTargetGenerator::WriteRuleFiles()
*this->BuildFileStream
<< "# Include the progress variables for this target.\n"
<< this->GlobalGenerator->IncludeDirective << " " << root
- << this->Convert(this->ProgressFileNameFull,
- cmOutputConverter::HOME_OUTPUT,
- cmOutputConverter::MAKERULE)
+ << cmSystemTools::ConvertToOutputPath(
+ this->LocalGenerator
+ ->ConvertToRelativePath(
+ this->LocalGenerator->GetBinaryDirectory(),
+ this->ProgressFileNameFull)
+ .c_str())
<< "\n\n";
}