From a3a4737051010a94832f7bceaa1fa414d7259da0 Mon Sep 17 00:00:00 2001 From: Yonghong Zhu Date: Fri, 15 Sep 2017 16:14:17 +0800 Subject: [PATCH] BaseTools: Fix a bug to correct SourceFileList 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 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu Reviewed-by: Liming Gao --- BaseTools/Source/Python/AutoGen/GenMake.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py b/BaseTools/Source/Python/AutoGen/GenMake.py index 0f3ddd5dd4..942eb44cc2 100644 --- a/BaseTools/Source/Python/AutoGen/GenMake.py +++ b/BaseTools/Source/Python/AutoGen/GenMake.py @@ -789,8 +789,15 @@ cleanlib: if File.Ext == '.h': ForceIncludedFile.append(File) SourceFileList = [] + OutPutFileList = [] for Target in self._AutoGenObject.IntroTargetList: SourceFileList.extend(Target.Inputs) + OutPutFileList.extend(Target.Outputs) + + if OutPutFileList: + for Item in OutPutFileList: + if Item in SourceFileList: + SourceFileList.remove(Item) self.FileDependency = self.GetFileDependency( SourceFileList, -- 2.39.2