BUG: When using link scripts use native shell escapes instead of makefile shell escapes because the script is not interpreted by a make tool.

This commit is contained in:
Brad King 2006-10-13 13:59:59 -04:00
parent 5330a03994
commit fb7c7675f5
1 changed files with 15 additions and 1 deletions

View File

@ -537,7 +537,21 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
objdir += this->Target->GetName();
objdir += ".dir";
vars.ObjectDir = objdir.c_str();
vars.Target = targetOutPathReal.c_str();
std::string targetLinkScriptPathReal;
if(useLinkScript)
{
// Paths in the link script are interpreted directly by the shell
// and not make.
targetLinkScriptPathReal =
this->Convert(targetFullPathReal.c_str(),
cmLocalGenerator::START_OUTPUT,
cmLocalGenerator::SHELL);
vars.Target = targetLinkScriptPathReal.c_str();
}
else
{
vars.Target = targetOutPathReal.c_str();
}
std::string linkString = linklibs.str();
vars.LinkLibraries = linkString.c_str();
vars.ObjectsQuoted = buildObjs.c_str();