BaseTools: use predefined constants instead of local strings

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@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>
This commit is contained in:
Carsey, Jaben
2018-04-16 21:52:13 +08:00
committed by Yonghong Zhu
parent 5a693b89a1
commit 55c84777ee
17 changed files with 177 additions and 168 deletions

View File

@@ -130,7 +130,7 @@ class GenFdsGlobalVariable:
@staticmethod
def GetBuildRules(Inf, Arch):
if not Arch:
Arch = 'COMMON'
Arch = DataType.TAB_COMMON
if not Arch in GenFdsGlobalVariable.OutputDirDict:
return {}
@@ -217,7 +217,7 @@ class GenFdsGlobalVariable:
FileList.append((File, DataType.TAB_UNKNOWN_FILE))
for File in Inf.Binaries:
if File.Target in ['COMMON', '*', GenFdsGlobalVariable.TargetName]:
if File.Target in [DataType.TAB_COMMON, '*', GenFdsGlobalVariable.TargetName]:
FileList.append((File, File.Type))
for File, FileType in FileList:
@@ -759,7 +759,7 @@ class GenFdsGlobalVariable:
# @param Str String that may contain macro
# @param MacroDict Dictionary that contains macro value pair
#
def MacroExtend (Str, MacroDict={}, Arch='COMMON'):
def MacroExtend (Str, MacroDict={}, Arch=DataType.TAB_COMMON):
if Str is None :
return None
@@ -771,7 +771,7 @@ class GenFdsGlobalVariable:
'$(SPACE)' : ' '
}
OutputDir = GenFdsGlobalVariable.OutputDirFromDscDict[GenFdsGlobalVariable.ArchList[0]]
if Arch != 'COMMON' and Arch in GenFdsGlobalVariable.ArchList:
if Arch != DataType.TAB_COMMON and Arch in GenFdsGlobalVariable.ArchList:
OutputDir = GenFdsGlobalVariable.OutputDirFromDscDict[Arch]
Dict['$(OUTPUT_DIRECTORY)'] = OutputDir