]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Fix a bug to correct SourceFileList
authorYonghong Zhu <yonghong.zhu@intel.com>
Fri, 15 Sep 2017 08:14:17 +0000 (16:14 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Tue, 19 Sep 2017 07:27:50 +0000 (15:27 +0800)
We met a case that use two microcode files in the Microcode.inf file,
one is .mcb file, another is .txt file. then it cause build failure
because the SourceFileList include the .txt file's output file, while
this output file is still not be generated, so it cause
GetFileDependency report failure.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
BaseTools/Source/Python/AutoGen/GenMake.py

index 0f3ddd5dd44498258516ec5c6aee79221b3fc98f..942eb44cc2eecaab3656a708578f12d7587d9d74 100644 (file)
@@ -789,8 +789,15 @@ cleanlib:
             if File.Ext == '.h':\r
                 ForceIncludedFile.append(File)\r
         SourceFileList = []\r
+        OutPutFileList = []\r
         for Target in self._AutoGenObject.IntroTargetList:\r
             SourceFileList.extend(Target.Inputs)\r
+            OutPutFileList.extend(Target.Outputs)\r
+\r
+        if OutPutFileList:\r
+            for Item in OutPutFileList:\r
+                if Item in SourceFileList:\r
+                    SourceFileList.remove(Item)\r
 \r
         self.FileDependency = self.GetFileDependency(\r
                                     SourceFileList,\r