Fix problem with custom commands on unix
This commit is contained in:
parent
7fc1bd1281
commit
b26be30740
|
@ -1386,12 +1386,15 @@ void cmUnixMakefileGenerator::OutputCustomRules(std::ostream& fout)
|
||||||
tgt->second.GetCustomCommands().begin();
|
tgt->second.GetCustomCommands().begin();
|
||||||
cr != tgt->second.GetCustomCommands().end(); ++cr)
|
cr != tgt->second.GetCustomCommands().end(); ++cr)
|
||||||
{
|
{
|
||||||
cmSourceGroup& sourceGroup =
|
if ( cr->GetSourceName() != tgt->first )
|
||||||
m_Makefile->FindSourceGroup(cr->GetSourceName().c_str(),
|
{
|
||||||
sourceGroups);
|
cmSourceGroup& sourceGroup =
|
||||||
cmCustomCommand cc(*cr);
|
m_Makefile->FindSourceGroup(cr->GetSourceName().c_str(),
|
||||||
cc.ExpandVariables(*m_Makefile);
|
sourceGroups);
|
||||||
sourceGroup.AddCustomCommand(cc);
|
cmCustomCommand cc(*cr);
|
||||||
|
cc.ExpandVariables(*m_Makefile);
|
||||||
|
sourceGroup.AddCustomCommand(cc);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2044,7 +2047,9 @@ void cmUnixMakefileGenerator::OutputMakeRule(std::ostream& fout,
|
||||||
if(replace[0] != '-' && replace.find("echo") != 0
|
if(replace[0] != '-' && replace.find("echo") != 0
|
||||||
&& replace.find("$(MAKE)") != 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";
|
fout << "\t" << replace.c_str() << "\n";
|
||||||
}
|
}
|
||||||
|
@ -2055,7 +2060,9 @@ void cmUnixMakefileGenerator::OutputMakeRule(std::ostream& fout,
|
||||||
if(replace[0] != '-' && replace.find("echo") != 0
|
if(replace[0] != '-' && replace.find("echo") != 0
|
||||||
&& replace.find("$(MAKE)") != 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";
|
fout << "\t" << replace.c_str() << "\n";
|
||||||
}
|
}
|
||||||
|
@ -2066,7 +2073,9 @@ void cmUnixMakefileGenerator::OutputMakeRule(std::ostream& fout,
|
||||||
if(replace[0] != '-' && replace.find("echo") != 0
|
if(replace[0] != '-' && replace.find("echo") != 0
|
||||||
&& replace.find("$(MAKE)") != 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";
|
fout << "\t" << replace.c_str() << "\n";
|
||||||
}
|
}
|
||||||
|
@ -2077,7 +2086,9 @@ void cmUnixMakefileGenerator::OutputMakeRule(std::ostream& fout,
|
||||||
if(replace[0] != '-' && replace.find("echo") != 0
|
if(replace[0] != '-' && replace.find("echo") != 0
|
||||||
&& replace.find("$(MAKE)") != 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";
|
fout << "\t" << replace.c_str() << "\n";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue