From 4089c768900c10d55b9b58c5bca7242db18ed664 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 8 Mar 2007 10:31:03 -0500 Subject: BUG: Some calls to Convert() were converting for MAKEFILE but then passing the output to the build shell. The calls have now been converted to call Convert() with SHELL. --- Source/cmLocalGenerator.cxx | 2 +- Source/cmMakefileExecutableTargetGenerator.cxx | 6 +++--- Source/cmMakefileLibraryTargetGenerator.cxx | 28 +++++++------------------- Source/cmMakefileTargetGenerator.cxx | 2 +- 4 files changed, 12 insertions(+), 26 deletions(-) diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 7a6fe86..8184a8e 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1320,7 +1320,7 @@ void cmLocalGenerator::GetTargetFlags(std::string& linkLibs, linkFlags += this->Makefile->GetSafeDefinition("CMAKE_LINK_DEF_FILE_FLAG"); linkFlags += this->Convert((*i)->GetFullPath().c_str(), - START_OUTPUT,MAKEFILE); + START_OUTPUT, SHELL); linkFlags += " "; } } diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index 5026834..c59ec76 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -192,16 +192,16 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) std::string targetOutPathPDB = this->Convert(targetFullPathPDB.c_str(), cmLocalGenerator::FULL, - cmLocalGenerator::MAKEFILE); + cmLocalGenerator::SHELL); // Convert to the output path to use in constructing commands. std::string targetOutPath = this->Convert(targetFullPath.c_str(), cmLocalGenerator::START_OUTPUT, - cmLocalGenerator::MAKEFILE); + cmLocalGenerator::SHELL); std::string targetOutPathReal = this->Convert(targetFullPathReal.c_str(), cmLocalGenerator::START_OUTPUT, - cmLocalGenerator::MAKEFILE); + cmLocalGenerator::SHELL); // Get the language to use for linking this executable. const char* linkLanguage = diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index 6f6ab2e..17c2fab 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -148,7 +148,7 @@ void cmMakefileLibraryTargetGenerator::WriteSharedLibraryRules(bool relink) extraFlags += this->Convert((*i)->GetFullPath().c_str(), cmLocalGenerator::START_OUTPUT, - cmLocalGenerator::MAKEFILE); + cmLocalGenerator::SHELL); } } } @@ -269,19 +269,19 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules // arguments. std::string targetOutPathPDB = this->Convert(targetFullPathPDB.c_str(),cmLocalGenerator::FULL, - cmLocalGenerator::MAKEFILE); + cmLocalGenerator::SHELL); std::string targetOutPath = this->Convert(targetFullPath.c_str(),cmLocalGenerator::START_OUTPUT, - cmLocalGenerator::MAKEFILE); + cmLocalGenerator::SHELL); std::string targetOutPathSO = this->Convert(targetFullPathSO.c_str(),cmLocalGenerator::START_OUTPUT, - cmLocalGenerator::MAKEFILE); + cmLocalGenerator::SHELL); std::string targetOutPathReal = this->Convert(targetFullPathReal.c_str(),cmLocalGenerator::START_OUTPUT, - cmLocalGenerator::MAKEFILE); + cmLocalGenerator::SHELL); std::string targetOutPathImport = this->Convert(targetFullPathImport.c_str(),cmLocalGenerator::START_OUTPUT, - cmLocalGenerator::MAKEFILE); + cmLocalGenerator::SHELL); // Add the link message. std::string buildEcho = "Linking "; @@ -566,21 +566,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules objdir += this->Target->GetName(); objdir += ".dir"; vars.ObjectDir = objdir.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(); - } + vars.Target = targetOutPathReal.c_str(); std::string linkString = linklibs.str(); vars.LinkLibraries = linkString.c_str(); vars.ObjectsQuoted = buildObjs.c_str(); diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 125f348..50f9e12 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -480,7 +480,7 @@ cmMakefileTargetGenerator } targetOutPathPDB = this->Convert(targetFullPathPDB.c_str(),cmLocalGenerator::FULL, - cmLocalGenerator::MAKEFILE); + cmLocalGenerator::SHELL); } cmLocalGenerator::RuleVariables vars; vars.Language = lang; -- cgit v0.12