BUG: Add a space before the : only if the target name is one letter long. This works around bugs in some shells' tab completion of target names.
This commit is contained in:
parent
0d622ae9e8
commit
a2b8c1fbcb
|
@ -2585,9 +2585,16 @@ void cmLocalUnixMakefileGenerator::OutputMakeRule(std::ostream& fout,
|
||||||
|
|
||||||
std::string tgt = this->ConvertToRelativeOutputPath(replace.c_str());
|
std::string tgt = this->ConvertToRelativeOutputPath(replace.c_str());
|
||||||
tgt = this->ConvertToMakeTarget(tgt.c_str());
|
tgt = this->ConvertToMakeTarget(tgt.c_str());
|
||||||
|
const char* space = "";
|
||||||
|
if(tgt.size() == 1)
|
||||||
|
{
|
||||||
|
// Add a space before the ":" to avoid drive letter confusion on
|
||||||
|
// Windows.
|
||||||
|
space = " ";
|
||||||
|
}
|
||||||
if(depends.empty())
|
if(depends.empty())
|
||||||
{
|
{
|
||||||
fout << tgt.c_str() << " :\n";
|
fout << tgt.c_str() << space << ":\n";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2599,7 +2606,7 @@ void cmLocalUnixMakefileGenerator::OutputMakeRule(std::ostream& fout,
|
||||||
replace = *dep;
|
replace = *dep;
|
||||||
m_Makefile->ExpandVariablesInString(replace);
|
m_Makefile->ExpandVariablesInString(replace);
|
||||||
replace = this->ConvertToMakeTarget(replace.c_str());
|
replace = this->ConvertToMakeTarget(replace.c_str());
|
||||||
fout << tgt.c_str() << " : " << replace.c_str() << "\n";
|
fout << tgt.c_str() << space << ": " << replace.c_str() << "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue