]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/AutoGen/AutoGen.py
BaseTools: Create and use a shared value for 'MSFT' from DataType
[mirror_edk2.git] / BaseTools / Source / Python / AutoGen / AutoGen.py
index 314a321e95c6f02dfaf7846e1cf581a5e255d2d2..15365e7b1d744166347a6420322b6f7d6c847104 100644 (file)
@@ -79,7 +79,7 @@ gEfiVarStoreNamePattern = re.compile("\s*name\s*=\s*(\w+)")
 gEfiVarStoreGuidPattern = re.compile("\s*guid\s*=\s*({.*?{.*?}\s*})")\r
 \r
 ## Mapping Makefile type\r
-gMakeTypeMap = {"MSFT":"nmake", "GCC":"gmake"}\r
+gMakeTypeMap = {TAB_COMPILER_MSFT:"nmake", "GCC":"gmake"}\r
 \r
 \r
 ## Build rule configuration file\r
@@ -1842,7 +1842,7 @@ class PlatformAutoGen(AutoGen):
                or not ToolDefinition[TAB_TOD_DEFINES_FAMILY][self.ToolChain]:\r
                 EdkLogger.verbose("No tool chain family found in configuration for %s. Default to MSFT." \\r
                                    % self.ToolChain)\r
-                self._ToolChainFamily = "MSFT"\r
+                self._ToolChainFamily = TAB_COMPILER_MSFT\r
             else:\r
                 self._ToolChainFamily = ToolDefinition[TAB_TOD_DEFINES_FAMILY][self.ToolChain]\r
         return self._ToolChainFamily\r
@@ -1855,7 +1855,7 @@ class PlatformAutoGen(AutoGen):
                or not ToolDefinition[TAB_TOD_DEFINES_BUILDRULEFAMILY][self.ToolChain]:\r
                 EdkLogger.verbose("No tool chain family found in configuration for %s. Default to MSFT." \\r
                                    % self.ToolChain)\r
-                self._BuildRuleFamily = "MSFT"\r
+                self._BuildRuleFamily = TAB_COMPILER_MSFT\r
             else:\r
                 self._BuildRuleFamily = ToolDefinition[TAB_TOD_DEFINES_BUILDRULEFAMILY][self.ToolChain]\r
         return self._BuildRuleFamily\r
@@ -2977,7 +2977,7 @@ class ModuleAutoGen(AutoGen):
         # Regular expression for finding Include Directories, the difference between MSFT and INTEL/GCC/RVCT\r
         # is the former use /I , the Latter used -I to specify include directories\r
         #\r
-        if self.PlatformInfo.ToolChainFamily in ('MSFT'):\r
+        if self.PlatformInfo.ToolChainFamily in (TAB_COMPILER_MSFT):\r
             BuildOptIncludeRegEx = gBuildOptIncludePatternMsft\r
         elif self.PlatformInfo.ToolChainFamily in ('INTEL', 'GCC', 'RVCT'):\r
             BuildOptIncludeRegEx = gBuildOptIncludePatternOther\r