Reviewed-by: Yingke Liu <yingke.d....@intel.com> Dennis
-----Original Message----- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Liming Gao Sent: Tuesday, August 25, 2015 10:23 To: edk2-devel@lists.01.org Subject: [edk2] [Patch] BaseTools: Fix the missing depex file in GenFds If FDF FfsRule describes |.depex for depex file on source build, it may be missed in the generated FD image. GenFds tool needs to check the output file list and find the matched one. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming....@intel.com> Reviewed-by: Yingke Liu <yingke.d....@intel.com> --- BaseTools/Source/Python/GenFds/Section.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/BaseTools/Source/Python/GenFds/Section.py b/BaseTools/Source/Python/GenFds/Section.py index 32314d6..fc25447 100644 --- a/BaseTools/Source/Python/GenFds/Section.py +++ b/BaseTools/Source/Python/GenFds/Section.py @@ -1,9 +1,9 @@ ## @file # section base class # -# Copyright (c) 2007-2014, Intel Corporation. All rights reserved.<BR> +# Copyright (c) 2007-2015, Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php @@ -147,24 +147,24 @@ class Section (SectionClassObject): # MakefileDir = FfsInf.EfiOutputPath[:-len('OUTPUT')] Makefile = os.path.join(MakefileDir, 'Makefile') if not os.path.exists(Makefile): Makefile = os.path.join(MakefileDir, 'GNUmakefile') - if not os.path.exists(Makefile): - SuffixMap = FfsInf.GetFinalTargetSuffixMap() - if Suffix in SuffixMap: - FileList.extend(SuffixMap[Suffix]) - else: + if os.path.exists(Makefile): # Update to search files with suffix in all sub-dirs. Tuple = os.walk(FfsInf.EfiOutputPath) for Dirpath, Dirnames, Filenames in Tuple: for F in Filenames: if os.path.splitext(F)[1] in (Suffix): FullName = os.path.join(Dirpath, F) if os.path.getmtime(FullName) > os.path.getmtime(Makefile): FileList.append(FullName) - + if not FileList: + SuffixMap = FfsInf.GetFinalTargetSuffixMap() + if Suffix in SuffixMap: + FileList.extend(SuffixMap[Suffix]) + #Process the file lists is alphabetical for a same section type if len (FileList) > 1: FileList.sort() return FileList, IsSect -- 1.9.5.msysgit.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel