From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Permerror (SPF Permanent Error: More than 10 MX records returned) identity=mailfrom; client-ip=134.134.136.126; helo=mga18.intel.com; envelope-from=yonghong.zhu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5AB7E221EA0AC for ; Thu, 7 Dec 2017 07:55:15 -0800 (PST) Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Dec 2017 07:59:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,373,1508828400"; d="scan'208";a="668712" Received: from shwdeopenpsi168.ccr.corp.intel.com ([10.239.158.129]) by fmsmga007.fm.intel.com with ESMTP; 07 Dec 2017 07:59:47 -0800 From: Yonghong Zhu To: edk2-devel@lists.01.org Cc: Yunhua Feng , Liming Gao Date: Thu, 7 Dec 2017 23:59:44 +0800 Message-Id: <1512662384-11600-1-git-send-email-yonghong.zhu@intel.com> X-Mailer: git-send-email 2.6.1.windows.1 Subject: [Patch V2] BaseTools: Fix GenSec can't found the depex file X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 15:55:15 -0000 From: Yunhua Feng 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 --- 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 7b3b717..5029ec7 100644 --- a/BaseTools/Source/Python/GenFds/EfiSection.py +++ b/BaseTools/Source/Python/GenFds/EfiSection.py @@ -90,13 +90,14 @@ class EfiSection (EfiSectionClassObject): if not self.Optional: FileList.append(Filename) 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 Index = 0 Align = self.Alignment diff --git a/BaseTools/Source/Python/GenFds/Section.py b/BaseTools/Source/Python/GenFds/Section.py index 4c1aaac..463faa3 100644 --- a/BaseTools/Source/Python/GenFds/Section.py +++ b/BaseTools/Source/Python/GenFds/Section.py @@ -108,11 +108,11 @@ class Section (SectionClassObject): # @param FileType File type to get # @param FileExtension File extension to get # @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 : IsSect = False @@ -139,11 +139,11 @@ class Section (SectionClassObject): else: GenFdsGlobalVariable.VerboseLogger ("\nFile Type \'%s\' of File %s in %s is not same with file type \'%s\' from Rule in FDF" %(File.Type, File.File, FfsInf.InfFileName, FileType)) 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 # MakefileDir = FfsInf.EfiOutputPath[:-len('OUTPUT')] Makefile = os.path.join(MakefileDir, 'Makefile') -- 2.6.1.windows.1