]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/Common/GlobalData.py
BaseTools: add GUID pattern to global data
[mirror_edk2.git] / BaseTools / Source / Python / Common / GlobalData.py
index 4234bf5f955ff9154a6305e7f7e941ed77349a25..4a85a8e0db63ccf5d26055bc012d0d657abbd156 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # This file is used to define common static strings used by INF/DEC/DSC files\r
 #\r
-# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
@@ -23,6 +23,8 @@ gEcpSource = "EdkCompatibilityPkg"
 gOptions = None\r
 gCaseInsensitive = False\r
 gAllFiles = None\r
+gCommand = None\r
+gSKUID_CMD = None\r
 \r
 gGlobalDefines = {}\r
 gPlatformDefines = {}\r
@@ -34,17 +36,28 @@ gActivePlatform = None
 gCommandLineDefines = {}\r
 gEdkGlobal = {}\r
 gOverrideDir = {}\r
-\r
+gCommandMaxLength = 4096\r
 # for debug trace purpose when problem occurs\r
 gProcessingFile = ''\r
 gBuildingModule = ''\r
+gSkuids = []\r
+gDefaultStores = []\r
+\r
+# definition for a MACRO name.  used to create regular expressions below.\r
+_MacroNamePattern = "[A-Z][A-Z0-9_]*"\r
 \r
 ## Regular expression for matching macro used in DSC/DEC/INF file inclusion\r
-gMacroRefPattern = re.compile("\$\(([A-Z][_A-Z0-9]*)\)", re.UNICODE)\r
+gMacroRefPattern = re.compile("\$\(({})\)".format(_MacroNamePattern), re.UNICODE)\r
 gMacroDefPattern = re.compile("^(DEFINE|EDK_GLOBAL)[ \t]+")\r
-gMacroNamePattern = re.compile("^[A-Z][A-Z0-9_]*$")\r
-# C-style wide string pattern\r
-gWideStringPattern = re.compile('(\W|\A)L"')\r
+gMacroNamePattern = re.compile("^{}$".format(_MacroNamePattern))\r
+\r
+# definition for a GUID.  used to create regular expressions below.\r
+_GuidPattern = r"[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}"\r
+\r
+## Regular expressions for GUID matching\r
+gGuidPattern = re.compile(r'{}'.format(_GuidPattern))\r
+gGuidPatternEnd = re.compile(r'{}$'.format(_GuidPattern))\r
+\r
 #\r
 # A global variable for whether current build in AutoGen phase or not.\r
 #\r
@@ -55,6 +68,7 @@ gAutoGenPhase = False
 #\r
 gConfDirectory = ''\r
 \r
+gBuildDirectory = ''\r
 #\r
 # The relative default database file path\r
 #\r
@@ -78,3 +92,22 @@ gFdfParser = None
 gTempInfs = []\r
 \r
 BuildOptionPcd = []\r
+\r
+#\r
+# Mixed PCD name dict\r
+#\r
+MixedPcd = {}\r
+\r
+# Structure Pcd dict\r
+gStructurePcd = {}\r
+\r
+# Pcd name for the Pcd which used in the Conditional directives\r
+gConditionalPcds = []\r
+\r
+gUseHashCache = None\r
+gBinCacheDest = None\r
+gBinCacheSource = None\r
+gPlatformHash = None\r
+gPackageHash = {}\r
+gModuleHash = {}\r
+gEnableGenfdsMultiThread = False\r