]>
Commit | Line | Data |
---|---|---|
f51461c8 LG |
1 | ## @file\r |
2 | # This file is used to define common static strings used by INF/DEC/DSC files\r | |
3 | #\r | |
0f17c9fe | 4 | # Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r |
2e351cbe | 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent\r |
f51461c8 LG |
6 | \r |
7 | import re\r | |
8 | \r | |
9 | gIsWindows = None\r | |
f51461c8 | 10 | gWorkspace = "."\r |
f51461c8 LG |
11 | gOptions = None\r |
12 | gCaseInsensitive = False\r | |
13 | gAllFiles = None\r | |
f0dc69e6 | 14 | gCommand = None\r |
e651d06c | 15 | gSKUID_CMD = None\r |
f51461c8 LG |
16 | \r |
17 | gGlobalDefines = {}\r | |
18 | gPlatformDefines = {}\r | |
19 | # PCD name and value pair for fixed at build and feature flag\r | |
20 | gPlatformPcds = {}\r | |
bf9230a9 | 21 | gPlatformFinalPcds = {}\r |
f51461c8 LG |
22 | # PCDs with type that are not fixed at build and feature flag\r |
23 | gPlatformOtherPcds = {}\r | |
24 | gActivePlatform = None\r | |
25 | gCommandLineDefines = {}\r | |
26 | gEdkGlobal = {}\r | |
725cdb8f | 27 | gCommandMaxLength = 4096\r |
f51461c8 LG |
28 | # for debug trace purpose when problem occurs\r |
29 | gProcessingFile = ''\r | |
30 | gBuildingModule = ''\r | |
e651d06c LG |
31 | gSkuids = []\r |
32 | gDefaultStores = []\r | |
d35773d5 | 33 | gGuidDict = {}\r |
f51461c8 | 34 | \r |
0f17c9fe CJ |
35 | # definition for a MACRO name. used to create regular expressions below.\r |
36 | _MacroNamePattern = "[A-Z][A-Z0-9_]*"\r | |
37 | \r | |
f51461c8 | 38 | ## Regular expression for matching macro used in DSC/DEC/INF file inclusion\r |
0f17c9fe | 39 | gMacroRefPattern = re.compile("\$\(({})\)".format(_MacroNamePattern), re.UNICODE)\r |
f51461c8 | 40 | gMacroDefPattern = re.compile("^(DEFINE|EDK_GLOBAL)[ \t]+")\r |
0f17c9fe | 41 | gMacroNamePattern = re.compile("^{}$".format(_MacroNamePattern))\r |
7878f706 | 42 | \r |
cd67d664 | 43 | # definition for a GUID. used to create regular expressions below.\r |
256e2d88 CJ |
44 | _HexChar = r"[0-9a-fA-F]"\r |
45 | _GuidPattern = r"{Hex}{{8}}-{Hex}{{4}}-{Hex}{{4}}-{Hex}{{4}}-{Hex}{{12}}".format(Hex=_HexChar)\r | |
cd67d664 CJ |
46 | \r |
47 | ## Regular expressions for GUID matching\r | |
48 | gGuidPattern = re.compile(r'{}'.format(_GuidPattern))\r | |
49 | gGuidPatternEnd = re.compile(r'{}$'.format(_GuidPattern))\r | |
50 | \r | |
0760ed06 | 51 | ## Regular expressions for HEX matching\r |
9e7790a3 | 52 | g4HexChar = re.compile(r'{}{{4}}'.format(_HexChar))\r |
0760ed06 | 53 | gHexPattern = re.compile(r'0[xX]{}+'.format(_HexChar))\r |
6553c617 | 54 | gHexPatternAll = re.compile(r'0[xX]{}+$'.format(_HexChar))\r |
9e7790a3 | 55 | \r |
7da06eee CJ |
56 | ## Regular expressions for string identifier checking\r |
57 | gIdentifierPattern = re.compile('^[a-zA-Z][a-zA-Z0-9_]*$', re.UNICODE)\r | |
85e5d3cf FY |
58 | ## Regular expression for GUID c structure format\r |
59 | _GuidCFormatPattern = r"{{\s*0[xX]{Hex}{{1,8}}\s*,\s*0[xX]{Hex}{{1,4}}\s*,\s*0[xX]{Hex}{{1,4}}" \\r | |
60 | r"\s*,\s*{{\s*0[xX]{Hex}{{1,2}}\s*,\s*0[xX]{Hex}{{1,2}}" \\r | |
61 | r"\s*,\s*0[xX]{Hex}{{1,2}}\s*,\s*0[xX]{Hex}{{1,2}}" \\r | |
62 | r"\s*,\s*0[xX]{Hex}{{1,2}}\s*,\s*0[xX]{Hex}{{1,2}}" \\r | |
63 | r"\s*,\s*0[xX]{Hex}{{1,2}}\s*,\s*0[xX]{Hex}{{1,2}}\s*}}\s*}}".format(Hex=_HexChar)\r | |
64 | gGuidCFormatPattern = re.compile(r"{}".format(_GuidCFormatPattern))\r | |
7da06eee | 65 | \r |
f51461c8 LG |
66 | #\r |
67 | # A global variable for whether current build in AutoGen phase or not.\r | |
68 | #\r | |
69 | gAutoGenPhase = False\r | |
70 | \r | |
71 | #\r | |
72 | # The Conf dir outside the workspace dir\r | |
73 | #\r | |
74 | gConfDirectory = ''\r | |
4465cd12 | 75 | gCmdConfDir = ''\r |
97058144 | 76 | gBuildDirectory = ''\r |
f51461c8 LG |
77 | #\r |
78 | # The relative default database file path\r | |
79 | #\r | |
80 | gDatabasePath = ".cache/build.db"\r | |
81 | \r | |
82 | #\r | |
83 | # Build flag for binary build\r | |
84 | #\r | |
85 | gIgnoreSource = False\r | |
86 | \r | |
87 | #\r | |
88 | # FDF parser\r | |
89 | #\r | |
90 | gFdfParser = None\r | |
97fa0ee9 | 91 | \r |
763e8edf | 92 | BuildOptionPcd = []\r |
c8d07c5e | 93 | \r |
2a29017e YZ |
94 | #\r |
95 | # Mixed PCD name dict\r | |
96 | #\r | |
97 | MixedPcd = {}\r | |
98 | \r | |
ae7b6df8 LG |
99 | # Structure Pcd dict\r |
100 | gStructurePcd = {}\r | |
8a64c7ea | 101 | gPcdSkuOverrides={}\r |
c8d07c5e YZ |
102 | # Pcd name for the Pcd which used in the Conditional directives\r |
103 | gConditionalPcds = []\r | |
36d083ef YZ |
104 | \r |
105 | gUseHashCache = None\r | |
106 | gBinCacheDest = None\r | |
107 | gBinCacheSource = None\r | |
108 | gPlatformHash = None\r | |
fc8b8dea SS |
109 | gPlatformHashFile = None\r |
110 | gPackageHash = None\r | |
111 | gPackageHashFile = None\r | |
112 | gModuleHashFile = None\r | |
113 | gCMakeHashFile = None\r | |
114 | gHashChainStatus = None\r | |
115 | gModulePreMakeCacheStatus = None\r | |
116 | gModuleMakeCacheStatus = None\r | |
117 | gFileHashDict = None\r | |
118 | gModuleAllCacheStatus = None\r | |
119 | gModuleCacheHit = None\r | |
120 | \r | |
7809492c | 121 | gEnableGenfdsMultiThread = True\r |
18ef4e71 | 122 | gSikpAutoGenCache = set()\r |
0e7e7a26 SS |
123 | # Common lock for the file access in multiple process AutoGens\r |
124 | file_lock = None\r | |
fc8b8dea | 125 | \r |