Revision: 18318
          http://sourceforge.net/p/edk2/code/18318
Author:   lgao4
Date:     2015-08-26 06:33:31 +0000 (Wed, 26 Aug 2015)
Log Message:
-----------
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 <[email protected]>
Reviewed-by: Yingke Liu <[email protected]>

Modified Paths:
--------------
    trunk/edk2/BaseTools/Source/Python/GenFds/Section.py

Modified: trunk/edk2/BaseTools/Source/Python/GenFds/Section.py
===================================================================
--- trunk/edk2/BaseTools/Source/Python/GenFds/Section.py        2015-08-26 
06:28:59 UTC (rev 18317)
+++ trunk/edk2/BaseTools/Source/Python/GenFds/Section.py        2015-08-26 
06:33:31 UTC (rev 18318)
@@ -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 @@
             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 @@
                             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()


------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to