]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Fix the missing depex file in GenFds
authorLiming Gao <liming.gao@intel.com>
Wed, 26 Aug 2015 06:33:31 +0000 (06:33 +0000)
committerlgao4 <lgao4@Edk2>
Wed, 26 Aug 2015 06:33:31 +0000 (06:33 +0000)
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

BaseTools/Source/Python/GenFds/Section.py

index 32314d6b7fb3edc66cc1065981ff7be833da5a14..fc25447dfdcd57b857930dbbadef6e44e9c5014a 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # section base class\r
 #\r
-#  Copyright (c) 2007-2014, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2007-2015, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -149,11 +149,7 @@ class Section (SectionClassObject):
             Makefile = os.path.join(MakefileDir, 'Makefile')\r
             if not os.path.exists(Makefile):\r
                 Makefile = os.path.join(MakefileDir, 'GNUmakefile')\r
-            if not os.path.exists(Makefile):\r
-                SuffixMap = FfsInf.GetFinalTargetSuffixMap()\r
-                if Suffix in SuffixMap:\r
-                    FileList.extend(SuffixMap[Suffix])\r
-            else:\r
+            if os.path.exists(Makefile):\r
                 # Update to search files with suffix in all sub-dirs.\r
                 Tuple = os.walk(FfsInf.EfiOutputPath)\r
                 for Dirpath, Dirnames, Filenames in Tuple:\r
@@ -162,7 +158,11 @@ class Section (SectionClassObject):
                             FullName = os.path.join(Dirpath, F)\r
                             if os.path.getmtime(FullName) > os.path.getmtime(Makefile):\r
                                 FileList.append(FullName)\r
-\r
+            if not FileList:\r
+                SuffixMap = FfsInf.GetFinalTargetSuffixMap()\r
+                if Suffix in SuffixMap:\r
+                    FileList.extend(SuffixMap[Suffix])\r
+                \r
         #Process the file lists is alphabetical for a same section type\r
         if len (FileList) > 1:\r
             FileList.sort()\r