cmGlobalUnixMakefileGenerator3: Host the UnixCD.

This commit is contained in:
Stephen Kelly 2015-05-16 05:21:24 +02:00
parent a97df5e135
commit 333c1fa83b
8 changed files with 9 additions and 13 deletions

View File

@ -25,6 +25,7 @@ cmGlobalBorlandMakefileGenerator::cmGlobalBorlandMakefileGenerator()
this->IncludeDirective = "!include"; this->IncludeDirective = "!include";
this->DefineWindowsNULL = true; this->DefineWindowsNULL = true;
this->PassMakeflags = true; this->PassMakeflags = true;
this->UnixCD = false;
} }
@ -47,7 +48,6 @@ cmLocalGenerator *cmGlobalBorlandMakefileGenerator::CreateLocalGenerator(
cmLocalUnixMakefileGenerator3* lg = cmLocalUnixMakefileGenerator3* lg =
new cmLocalUnixMakefileGenerator3(this, parent); new cmLocalUnixMakefileGenerator3(this, parent);
lg->SetMakefileVariableSize(32); lg->SetMakefileVariableSize(32);
lg->SetUnixCD(false);
lg->SetMakeCommandEscapeTargetTwice(true); lg->SetMakeCommandEscapeTargetTwice(true);
lg->SetBorlandMakeCurlyHack(true); lg->SetBorlandMakeCurlyHack(true);
return lg; return lg;

View File

@ -23,6 +23,7 @@ cmGlobalJOMMakefileGenerator::cmGlobalJOMMakefileGenerator()
this->NMake = true; this->NMake = true;
this->DefineWindowsNULL = true; this->DefineWindowsNULL = true;
this->PassMakeflags = true; this->PassMakeflags = true;
this->UnixCD = false;
} }
void cmGlobalJOMMakefileGenerator void cmGlobalJOMMakefileGenerator
@ -56,7 +57,6 @@ cmGlobalJOMMakefileGenerator::CreateLocalGenerator(cmLocalGenerator* parent)
= new cmLocalUnixMakefileGenerator3(this, parent); = new cmLocalUnixMakefileGenerator3(this, parent);
lg->SetMakeSilentFlag("/nologo"); lg->SetMakeSilentFlag("/nologo");
lg->SetIgnoreLibPrefix(true); lg->SetIgnoreLibPrefix(true);
lg->SetUnixCD(false);
return lg; return lg;
} }

View File

@ -23,6 +23,7 @@ cmGlobalNMakeMakefileGenerator::cmGlobalNMakeMakefileGenerator()
this->NMake = true; this->NMake = true;
this->DefineWindowsNULL = true; this->DefineWindowsNULL = true;
this->PassMakeflags = true; this->PassMakeflags = true;
this->UnixCD = false;
} }
void cmGlobalNMakeMakefileGenerator void cmGlobalNMakeMakefileGenerator
@ -56,7 +57,6 @@ cmGlobalNMakeMakefileGenerator::CreateLocalGenerator(cmLocalGenerator* parent)
new cmLocalUnixMakefileGenerator3(this, parent); new cmLocalUnixMakefileGenerator3(this, parent);
lg->SetMakeSilentFlag("/nologo"); lg->SetMakeSilentFlag("/nologo");
lg->SetIgnoreLibPrefix(true); lg->SetIgnoreLibPrefix(true);
lg->SetUnixCD(false);
return lg; return lg;
} }

View File

@ -37,6 +37,7 @@ cmGlobalUnixMakefileGenerator3::cmGlobalUnixMakefileGenerator3()
this->IncludeDirective = "include"; this->IncludeDirective = "include";
this->DefineWindowsNULL = false; this->DefineWindowsNULL = false;
this->PassMakeflags = false; this->PassMakeflags = false;
this->UnixCD = true;
} }
void cmGlobalUnixMakefileGenerator3 void cmGlobalUnixMakefileGenerator3

View File

@ -136,6 +136,7 @@ public:
std::string IncludeDirective; std::string IncludeDirective;
bool DefineWindowsNULL; bool DefineWindowsNULL;
bool PassMakeflags; bool PassMakeflags;
bool UnixCD;
protected: protected:
void WriteMainMakefile2(); void WriteMainMakefile2();
void WriteMainCMakefile(); void WriteMainCMakefile();

View File

@ -28,6 +28,7 @@ cmGlobalWatcomWMakeGenerator::cmGlobalWatcomWMakeGenerator()
this->WatcomWMake = true; this->WatcomWMake = true;
this->IncludeDirective = "!include"; this->IncludeDirective = "!include";
this->DefineWindowsNULL = true; this->DefineWindowsNULL = true;
this->UnixCD = false;
} }
void cmGlobalWatcomWMakeGenerator void cmGlobalWatcomWMakeGenerator
@ -54,7 +55,6 @@ cmGlobalWatcomWMakeGenerator::CreateLocalGenerator(cmLocalGenerator* parent)
= new cmLocalUnixMakefileGenerator3(this, parent); = new cmLocalUnixMakefileGenerator3(this, parent);
lg->SetMakeSilentFlag("-h"); lg->SetMakeSilentFlag("-h");
lg->SetIgnoreLibPrefix(true); lg->SetIgnoreLibPrefix(true);
lg->SetUnixCD(false);
return lg; return lg;
} }

View File

@ -85,7 +85,6 @@ cmLocalUnixMakefileGenerator3(cmGlobalGenerator* gg, cmLocalGenerator* parent)
{ {
this->MakefileVariableSize = 0; this->MakefileVariableSize = 0;
this->IgnoreLibPrefix = false; this->IgnoreLibPrefix = false;
this->UnixCD = true;
this->ColorMakefile = false; this->ColorMakefile = false;
this->SkipPreprocessedSourceRules = false; this->SkipPreprocessedSourceRules = false;
this->SkipAssemblySourceRules = false; this->SkipAssemblySourceRules = false;
@ -2347,7 +2346,9 @@ void cmLocalUnixMakefileGenerator3
// support changing the drive letter with just "d:"). // support changing the drive letter with just "d:").
const char* cd_cmd = this->IsMinGWMake() ? "cd /d " : "cd "; const char* cd_cmd = this->IsMinGWMake() ? "cd /d " : "cd ";
if(!this->UnixCD) cmGlobalUnixMakefileGenerator3* gg =
static_cast<cmGlobalUnixMakefileGenerator3*>(this->GlobalGenerator);
if(!gg->UnixCD)
{ {
// On Windows we must perform each step separately and then change // On Windows we must perform each step separately and then change
// back because the shell keeps the working directory between // back because the shell keeps the working directory between

View File

@ -72,12 +72,6 @@ public:
void SetMakeSilentFlag(const std::string& s) { this->MakeSilentFlag = s; } void SetMakeSilentFlag(const std::string& s) { this->MakeSilentFlag = s; }
std::string &GetMakeSilentFlag() { return this->MakeSilentFlag; } std::string &GetMakeSilentFlag() { return this->MakeSilentFlag; }
/**
* If set to true, cd dir && command is used to
* run commands in a different directory.
*/
void SetUnixCD(bool v) {this->UnixCD = v;}
/** /**
* Set max makefile variable size, default is 0 which means unlimited. * Set max makefile variable size, default is 0 which means unlimited.
*/ */
@ -282,7 +276,6 @@ private:
int MakefileVariableSize; int MakefileVariableSize;
std::string MakeSilentFlag; std::string MakeSilentFlag;
std::string ConfigurationName; std::string ConfigurationName;
bool UnixCD;
bool MakeCommandEscapeTargetTwice; bool MakeCommandEscapeTargetTwice;
bool BorlandMakeCurlyHack; bool BorlandMakeCurlyHack;
//========================================================================== //==========================================================================