BUG: Fixed implementation of long dependency list support. The proxy target must have a corresponding file to work correctly. Instead of using a proxy target, we now just list one line for each dependency and then print one copy of the build rule at the end.
This commit is contained in:
parent
75b3751a4f
commit
df2280a7ab
|
@ -2802,35 +2802,24 @@ void cmLocalUnixMakefileGenerator::OutputMakeRule(std::ostream& fout,
|
||||||
replace = target;
|
replace = target;
|
||||||
m_Makefile->ExpandVariablesInString(replace);
|
m_Makefile->ExpandVariablesInString(replace);
|
||||||
|
|
||||||
if(depends.size() > 1)
|
std::string tgt = cmSystemTools::ConvertToOutputPath(replace.c_str());
|
||||||
|
if(depends.empty())
|
||||||
{
|
{
|
||||||
// Create a proxy target collecting all the dependencies. This
|
fout << tgt.c_str() << ":\n";
|
||||||
// allows for very long dependency lists.
|
|
||||||
std::string tgt = cmSystemTools::ConvertToOutputPath(replace.c_str());
|
|
||||||
for(std::vector<std::string>::const_iterator dep = depends.begin();
|
|
||||||
dep != depends.end(); ++dep)
|
|
||||||
{
|
|
||||||
replace = *dep;
|
|
||||||
m_Makefile->ExpandVariablesInString(replace);
|
|
||||||
fout << tgt.c_str() << ".dependency_list:: " << replace.c_str() << "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
// Forward dependencies through the proxy target.
|
|
||||||
fout << tgt.c_str() << ": " << tgt.c_str() << ".dependency_list\n";
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fout << cmSystemTools::ConvertToOutputPath(replace.c_str()) << ":";
|
// Split dependencies into multiple rule lines. This allows for
|
||||||
|
// very long dependency lists.
|
||||||
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;
|
||||||
m_Makefile->ExpandVariablesInString(replace);
|
m_Makefile->ExpandVariablesInString(replace);
|
||||||
fout << " " << replace.c_str();
|
fout << tgt.c_str() << ": " << replace.c_str() << "\n";
|
||||||
}
|
}
|
||||||
fout << "\n";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
for (std::vector<std::string>::const_iterator i = commands.begin();
|
for (std::vector<std::string>::const_iterator i = commands.begin();
|
||||||
i != commands.end(); ++i)
|
i != commands.end(); ++i)
|
||||||
|
|
Loading…
Reference in New Issue