From 94c04559374df0d1cecea32114df7be6d5931db9 Mon Sep 17 00:00:00 2001 From: "Carsey, Jaben" Date: Sat, 25 Aug 2018 00:33:17 +0800 Subject: 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 Cc: Yonghong Zhu Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey Reviewed-by: Yonghong Zhu --- BaseTools/Source/Python/AutoGen/BuildEngine.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'BaseTools/Source/Python/AutoGen/BuildEngine.py') diff --git a/BaseTools/Source/Python/AutoGen/BuildEngine.py b/BaseTools/Source/Python/AutoGen/BuildEngine.py index 4291da9001..ac7a668755 100644 --- a/BaseTools/Source/Python/AutoGen/BuildEngine.py +++ b/BaseTools/Source/Python/AutoGen/BuildEngine.py @@ -318,7 +318,7 @@ class BuildRule: # @param LineIndex The line number from which the parsing will begin # @param SupportedFamily The list of supported tool chain families # - def __init__(self, File=None, Content=None, LineIndex=0, SupportedFamily=["MSFT", "INTEL", "GCC", "RVCT"]): + def __init__(self, File=None, Content=None, LineIndex=0, SupportedFamily=[TAB_COMPILER_MSFT, "INTEL", "GCC", "RVCT"]): self.RuleFile = File # Read build rules from file if it's not none if File is not None: @@ -596,17 +596,17 @@ if __name__ == '__main__': EdkLogger.Initialize() if len(sys.argv) > 1: Br = BuildRule(sys.argv[1]) - print(str(Br[".c", SUP_MODULE_DXE_DRIVER, "IA32", "MSFT"][1])) + print(str(Br[".c", SUP_MODULE_DXE_DRIVER, "IA32", TAB_COMPILER_MSFT][1])) print() print(str(Br[".c", SUP_MODULE_DXE_DRIVER, "IA32", "INTEL"][1])) print() print(str(Br[".c", SUP_MODULE_DXE_DRIVER, "IA32", "GCC"][1])) print() - print(str(Br[".ac", "ACPI_TABLE", "IA32", "MSFT"][1])) + print(str(Br[".ac", "ACPI_TABLE", "IA32", TAB_COMPILER_MSFT][1])) print() print(str(Br[".h", "ACPI_TABLE", "IA32", "INTEL"][1])) print() - print(str(Br[".ac", "ACPI_TABLE", "IA32", "MSFT"][1])) + print(str(Br[".ac", "ACPI_TABLE", "IA32", TAB_COMPILER_MSFT][1])) print() print(str(Br[".s", SUP_MODULE_SEC, "IPF", "COMMON"][1])) print() -- cgit v1.2.3