summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/AutoGen/AutoGen.py
diff options
context:
space:
mode:
authorCarsey, Jaben <jaben.carsey@intel.com>2018-08-25 00:33:17 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2018-08-30 08:42:09 +0800
commit94c04559374df0d1cecea32114df7be6d5931db9 (patch)
treee5f3097fac277ed91a05c1a2d7d776d5627a2f43 /BaseTools/Source/Python/AutoGen/AutoGen.py
parent7c7c8190d30b8ea547921143a8b8b0e44b585d89 (diff)
downloadedk2-94c04559374df0d1cecea32114df7be6d5931db9.tar.gz
edk2-94c04559374df0d1cecea32114df7be6d5931db9.tar.bz2
edk2-94c04559374df0d1cecea32114df7be6d5931db9.zip
BaseTools: Create and use a shared value for 'MSFT' from DataType
I see lots of 'MSFT' throughout code and this can reduce them. Cc: Bob Feng <Bob.c.Feng@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/AutoGen/AutoGen.py')
-rw-r--r--BaseTools/Source/Python/AutoGen/AutoGen.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index 314a321e95..15365e7b1d 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -79,7 +79,7 @@ gEfiVarStoreNamePattern = re.compile("\s*name\s*=\s*(\w+)")
gEfiVarStoreGuidPattern = re.compile("\s*guid\s*=\s*({.*?{.*?}\s*})")
## Mapping Makefile type
-gMakeTypeMap = {"MSFT":"nmake", "GCC":"gmake"}
+gMakeTypeMap = {TAB_COMPILER_MSFT:"nmake", "GCC":"gmake"}
## Build rule configuration file
@@ -1842,7 +1842,7 @@ class PlatformAutoGen(AutoGen):
or not ToolDefinition[TAB_TOD_DEFINES_FAMILY][self.ToolChain]:
EdkLogger.verbose("No tool chain family found in configuration for %s. Default to MSFT." \
% self.ToolChain)
- self._ToolChainFamily = "MSFT"
+ self._ToolChainFamily = TAB_COMPILER_MSFT
else:
self._ToolChainFamily = ToolDefinition[TAB_TOD_DEFINES_FAMILY][self.ToolChain]
return self._ToolChainFamily
@@ -1855,7 +1855,7 @@ class PlatformAutoGen(AutoGen):
or not ToolDefinition[TAB_TOD_DEFINES_BUILDRULEFAMILY][self.ToolChain]:
EdkLogger.verbose("No tool chain family found in configuration for %s. Default to MSFT." \
% self.ToolChain)
- self._BuildRuleFamily = "MSFT"
+ self._BuildRuleFamily = TAB_COMPILER_MSFT
else:
self._BuildRuleFamily = ToolDefinition[TAB_TOD_DEFINES_BUILDRULEFAMILY][self.ToolChain]
return self._BuildRuleFamily
@@ -2977,7 +2977,7 @@ class ModuleAutoGen(AutoGen):
# Regular expression for finding Include Directories, the difference between MSFT and INTEL/GCC/RVCT
# is the former use /I , the Latter used -I to specify include directories
#
- if self.PlatformInfo.ToolChainFamily in ('MSFT'):
+ if self.PlatformInfo.ToolChainFamily in (TAB_COMPILER_MSFT):
BuildOptIncludeRegEx = gBuildOptIncludePatternMsft
elif self.PlatformInfo.ToolChainFamily in ('INTEL', 'GCC', 'RVCT'):
BuildOptIncludeRegEx = gBuildOptIncludePatternOther