]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/Workspace/InfBuildData.py
BaseTools: Add functions to get platform scope build options
[mirror_edk2.git] / BaseTools / Source / Python / Workspace / InfBuildData.py
index 60970cd928361b0f78f25a91e0fc7fe42f962a60..da35391d3afff4a548938135172b79d5d1381248 100644 (file)
@@ -819,7 +819,17 @@ class InfBuildData(ModuleBuildClassObject):
         for Arch, ModuleType in TemporaryDictionary:\r
             RetVal[Arch, ModuleType] = TemporaryDictionary[Arch, ModuleType]\r
         return RetVal\r
-\r
+    def LocalPkg(self):\r
+        module_path = self.MetaFile.File\r
+        subdir = os.path.split(module_path)[0]\r
+        TopDir = ""\r
+        while subdir:\r
+            subdir,TopDir = os.path.split(subdir)\r
+\r
+        for file_name in os.listdir(os.path.join(self.MetaFile.Root,TopDir)):\r
+            if file_name.upper().endswith("DEC"):\r
+                pkg = os.path.join(TopDir,file_name)\r
+        return pkg\r
     @cached_class_function\r
     def GetGuidsUsedByPcd(self):\r
         self.Pcds\r