summaryrefslogtreecommitdiff
path: root/BaseTools/Source/Python
diff options
context:
space:
mode:
authorLiming Gao <liming.gao@intel.com>2015-08-26 06:33:31 +0000
committerlgao4 <lgao4@Edk2>2015-08-26 06:33:31 +0000
commit23cc8adbaf86fcc6d0a81f766f8abde2c4f8ff07 (patch)
tree94963e53ae1f01606e2df6d20a9bc33fea8d6d19 /BaseTools/Source/Python
parent118bf0960c203f25f08b5c02000cade5149ac8eb (diff)
downloadedk2-platforms-23cc8adbaf86fcc6d0a81f766f8abde2c4f8ff07.tar.xz
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.gao@intel.com> Reviewed-by: Yingke Liu <yingke.d.liu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18318 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/Python')
-rw-r--r--BaseTools/Source/Python/GenFds/Section.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/BaseTools/Source/Python/GenFds/Section.py b/BaseTools/Source/Python/GenFds/Section.py
index 32314d6b7f..fc25447dfd 100644
--- a/BaseTools/Source/Python/GenFds/Section.py
+++ b/BaseTools/Source/Python/GenFds/Section.py
@@ -1,7 +1,7 @@
## @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
@@ -149,11 +149,7 @@ class Section (SectionClassObject):
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:
@@ -162,7 +158,11 @@ class Section (SectionClassObject):
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()