Convert: Inline HOME_OUTPUT MAKERULE conversion
This commit is contained in:
parent
516e79ba27
commit
25c39ac28b
|
@ -247,9 +247,11 @@ bool cmDependsC::WriteDependencies(const std::set<std::string>& sources,
|
||||||
for (std::set<std::string>::const_iterator i = dependencies.begin();
|
for (std::set<std::string>::const_iterator i = dependencies.begin();
|
||||||
i != dependencies.end(); ++i) {
|
i != dependencies.end(); ++i) {
|
||||||
makeDepends << obj_m << ": "
|
makeDepends << obj_m << ": "
|
||||||
<< this->LocalGenerator->Convert(
|
<< cmSystemTools::ConvertToOutputPath(
|
||||||
*i, cmOutputConverter::HOME_OUTPUT,
|
this->LocalGenerator
|
||||||
cmOutputConverter::MAKERULE)
|
->ConvertToRelativePath(
|
||||||
|
this->LocalGenerator->GetBinaryDirectory(), *i)
|
||||||
|
.c_str())
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
internalDepends << " " << *i << std::endl;
|
internalDepends << " " << *i << std::endl;
|
||||||
}
|
}
|
||||||
|
|
|
@ -339,9 +339,11 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj,
|
||||||
for (std::set<std::string>::const_iterator i = info.Includes.begin();
|
for (std::set<std::string>::const_iterator i = info.Includes.begin();
|
||||||
i != info.Includes.end(); ++i) {
|
i != info.Includes.end(); ++i) {
|
||||||
makeDepends << obj_m << ": "
|
makeDepends << obj_m << ": "
|
||||||
<< this->LocalGenerator->Convert(
|
<< cmSystemTools::ConvertToOutputPath(
|
||||||
*i, cmOutputConverter::HOME_OUTPUT,
|
this->LocalGenerator
|
||||||
cmOutputConverter::MAKERULE)
|
->ConvertToRelativePath(
|
||||||
|
this->LocalGenerator->GetBinaryDirectory(), *i)
|
||||||
|
.c_str())
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
internalDepends << " " << *i << std::endl;
|
internalDepends << " " << *i << std::endl;
|
||||||
}
|
}
|
||||||
|
@ -367,8 +369,11 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj,
|
||||||
proxy += "/";
|
proxy += "/";
|
||||||
proxy += *i;
|
proxy += *i;
|
||||||
proxy += ".mod.proxy";
|
proxy += ".mod.proxy";
|
||||||
proxy = this->LocalGenerator->Convert(
|
proxy = cmSystemTools::ConvertToOutputPath(
|
||||||
proxy, cmOutputConverter::HOME_OUTPUT, cmOutputConverter::MAKERULE);
|
this->LocalGenerator
|
||||||
|
->ConvertToRelativePath(this->LocalGenerator->GetBinaryDirectory(),
|
||||||
|
proxy)
|
||||||
|
.c_str());
|
||||||
|
|
||||||
// since we require some things add them to our list of requirements
|
// since we require some things add them to our list of requirements
|
||||||
makeDepends << obj_m << ".requires: " << proxy << std::endl;
|
makeDepends << obj_m << ".requires: " << proxy << std::endl;
|
||||||
|
@ -383,17 +388,22 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj,
|
||||||
}
|
}
|
||||||
if (!required->second.empty()) {
|
if (!required->second.empty()) {
|
||||||
// This module is known. Depend on its timestamp file.
|
// This module is known. Depend on its timestamp file.
|
||||||
std::string stampFile = this->LocalGenerator->Convert(
|
std::string stampFile = cmSystemTools::ConvertToOutputPath(
|
||||||
required->second, cmOutputConverter::HOME_OUTPUT,
|
this->LocalGenerator
|
||||||
cmOutputConverter::MAKERULE);
|
->ConvertToRelativePath(this->LocalGenerator->GetBinaryDirectory(),
|
||||||
|
required->second)
|
||||||
|
.c_str());
|
||||||
makeDepends << obj_m << ": " << stampFile << "\n";
|
makeDepends << obj_m << ": " << stampFile << "\n";
|
||||||
} else {
|
} else {
|
||||||
// This module is not known to CMake. Try to locate it where
|
// This module is not known to CMake. Try to locate it where
|
||||||
// the compiler will and depend on that.
|
// the compiler will and depend on that.
|
||||||
std::string module;
|
std::string module;
|
||||||
if (this->FindModule(*i, module)) {
|
if (this->FindModule(*i, module)) {
|
||||||
module = this->LocalGenerator->Convert(
|
module = cmSystemTools::ConvertToOutputPath(
|
||||||
module, cmOutputConverter::HOME_OUTPUT, cmOutputConverter::MAKERULE);
|
this->LocalGenerator
|
||||||
|
->ConvertToRelativePath(this->LocalGenerator->GetBinaryDirectory(),
|
||||||
|
module)
|
||||||
|
.c_str());
|
||||||
makeDepends << obj_m << ": " << module << "\n";
|
makeDepends << obj_m << ": " << module << "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -406,8 +416,11 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj,
|
||||||
proxy += "/";
|
proxy += "/";
|
||||||
proxy += *i;
|
proxy += *i;
|
||||||
proxy += ".mod.proxy";
|
proxy += ".mod.proxy";
|
||||||
proxy = this->LocalGenerator->Convert(
|
proxy = cmSystemTools::ConvertToOutputPath(
|
||||||
proxy, cmOutputConverter::HOME_OUTPUT, cmOutputConverter::MAKERULE);
|
this->LocalGenerator
|
||||||
|
->ConvertToRelativePath(this->LocalGenerator->GetBinaryDirectory(),
|
||||||
|
proxy)
|
||||||
|
.c_str());
|
||||||
makeDepends << proxy << ": " << obj_m << ".provides" << std::endl;
|
makeDepends << proxy << ": " << obj_m << ".provides" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -454,8 +467,11 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj,
|
||||||
// the target finishes building.
|
// the target finishes building.
|
||||||
std::string driver = this->TargetDirectory;
|
std::string driver = this->TargetDirectory;
|
||||||
driver += "/build";
|
driver += "/build";
|
||||||
driver = this->LocalGenerator->Convert(
|
driver = cmSystemTools::ConvertToOutputPath(
|
||||||
driver, cmOutputConverter::HOME_OUTPUT, cmOutputConverter::MAKERULE);
|
this->LocalGenerator
|
||||||
|
->ConvertToRelativePath(this->LocalGenerator->GetBinaryDirectory(),
|
||||||
|
driver)
|
||||||
|
.c_str());
|
||||||
makeDepends << driver << ": " << obj_m << ".provides.build\n";
|
makeDepends << driver << ": " << obj_m << ".provides.build\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -480,9 +480,10 @@ void cmGlobalUnixMakefileGenerator3::WriteDirectoryRules2(
|
||||||
}
|
}
|
||||||
|
|
||||||
// Begin the directory-level rules section.
|
// Begin the directory-level rules section.
|
||||||
std::string dir = lg->GetCurrentBinaryDirectory();
|
std::string dir = cmSystemTools::ConvertToOutputPath(
|
||||||
dir = lg->Convert(dir, cmOutputConverter::HOME_OUTPUT,
|
lg->ConvertToRelativePath(lg->GetBinaryDirectory(),
|
||||||
cmOutputConverter::MAKERULE);
|
lg->GetCurrentBinaryDirectory())
|
||||||
|
.c_str());
|
||||||
lg->WriteDivider(ruleFileStream);
|
lg->WriteDivider(ruleFileStream);
|
||||||
ruleFileStream << "# Directory level rules for directory " << dir << "\n\n";
|
ruleFileStream << "# Directory level rules for directory " << dir << "\n\n";
|
||||||
|
|
||||||
|
|
|
@ -556,8 +556,8 @@ void cmLocalUnixMakefileGenerator3::WriteMakeRule(
|
||||||
}
|
}
|
||||||
|
|
||||||
// Construct the left hand side of the rule.
|
// Construct the left hand side of the rule.
|
||||||
std::string tgt = this->Convert(target, cmOutputConverter::HOME_OUTPUT,
|
std::string tgt = cmSystemTools::ConvertToOutputPath(
|
||||||
cmOutputConverter::MAKERULE);
|
this->ConvertToRelativePath(this->GetBinaryDirectory(), target).c_str());
|
||||||
|
|
||||||
const char* space = "";
|
const char* space = "";
|
||||||
if (tgt.size() == 1) {
|
if (tgt.size() == 1) {
|
||||||
|
@ -584,8 +584,9 @@ void cmLocalUnixMakefileGenerator3::WriteMakeRule(
|
||||||
for (std::vector<std::string>::const_iterator dep = depends.begin();
|
for (std::vector<std::string>::const_iterator dep = depends.begin();
|
||||||
dep != depends.end(); ++dep) {
|
dep != depends.end(); ++dep) {
|
||||||
replace = *dep;
|
replace = *dep;
|
||||||
replace = this->Convert(replace, cmOutputConverter::HOME_OUTPUT,
|
replace = cmSystemTools::ConvertToOutputPath(
|
||||||
cmOutputConverter::MAKERULE);
|
this->ConvertToRelativePath(this->GetBinaryDirectory(), replace)
|
||||||
|
.c_str());
|
||||||
os << cmMakeSafe(tgt) << space << ": " << cmMakeSafe(replace) << "\n";
|
os << cmMakeSafe(tgt) << space << ": " << cmMakeSafe(replace) << "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -216,8 +216,11 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules()
|
||||||
*this->BuildFileStream
|
*this->BuildFileStream
|
||||||
<< "# Include any dependencies generated for this target.\n"
|
<< "# Include any dependencies generated for this target.\n"
|
||||||
<< this->GlobalGenerator->IncludeDirective << " " << root
|
<< this->GlobalGenerator->IncludeDirective << " " << root
|
||||||
<< this->Convert(dependFileNameFull, cmOutputConverter::HOME_OUTPUT,
|
<< cmSystemTools::ConvertToOutputPath(
|
||||||
cmOutputConverter::MAKERULE)
|
this->LocalGenerator
|
||||||
|
->ConvertToRelativePath(this->LocalGenerator->GetBinaryDirectory(),
|
||||||
|
dependFileNameFull)
|
||||||
|
.c_str())
|
||||||
<< "\n\n";
|
<< "\n\n";
|
||||||
|
|
||||||
if (!this->NoRuleMessages) {
|
if (!this->NoRuleMessages) {
|
||||||
|
@ -225,9 +228,12 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules()
|
||||||
*this->BuildFileStream
|
*this->BuildFileStream
|
||||||
<< "# Include the progress variables for this target.\n"
|
<< "# Include the progress variables for this target.\n"
|
||||||
<< this->GlobalGenerator->IncludeDirective << " " << root
|
<< this->GlobalGenerator->IncludeDirective << " " << root
|
||||||
<< this->Convert(this->ProgressFileNameFull,
|
<< cmSystemTools::ConvertToOutputPath(
|
||||||
cmOutputConverter::HOME_OUTPUT,
|
this->LocalGenerator
|
||||||
cmOutputConverter::MAKERULE)
|
->ConvertToRelativePath(
|
||||||
|
this->LocalGenerator->GetBinaryDirectory(),
|
||||||
|
this->ProgressFileNameFull)
|
||||||
|
.c_str())
|
||||||
<< "\n\n";
|
<< "\n\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -257,8 +263,11 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules()
|
||||||
*this->BuildFileStream
|
*this->BuildFileStream
|
||||||
<< "# Include the compile flags for this target's objects.\n"
|
<< "# Include the compile flags for this target's objects.\n"
|
||||||
<< this->GlobalGenerator->IncludeDirective << " " << root
|
<< this->GlobalGenerator->IncludeDirective << " " << root
|
||||||
<< this->Convert(this->FlagFileNameFull, cmOutputConverter::HOME_OUTPUT,
|
<< cmSystemTools::ConvertToOutputPath(
|
||||||
cmOutputConverter::MAKERULE)
|
this->LocalGenerator
|
||||||
|
->ConvertToRelativePath(this->LocalGenerator->GetBinaryDirectory(),
|
||||||
|
this->FlagFileNameFull)
|
||||||
|
.c_str())
|
||||||
<< "\n\n";
|
<< "\n\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,9 +53,12 @@ void cmMakefileUtilityTargetGenerator::WriteRuleFiles()
|
||||||
*this->BuildFileStream
|
*this->BuildFileStream
|
||||||
<< "# Include the progress variables for this target.\n"
|
<< "# Include the progress variables for this target.\n"
|
||||||
<< this->GlobalGenerator->IncludeDirective << " " << root
|
<< this->GlobalGenerator->IncludeDirective << " " << root
|
||||||
<< this->Convert(this->ProgressFileNameFull,
|
<< cmSystemTools::ConvertToOutputPath(
|
||||||
cmOutputConverter::HOME_OUTPUT,
|
this->LocalGenerator
|
||||||
cmOutputConverter::MAKERULE)
|
->ConvertToRelativePath(
|
||||||
|
this->LocalGenerator->GetBinaryDirectory(),
|
||||||
|
this->ProgressFileNameFull)
|
||||||
|
.c_str())
|
||||||
<< "\n\n";
|
<< "\n\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue