From cf245466a56a7be7405142753c6c6a6689b7461b Mon Sep 17 00:00:00 2001 From: Yunhua Feng Date: Thu, 7 Dec 2017 11:35:16 +0800 Subject: [PATCH] BaseTools: Fix GenSec can't found the depex file Filter the FileList when multiple genfds thread options is not enabled. Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng Signed-off-by: Yonghong Zhu Tested-by: Leif Lindholm Reviewed-by: Liming Gao --- BaseTools/Source/Python/GenFds/EfiSection.py | 5 +++-- BaseTools/Source/Python/GenFds/Section.py | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/BaseTools/Source/Python/GenFds/EfiSection.py b/BaseTools/Source/Python/GenFds/EfiSection.py index 7b3b717191..5029ec7a18 100644 --- a/BaseTools/Source/Python/GenFds/EfiSection.py +++ b/BaseTools/Source/Python/GenFds/EfiSection.py @@ -92,9 +92,10 @@ class EfiSection (EfiSectionClassObject): elif os.path.exists(Filename): FileList.append(Filename) elif '.depex' in FfsInf.FinalTargetSuffixMap or FfsInf.Depex: - FileList.append(Filename) + if IsMakefile: + FileList.append(Filename) else: - FileList, IsSect = Section.Section.GetFileList(FfsInf, self.FileType, self.FileExtension, Dict) + FileList, IsSect = Section.Section.GetFileList(FfsInf, self.FileType, self.FileExtension, Dict, IsMakefile=IsMakefile) if IsSect : return FileList, self.Alignment diff --git a/BaseTools/Source/Python/GenFds/Section.py b/BaseTools/Source/Python/GenFds/Section.py index 4c1aaacd68..463faa3781 100644 --- a/BaseTools/Source/Python/GenFds/Section.py +++ b/BaseTools/Source/Python/GenFds/Section.py @@ -110,7 +110,7 @@ class Section (SectionClassObject): # @param Dict dictionary contains macro and its value # @retval tuple (File list, boolean) # - def GetFileList(FfsInf, FileType, FileExtension, Dict = {}): + def GetFileList(FfsInf, FileType, FileExtension, Dict = {}, IsMakefile=False): if FileType in Section.SectFileType.keys() : IsSect = True else : @@ -141,7 +141,7 @@ class Section (SectionClassObject): else: 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)) - if Suffix != None: + if (not IsMakefile and Suffix != None and os.path.exists(FfsInf.EfiOutputPath)) or (IsMakefile and Suffix != None): # # Get Makefile path and time stamp #