summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalUnixMakefileGenerator3.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-10-10 17:47:50 (GMT)
committerBrad King <brad.king@kitware.com>2006-10-10 17:47:50 (GMT)
commitf0c79a00309da0e3709284fa8d1de486b07a1c71 (patch)
tree155c330618e8668e5331e580c79addac50926d9c /Source/cmLocalUnixMakefileGenerator3.cxx
parentcdcbe2587ab3dba5b696e21f9a118ba8e89dfa71 (diff)
downloadCMake-f0c79a00309da0e3709284fa8d1de486b07a1c71.zip
CMake-f0c79a00309da0e3709284fa8d1de486b07a1c71.tar.gz
CMake-f0c79a00309da0e3709284fa8d1de486b07a1c71.tar.bz2
BUG: Avoid duplicate conversion to output path.
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator3.cxx')
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx25
1 files changed, 13 insertions, 12 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index db5d011..34fbc26 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -1465,10 +1465,11 @@ void cmLocalUnixMakefileGenerator3
std::vector<std::string> commands;
// Write the all rule.
- std::string dir = this->Makefile->GetStartOutputDirectory();
- dir += "/all";
+ std::string dir;
+ std::string recursiveTarget = this->Makefile->GetStartOutputDirectory();
+ recursiveTarget += "/all";
- dir = this->Convert(dir.c_str(),HOME_OUTPUT,MAKEFILE);
+ dir = this->Convert(recursiveTarget.c_str(),HOME_OUTPUT,MAKEFILE);
depends.push_back("cmake_check_build_system");
@@ -1487,7 +1488,7 @@ void cmLocalUnixMakefileGenerator3
std::string mf2Dir = cmake::GetCMakeFilesDirectoryPostSlash();
mf2Dir += "Makefile2";
commands.push_back(this->GetRecursiveMakeCall(mf2Dir.c_str(),
- dir.c_str()));
+ recursiveTarget.c_str()));
this->CreateCDCommand(commands,
this->Makefile->GetHomeOutputDirectory(),
this->Makefile->GetStartOutputDirectory());
@@ -1504,13 +1505,13 @@ void cmLocalUnixMakefileGenerator3
depends, commands, true);
// Write the clean rule.
- dir = this->Makefile->GetStartOutputDirectory();
- dir += "/clean";
- dir = this->Convert(dir.c_str(),HOME_OUTPUT,MAKEFILE);
+ recursiveTarget = this->Makefile->GetStartOutputDirectory();
+ recursiveTarget += "/clean";
+ dir = this->Convert(recursiveTarget.c_str(),HOME_OUTPUT,MAKEFILE);
commands.clear();
depends.clear();
commands.push_back(this->GetRecursiveMakeCall(mf2Dir.c_str(),
- dir.c_str()));
+ recursiveTarget.c_str()));
this->CreateCDCommand(commands,
this->Makefile->GetHomeOutputDirectory(),
this->Makefile->GetStartOutputDirectory());
@@ -1523,9 +1524,9 @@ void cmLocalUnixMakefileGenerator3
depends, commands, true);
// Write the preinstall rule.
- dir = this->Makefile->GetStartOutputDirectory();
- dir += "/preinstall";
- dir = this->Convert(dir.c_str(), HOME_OUTPUT,MAKEFILE);
+ recursiveTarget = this->Makefile->GetStartOutputDirectory();
+ recursiveTarget += "/preinstall";
+ dir = this->Convert(recursiveTarget.c_str(), HOME_OUTPUT,MAKEFILE);
commands.clear();
depends.clear();
const char* noall =
@@ -1541,7 +1542,7 @@ void cmLocalUnixMakefileGenerator3
depends.push_back("cmake_check_build_system");
}
commands.push_back
- (this->GetRecursiveMakeCall(mf2Dir.c_str(), dir.c_str()));
+ (this->GetRecursiveMakeCall(mf2Dir.c_str(), recursiveTarget.c_str()));
this->CreateCDCommand(commands,
this->Makefile->GetHomeOutputDirectory(),
this->Makefile->GetStartOutputDirectory());