cmGlobalUnixMakefileGenerator3: Host the include directive.

There is no sense in copying this to each cmLocalGenerator.
This commit is contained in:
Stephen Kelly 2015-05-16 05:18:39 +02:00
parent 24613d8b45
commit e9b134b95d
8 changed files with 10 additions and 15 deletions

View File

@ -22,6 +22,7 @@ cmGlobalBorlandMakefileGenerator::cmGlobalBorlandMakefileGenerator()
this->ToolSupportsColor = true; this->ToolSupportsColor = true;
this->UseLinkScript = false; this->UseLinkScript = false;
this->WindowsShell = true; this->WindowsShell = true;
this->IncludeDirective = "!include";
} }
@ -43,7 +44,6 @@ cmLocalGenerator *cmGlobalBorlandMakefileGenerator::CreateLocalGenerator(
{ {
cmLocalUnixMakefileGenerator3* lg = cmLocalUnixMakefileGenerator3* lg =
new cmLocalUnixMakefileGenerator3(this, parent); new cmLocalUnixMakefileGenerator3(this, parent);
lg->SetIncludeDirective("!include");
lg->SetDefineWindowsNULL(true); lg->SetDefineWindowsNULL(true);
lg->SetMakefileVariableSize(32); lg->SetMakefileVariableSize(32);
lg->SetPassMakeflags(true); lg->SetPassMakeflags(true);

View File

@ -33,6 +33,8 @@ cmGlobalUnixMakefileGenerator3::cmGlobalUnixMakefileGenerator3()
this->UseLinkScript = true; this->UseLinkScript = true;
#endif #endif
this->CommandDatabase = NULL; this->CommandDatabase = NULL;
this->IncludeDirective = "include";
} }
void cmGlobalUnixMakefileGenerator3 void cmGlobalUnixMakefileGenerator3

View File

@ -132,6 +132,8 @@ public:
virtual bool AllowDeleteOnError() const { return true; } virtual bool AllowDeleteOnError() const { return true; }
virtual void ComputeTargetObjectDirectory(cmGeneratorTarget* gt) const; virtual void ComputeTargetObjectDirectory(cmGeneratorTarget* gt) const;
std::string IncludeDirective;
protected: protected:
void WriteMainMakefile2(); void WriteMainMakefile2();
void WriteMainCMakefile(); void WriteMainCMakefile();

View File

@ -26,6 +26,7 @@ cmGlobalWatcomWMakeGenerator::cmGlobalWatcomWMakeGenerator()
this->WindowsShell = true; this->WindowsShell = true;
#endif #endif
this->WatcomWMake = true; this->WatcomWMake = true;
this->IncludeDirective = "!include";
} }
void cmGlobalWatcomWMakeGenerator void cmGlobalWatcomWMakeGenerator
@ -55,7 +56,6 @@ cmGlobalWatcomWMakeGenerator::CreateLocalGenerator(cmLocalGenerator* parent)
lg->SetIgnoreLibPrefix(true); lg->SetIgnoreLibPrefix(true);
lg->SetPassMakeflags(false); lg->SetPassMakeflags(false);
lg->SetUnixCD(false); lg->SetUnixCD(false);
lg->SetIncludeDirective("!include");
return lg; return lg;
} }

View File

@ -83,7 +83,6 @@ cmLocalUnixMakefileGenerator3::
cmLocalUnixMakefileGenerator3(cmGlobalGenerator* gg, cmLocalGenerator* parent) cmLocalUnixMakefileGenerator3(cmGlobalGenerator* gg, cmLocalGenerator* parent)
: cmLocalGenerator(gg, parent) : cmLocalGenerator(gg, parent)
{ {
this->IncludeDirective = "include";
this->MakefileVariableSize = 0; this->MakefileVariableSize = 0;
this->IgnoreLibPrefix = false; this->IgnoreLibPrefix = false;
this->PassMakeflags = false; this->PassMakeflags = false;

View File

@ -93,13 +93,6 @@ public:
*/ */
void SetUnixCD(bool v) {this->UnixCD = v;} void SetUnixCD(bool v) {this->UnixCD = v;}
/**
* Set the string used to include one makefile into another default
* is include.
*/
void SetIncludeDirective(const std::string& s)
{ this->IncludeDirective = s; }
/** /**
* Set max makefile variable size, default is 0 which means unlimited. * Set max makefile variable size, default is 0 which means unlimited.
*/ */
@ -302,7 +295,6 @@ private:
//========================================================================== //==========================================================================
// Configuration settings. // Configuration settings.
int MakefileVariableSize; int MakefileVariableSize;
std::string IncludeDirective;
std::string MakeSilentFlag; std::string MakeSilentFlag;
std::string ConfigurationName; std::string ConfigurationName;
bool DefineWindowsNULL; bool DefineWindowsNULL;

View File

@ -226,7 +226,7 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules()
dependFileNameFull += "/depend.make"; dependFileNameFull += "/depend.make";
*this->BuildFileStream *this->BuildFileStream
<< "# Include any dependencies generated for this target.\n" << "# Include any dependencies generated for this target.\n"
<< this->LocalGenerator->IncludeDirective << " " << root << this->GlobalGenerator->IncludeDirective << " " << root
<< this->Convert(dependFileNameFull, << this->Convert(dependFileNameFull,
cmLocalGenerator::HOME_OUTPUT, cmLocalGenerator::HOME_OUTPUT,
cmLocalGenerator::MAKERULE) cmLocalGenerator::MAKERULE)
@ -237,7 +237,7 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules()
// Include the progress variables for the target. // Include the progress variables for the target.
*this->BuildFileStream *this->BuildFileStream
<< "# Include the progress variables for this target.\n" << "# Include the progress variables for this target.\n"
<< this->LocalGenerator->IncludeDirective << " " << root << this->GlobalGenerator->IncludeDirective << " " << root
<< this->Convert(this->ProgressFileNameFull, << this->Convert(this->ProgressFileNameFull,
cmLocalGenerator::HOME_OUTPUT, cmLocalGenerator::HOME_OUTPUT,
cmLocalGenerator::MAKERULE) cmLocalGenerator::MAKERULE)
@ -270,7 +270,7 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules()
// Include the flags for the target. // Include the flags for the target.
*this->BuildFileStream *this->BuildFileStream
<< "# Include the compile flags for this target's objects.\n" << "# Include the compile flags for this target's objects.\n"
<< this->LocalGenerator->IncludeDirective << " " << root << this->GlobalGenerator->IncludeDirective << " " << root
<< this->Convert(this->FlagFileNameFull, << this->Convert(this->FlagFileNameFull,
cmLocalGenerator::HOME_OUTPUT, cmLocalGenerator::HOME_OUTPUT,
cmLocalGenerator::MAKERULE) cmLocalGenerator::MAKERULE)

View File

@ -51,7 +51,7 @@ void cmMakefileUtilityTargetGenerator::WriteRuleFiles()
// Include the progress variables for the target. // Include the progress variables for the target.
*this->BuildFileStream *this->BuildFileStream
<< "# Include the progress variables for this target.\n" << "# Include the progress variables for this target.\n"
<< this->LocalGenerator->IncludeDirective << " " << root << this->GlobalGenerator->IncludeDirective << " " << root
<< this->Convert(this->ProgressFileNameFull, << this->Convert(this->ProgressFileNameFull,
cmLocalGenerator::HOME_OUTPUT, cmLocalGenerator::HOME_OUTPUT,
cmLocalGenerator::MAKERULE) cmLocalGenerator::MAKERULE)