]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/Workspace/DecBuildData.py
BaseTools: fix imports
[mirror_edk2.git] / BaseTools / Source / Python / Workspace / DecBuildData.py
index cc00409fee01e807288e8f8689e9826346d29e90..13b653bd9872ff90a0af4f36b25c54cc5849577b 100644 (file)
@@ -16,8 +16,10 @@ from Common.DataType import *
 from Common.Misc import *\r
 from types import *\r
 from collections import OrderedDict\r
-\r
+from CommonDataClass.DataClass import *\r
 from Workspace.BuildClassObject import PackageBuildClassObject, StructurePcd, PcdClassObject\r
+from Common.GlobalData import gGlobalDefines, gEcpSource\r
+from re import compile\r
 \r
 ## Platform build information from DEC file\r
 #\r
@@ -109,7 +111,7 @@ class DecBuildData(PackageBuildClassObject):
     @property\r
     def _Macros(self):\r
         if self._MacroDict is None:\r
-            self._MacroDict = dict(GlobalData.gGlobalDefines)\r
+            self._MacroDict = dict(gGlobalDefines)\r
         return self._MacroDict\r
 \r
     ## Get architecture\r
@@ -298,7 +300,7 @@ class DecBuildData(PackageBuildClassObject):
             PublicInclues = []\r
             RecordList = self._RawData[MODEL_EFI_INCLUDE, self._Arch]\r
             Macros = self._Macros\r
-            Macros["EDK_SOURCE"] = GlobalData.gEcpSource\r
+            Macros["EDK_SOURCE"] = gEcpSource\r
             for Record in RecordList:\r
                 File = PathClass(NormPath(Record[0], Macros), self._PackageDir, Arch=self._Arch)\r
                 LineNo = Record[-1]\r
@@ -464,6 +466,7 @@ class DecBuildData(PackageBuildClassObject):
         StructurePcds = self.ProcessStructurePcd(StrPcdSet)\r
         for pcd in StructurePcds:\r
             Pcds[pcd.TokenCName, pcd.TokenSpaceGuidCName, self._PCD_TYPE_STRING_[Type]] = pcd\r
+        StructPattern = compile(r'[_a-zA-Z][0-9A-Za-z_]*$')\r
         for pcd in Pcds.values():\r
             if pcd.DatumType not in [TAB_UINT8, TAB_UINT16, TAB_UINT32, TAB_UINT64, TAB_VOID, "BOOLEAN"]:\r
                 if not pcd.IsAggregateDatumType():\r