Browse Source

cmGlobalUnixMakefileGenerator3: Host the include directive.

There is no sense in copying this to each cmLocalGenerator.
Stephen Kelly 10 years ago
parent
commit
e9b134b95d

+ 1 - 1
Source/cmGlobalBorlandMakefileGenerator.cxx

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

+ 2 - 0
Source/cmGlobalUnixMakefileGenerator3.cxx

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

+ 2 - 0
Source/cmGlobalUnixMakefileGenerator3.h

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

+ 1 - 1
Source/cmGlobalWatcomWMakeGenerator.cxx

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

+ 0 - 1
Source/cmLocalUnixMakefileGenerator3.cxx

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

+ 0 - 8
Source/cmLocalUnixMakefileGenerator3.h

@@ -93,13 +93,6 @@ public:
    */
   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.
    */
@@ -302,7 +295,6 @@ private:
   //==========================================================================
   // Configuration settings.
   int MakefileVariableSize;
-  std::string IncludeDirective;
   std::string MakeSilentFlag;
   std::string ConfigurationName;
   bool DefineWindowsNULL;

+ 3 - 3
Source/cmMakefileTargetGenerator.cxx

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

+ 1 - 1
Source/cmMakefileUtilityTargetGenerator.cxx

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