BUG: Added /fast targets in subdirectory makefiles. Removed bogus INSTALL_*/fast targets. Also fixed preinstall/fast target.
This commit is contained in:
parent
09f2be12b8
commit
791706a52f
|
@ -680,18 +680,18 @@ cmGlobalUnixMakefileGenerator3
|
||||||
cmTargets& targets = lg->GetMakefile()->GetTargets();
|
cmTargets& targets = lg->GetMakefile()->GetTargets();
|
||||||
for(cmTargets::iterator t = targets.begin(); t != targets.end(); ++t)
|
for(cmTargets::iterator t = targets.begin(); t != targets.end(); ++t)
|
||||||
{
|
{
|
||||||
if((t->second.GetType() == cmTarget::EXECUTABLE) ||
|
|
||||||
(t->second.GetType() == cmTarget::STATIC_LIBRARY) ||
|
|
||||||
(t->second.GetType() == cmTarget::SHARED_LIBRARY) ||
|
|
||||||
(t->second.GetType() == cmTarget::MODULE_LIBRARY) ||
|
|
||||||
(t->second.GetType() == cmTarget::UTILITY))
|
|
||||||
{
|
|
||||||
// Don't emit the same rule twice (e.g. two targets with the same
|
// Don't emit the same rule twice (e.g. two targets with the same
|
||||||
// simple name)
|
// simple name)
|
||||||
if(t->second.GetName() &&
|
if(t->second.GetName() &&
|
||||||
strlen(t->second.GetName()) &&
|
strlen(t->second.GetName()) &&
|
||||||
emitted.insert(t->second.GetName()).second)
|
emitted.insert(t->second.GetName()).second)
|
||||||
{
|
{
|
||||||
|
if((t->second.GetType() == cmTarget::EXECUTABLE) ||
|
||||||
|
(t->second.GetType() == cmTarget::STATIC_LIBRARY) ||
|
||||||
|
(t->second.GetType() == cmTarget::SHARED_LIBRARY) ||
|
||||||
|
(t->second.GetType() == cmTarget::MODULE_LIBRARY) ||
|
||||||
|
(t->second.GetType() == cmTarget::UTILITY))
|
||||||
|
{
|
||||||
// Add a rule to build the target by name.
|
// Add a rule to build the target by name.
|
||||||
lg->WriteDivider(ruleFileStream);
|
lg->WriteDivider(ruleFileStream);
|
||||||
ruleFileStream
|
ruleFileStream
|
||||||
|
@ -762,14 +762,10 @@ cmGlobalUnixMakefileGenerator3
|
||||||
lg->WriteMakeRule(ruleFileStream, "fast build rule for target.",
|
lg->WriteMakeRule(ruleFileStream, "fast build rule for target.",
|
||||||
localName.c_str(), depends, commands, true);
|
localName.c_str(), depends, commands, true);
|
||||||
}
|
}
|
||||||
}
|
else if(t->second.GetType() == cmTarget::GLOBAL_TARGET)
|
||||||
else
|
|
||||||
{
|
{
|
||||||
if(t->second.GetName() &&
|
// Provide a fast target for the global targets that just
|
||||||
strlen(t->second.GetName()) &&
|
// forwards to the real target so at least it will work.
|
||||||
emitted.insert(t->second.GetName()).second)
|
|
||||||
{
|
|
||||||
// Add a fast rule to build the target
|
|
||||||
depends.clear();
|
depends.clear();
|
||||||
commands.clear();
|
commands.clear();
|
||||||
std::string localName = t->second.GetName();
|
std::string localName = t->second.GetName();
|
||||||
|
|
|
@ -296,6 +296,23 @@ void cmLocalUnixMakefileGenerator3
|
||||||
this->WriteMakeRule(ruleFileStream, "Convenience name for target.",
|
this->WriteMakeRule(ruleFileStream, "Convenience name for target.",
|
||||||
t->second.GetName(), depends, commands, true);
|
t->second.GetName(), depends, commands, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add a fast rule to build the target
|
||||||
|
std::string makefileName = this->GetRelativeTargetDirectory(t->second);
|
||||||
|
makefileName += "/build.make";
|
||||||
|
std::string makeTargetName = this->GetRelativeTargetDirectory(t->second);
|
||||||
|
makeTargetName += "/build";
|
||||||
|
localName = t->second.GetName();
|
||||||
|
localName += "/fast";
|
||||||
|
depends.clear();
|
||||||
|
commands.clear();
|
||||||
|
commands.push_back(this->GetRecursiveMakeCall
|
||||||
|
(makefileName.c_str(), makeTargetName.c_str()));
|
||||||
|
this->CreateCDCommand(commands,
|
||||||
|
this->Makefile->GetHomeOutputDirectory(),
|
||||||
|
this->Makefile->GetStartOutputDirectory());
|
||||||
|
this->WriteMakeRule(ruleFileStream, "fast build rule for target.",
|
||||||
|
localName.c_str(), depends, commands, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1481,8 +1498,7 @@ void cmLocalUnixMakefileGenerator3
|
||||||
this->Makefile->GetStartOutputDirectory());
|
this->Makefile->GetStartOutputDirectory());
|
||||||
this->WriteMakeRule(ruleFileStream, "Prepare targets for installation.",
|
this->WriteMakeRule(ruleFileStream, "Prepare targets for installation.",
|
||||||
"preinstall", depends, commands, true);
|
"preinstall", depends, commands, true);
|
||||||
commands.clear();
|
depends.clear();
|
||||||
depends.push_back("preinstall");
|
|
||||||
this->WriteMakeRule(ruleFileStream, "Prepare targets for installation.",
|
this->WriteMakeRule(ruleFileStream, "Prepare targets for installation.",
|
||||||
"preinstall/fast", depends, commands, true);
|
"preinstall/fast", depends, commands, true);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue