From fb7c7675f5e10865de79dfa050413f53e975831f Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 13 Oct 2006 13:59:59 -0400 Subject: [PATCH] BUG: When using link scripts use native shell escapes instead of makefile shell escapes because the script is not interpreted by a make tool. --- Source/cmMakefileLibraryTargetGenerator.cxx | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index fa65215fe..dc7d37d34 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -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();