summaryrefslogtreecommitdiff
path: root/Source/cmLocalUnixMakefileGenerator3.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2006-01-30 13:57:01 -0500
committerKen Martin <ken.martin@kitware.com>2006-01-30 13:57:01 -0500
commit5d35fd4b7ea9699fd114c2176c66fa2c484ec5af (patch)
tree550f76b573f00dc68663ee25d0f087efebe33d2d /Source/cmLocalUnixMakefileGenerator3.cxx
parent8c77bb3cf36658d8edeb09ddda9f28fcb47a17e6 (diff)
downloadcmake-5d35fd4b7ea9699fd114c2176c66fa2c484ec5af.tar.gz
ENH: cleanup and remove some old code
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator3.cxx')
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx67
1 files changed, 15 insertions, 52 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 5b15e968ac..ec82003d9c 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -2184,41 +2184,6 @@ cmLocalUnixMakefileGenerator3::GetRelativeTargetDirectory(cmTarget& target)
//----------------------------------------------------------------------------
std::string
cmLocalUnixMakefileGenerator3
-::GetSubdirTargetName(const char* pass, const char* subdir)
-{
- // Convert the subdirectory name to a relative path to keep it short.
- std::string reldir = this->Convert(subdir,START_OUTPUT);
-
- // Convert the subdirectory name to a valid make target name.
- std::string s = pass;
- s += "_";
- s += reldir;
-
- // Replace "../" with 3 underscores. This allows one .. at the beginning.
- size_t pos = s.find("../");
- if(pos != std::string::npos)
- {
- s.replace(pos, 3, "___");
- }
-
- // Replace "/" directory separators with a single underscore.
- while((pos = s.find('/')) != std::string::npos)
- {
- s.replace(pos, 1, "_");
- }
-
- // Replace ":" drive specifier with a single underscore
- while((pos = s.find(':')) != std::string::npos)
- {
- s.replace(pos, 1, "_");
- }
-
- return s;
-}
-
-//----------------------------------------------------------------------------
-std::string
-cmLocalUnixMakefileGenerator3
::GetObjectFileName(cmTarget& target,
const cmSourceFile& source,
std::string* nameWithoutTargetDir)
@@ -2969,7 +2934,11 @@ void cmLocalUnixMakefileGenerator3
dir = "all";
depends.push_back("cmake_check_build_system");
}
- this->CreateJumpCommand(commands,"CMakeFiles/Makefile2",dir);
+ commands.push_back(this->GetRecursiveMakeCall
+ ("CMakeFiles/Makefile2",dir.c_str()));
+ this->CreateCDCommand(commands,
+ m_Makefile->GetHomeOutputDirectory(),
+ m_Makefile->GetStartOutputDirectory());
this->WriteMakeRule(ruleFileStream, "The main all target", "all", depends, commands);
// Write the clean rule.
@@ -2982,7 +2951,11 @@ void cmLocalUnixMakefileGenerator3
{
depends.push_back(sym);
}
- this->CreateJumpCommand(commands,"CMakeFiles/Makefile2",dir);
+ commands.push_back(this->GetRecursiveMakeCall
+ ("CMakeFiles/Makefile2",dir.c_str()));
+ this->CreateCDCommand(commands,
+ m_Makefile->GetHomeOutputDirectory(),
+ m_Makefile->GetStartOutputDirectory());
this->WriteMakeRule(ruleFileStream, "The main clean target", "clean", depends, commands);
// write the depend rule, really a recompute depends rule
@@ -3065,7 +3038,11 @@ void cmLocalUnixMakefileGenerator3::WriteLocalMakefile()
tgtMakefileName += "/build.make";
targetName += "/";
targetName += lo->first.c_str();
- this->CreateJumpCommand(commands,tgtMakefileName.c_str(),targetName);
+ commands.push_back(this->GetRecursiveMakeCall
+ (tgtMakefileName.c_str(),targetName.c_str()));
+ this->CreateCDCommand(commands,
+ m_Makefile->GetHomeOutputDirectory(),
+ m_Makefile->GetStartOutputDirectory());
}
this->WriteMakeRule(ruleFileStream,
"target for object file",
@@ -3179,20 +3156,6 @@ void cmLocalUnixMakefileGenerator3
}
}
-void cmLocalUnixMakefileGenerator3
-::CreateJumpCommand(std::vector<std::string>& commands,
- const char *MakefileName,
- std::string& localName)
-{
- // Build the target for this pass.
- commands.push_back(this->GetRecursiveMakeCall
- (MakefileName,localName.c_str()));
-
- this->CreateCDCommand(commands,
- m_Makefile->GetHomeOutputDirectory(),
- m_Makefile->GetStartOutputDirectory());
-}
-
//----------------------------------------------------------------------------
void cmLocalUnixMakefileGenerator3::CheckDependencies(cmMakefile* mf,
bool verbose,