Fix problem with custom commands on unix
This commit is contained in:
parent
7fc1bd1281
commit
b26be30740
@ -1386,6 +1386,8 @@ void cmUnixMakefileGenerator::OutputCustomRules(std::ostream& fout)
|
||||
tgt->second.GetCustomCommands().begin();
|
||||
cr != tgt->second.GetCustomCommands().end(); ++cr)
|
||||
{
|
||||
if ( cr->GetSourceName() != tgt->first )
|
||||
{
|
||||
cmSourceGroup& sourceGroup =
|
||||
m_Makefile->FindSourceGroup(cr->GetSourceName().c_str(),
|
||||
sourceGroups);
|
||||
@ -1394,6 +1396,7 @@ void cmUnixMakefileGenerator::OutputCustomRules(std::ostream& fout)
|
||||
sourceGroup.AddCustomCommand(cc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Loop through every source group.
|
||||
for(std::vector<cmSourceGroup>::const_iterator sg =
|
||||
@ -2044,7 +2047,9 @@ void cmUnixMakefileGenerator::OutputMakeRule(std::ostream& fout,
|
||||
if(replace[0] != '-' && replace.find("echo") != 0
|
||||
&& replace.find("$(MAKE)") != 0)
|
||||
{
|
||||
fout << "\t" << "echo \"" << replace.c_str() << "\"\n";
|
||||
std::string echostring = replace;
|
||||
cmSystemTools::ReplaceString(echostring, "\n", "\\n");
|
||||
fout << "\t" << "echo \"" << echostring.c_str() << "\"\n";
|
||||
}
|
||||
fout << "\t" << replace.c_str() << "\n";
|
||||
}
|
||||
@ -2055,7 +2060,9 @@ void cmUnixMakefileGenerator::OutputMakeRule(std::ostream& fout,
|
||||
if(replace[0] != '-' && replace.find("echo") != 0
|
||||
&& replace.find("$(MAKE)") != 0)
|
||||
{
|
||||
fout << "\t" << "echo \"" << replace.c_str() << "\"\n";
|
||||
std::string echostring = replace;
|
||||
cmSystemTools::ReplaceString(echostring, "\n", "\\n");
|
||||
fout << "\t" << "echo \"" << echostring.c_str() << "\"\n";
|
||||
}
|
||||
fout << "\t" << replace.c_str() << "\n";
|
||||
}
|
||||
@ -2066,7 +2073,9 @@ void cmUnixMakefileGenerator::OutputMakeRule(std::ostream& fout,
|
||||
if(replace[0] != '-' && replace.find("echo") != 0
|
||||
&& replace.find("$(MAKE)") != 0)
|
||||
{
|
||||
fout << "\t" << "echo \"" << replace.c_str() << "\"\n";
|
||||
std::string echostring = replace;
|
||||
cmSystemTools::ReplaceString(echostring, "\n", "\\n");
|
||||
fout << "\t" << "echo \"" << echostring.c_str() << "\"\n";
|
||||
}
|
||||
fout << "\t" << replace.c_str() << "\n";
|
||||
}
|
||||
@ -2077,7 +2086,9 @@ void cmUnixMakefileGenerator::OutputMakeRule(std::ostream& fout,
|
||||
if(replace[0] != '-' && replace.find("echo") != 0
|
||||
&& replace.find("$(MAKE)") != 0)
|
||||
{
|
||||
fout << "\t" << "echo \"" << replace.c_str() << "\"\n";
|
||||
std::string echostring = replace;
|
||||
cmSystemTools::ReplaceString(echostring, "\n", "\\n");
|
||||
fout << "\t" << "echo \"" << echostring.c_str() << "\"\n";
|
||||
}
|
||||
fout << "\t" << replace.c_str() << "\n";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user