From 3e0817eb55f087a60d0676b5bb95fa0a0be62196 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Thu, 1 Apr 2004 09:59:46 -0500 Subject: [PATCH] BUG: fix non relative paths --- Source/cmLocalUnixMakefileGenerator.cxx | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/Source/cmLocalUnixMakefileGenerator.cxx b/Source/cmLocalUnixMakefileGenerator.cxx index 7c90bc858..5cb89d395 100644 --- a/Source/cmLocalUnixMakefileGenerator.cxx +++ b/Source/cmLocalUnixMakefileGenerator.cxx @@ -1367,16 +1367,22 @@ void cmLocalUnixMakefileGenerator::OutputExecutableRule(std::ostream& fout, target += name; target += cmSystemTools::GetExecutableExtension(); target = this->ConvertToRelativeOutputPath(target.c_str()); - cmSystemTools::ConvertToUnixSlashes(target); bool needsLocalTarget = false; - std::string tgt = this->ConvertToMakeTarget(target.c_str()); - if(tgt.find('/', 0) != tgt.npos) + if(m_UseRelativePaths) + { + cmSystemTools::ConvertToUnixSlashes(target); + bool needsLocalTarget = false; + std::string tgt = this->ConvertToMakeTarget(target.c_str()); + if(tgt.find('/', 0) != tgt.npos) + { + needsLocalTarget = true; + } + target = cmSystemTools::ConvertToOutputPath(target.c_str()); + } + else { needsLocalTarget = true; } - target = cmSystemTools::ConvertToOutputPath(target.c_str()); - - std::string objs = "$(" + this->CreateMakeVariable(name, "_SRC_OBJS") + ") "; std::string depend = "$("; depend += this->CreateMakeVariable(name, "_SRC_OBJS")