X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=BaseTools%2FSource%2FPython%2FGenFds%2FSection.py;h=fc25447dfdcd57b857930dbbadef6e44e9c5014a;hb=b21a13fbb61e0232ea98b0d7b305e24e67e50b0a;hp=32314d6b7fb3edc66cc1065981ff7be833da5a14;hpb=b74d65ed3a5c973766b44f081ceba2d6a269c0a6;p=mirror_edk2.git
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.
+# Copyright (c) 2007-2015, Intel Corporation. All rights reserved.
#
# 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()