]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Fix GenSec can't found the depex file
authorYunhua Feng <yunhuax.feng@intel.com>
Thu, 7 Dec 2017 03:35:16 +0000 (11:35 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Fri, 8 Dec 2017 00:57:48 +0000 (08:57 +0800)
Filter the FileList when multiple genfds thread options is not enabled.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com>
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Tested-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
BaseTools/Source/Python/GenFds/EfiSection.py
BaseTools/Source/Python/GenFds/Section.py

index 7b3b71719147c9e7e61315a327bdd09638be230d..5029ec7a18232f72dcba257446e02f73acb8fc9f 100644 (file)
@@ -92,9 +92,10 @@ class EfiSection (EfiSectionClassObject):
             elif os.path.exists(Filename):\r
                 FileList.append(Filename)\r
             elif '.depex' in FfsInf.FinalTargetSuffixMap or FfsInf.Depex:\r
-                FileList.append(Filename)\r
+                if IsMakefile:\r
+                    FileList.append(Filename)\r
         else:\r
-            FileList, IsSect = Section.Section.GetFileList(FfsInf, self.FileType, self.FileExtension, Dict)\r
+            FileList, IsSect = Section.Section.GetFileList(FfsInf, self.FileType, self.FileExtension, Dict, IsMakefile=IsMakefile)\r
             if IsSect :\r
                 return FileList, self.Alignment\r
 \r
index 4c1aaacd68d1146724b56ff72cb7837ae1fbf218..463faa378165084168b42db41b413a2ac642e851 100644 (file)
@@ -110,7 +110,7 @@ class Section (SectionClassObject):
     #   @param  Dict        dictionary contains macro and its value\r
     #   @retval tuple       (File list, boolean)\r
     #\r
-    def GetFileList(FfsInf, FileType, FileExtension, Dict = {}):\r
+    def GetFileList(FfsInf, FileType, FileExtension, Dict = {}, IsMakefile=False):\r
         if FileType in Section.SectFileType.keys() :\r
             IsSect = True\r
         else :\r
@@ -141,7 +141,7 @@ class Section (SectionClassObject):
                 else:\r
                     GenFdsGlobalVariable.InfLogger ("\nCurrent ARCH \'%s\' of File %s is not in the Support Arch Scope of %s specified by INF %s in FDF" %(FfsInf.CurrentArch, File.File, File.Arch, FfsInf.InfFileName))\r
 \r
-        if Suffix != None:\r
+        if (not IsMakefile and Suffix != None and os.path.exists(FfsInf.EfiOutputPath)) or (IsMakefile and Suffix != None):\r
             #\r
             # Get Makefile path and time stamp\r
             #\r