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 <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>
This commit is contained in:
Yonghong Zhu 2017-09-15 16:14:17 +08:00
parent 880ec68338
commit a3a4737051
1 changed files with 7 additions and 0 deletions

View File

@ -789,8 +789,15 @@ cleanlib:
if File.Ext == '.h': if File.Ext == '.h':
ForceIncludedFile.append(File) ForceIncludedFile.append(File)
SourceFileList = [] SourceFileList = []
OutPutFileList = []
for Target in self._AutoGenObject.IntroTargetList: for Target in self._AutoGenObject.IntroTargetList:
SourceFileList.extend(Target.Inputs) 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( self.FileDependency = self.GetFileDependency(
SourceFileList, SourceFileList,