BaseTools: Fix the bug to re-build uni file for Library
The root cause is Module's self.CanSkip() is before LibraryAutoGen, then when a uni file of library is changed, Module's self.CanSkip() is still true which cause the library is not regenerated. This patch change Module's self.CanSkip() after LibraryAutoGen. Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=759 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:
@ -4229,13 +4229,14 @@ class ModuleAutoGen(AutoGen):
|
|||||||
|
|
||||||
if self.IsMakeFileCreated:
|
if self.IsMakeFileCreated:
|
||||||
return
|
return
|
||||||
if self.CanSkip():
|
|
||||||
return
|
|
||||||
|
|
||||||
if not self.IsLibrary and CreateLibraryMakeFile:
|
if not self.IsLibrary and CreateLibraryMakeFile:
|
||||||
for LibraryAutoGen in self.LibraryAutoGenList:
|
for LibraryAutoGen in self.LibraryAutoGenList:
|
||||||
LibraryAutoGen.CreateMakeFile()
|
LibraryAutoGen.CreateMakeFile()
|
||||||
|
|
||||||
|
if self.CanSkip():
|
||||||
|
return
|
||||||
|
|
||||||
if len(self.CustomMakefile) == 0:
|
if len(self.CustomMakefile) == 0:
|
||||||
Makefile = GenMake.ModuleMakefile(self)
|
Makefile = GenMake.ModuleMakefile(self)
|
||||||
else:
|
else:
|
||||||
@ -4263,8 +4264,6 @@ class ModuleAutoGen(AutoGen):
|
|||||||
def CreateCodeFile(self, CreateLibraryCodeFile=True):
|
def CreateCodeFile(self, CreateLibraryCodeFile=True):
|
||||||
if self.IsCodeFileCreated:
|
if self.IsCodeFileCreated:
|
||||||
return
|
return
|
||||||
if self.CanSkip():
|
|
||||||
return
|
|
||||||
|
|
||||||
# Need to generate PcdDatabase even PcdDriver is binarymodule
|
# Need to generate PcdDatabase even PcdDriver is binarymodule
|
||||||
if self.IsBinaryModule and self.PcdIsDriver != '':
|
if self.IsBinaryModule and self.PcdIsDriver != '':
|
||||||
@ -4279,6 +4278,9 @@ class ModuleAutoGen(AutoGen):
|
|||||||
for LibraryAutoGen in self.LibraryAutoGenList:
|
for LibraryAutoGen in self.LibraryAutoGenList:
|
||||||
LibraryAutoGen.CreateCodeFile()
|
LibraryAutoGen.CreateCodeFile()
|
||||||
|
|
||||||
|
if self.CanSkip():
|
||||||
|
return
|
||||||
|
|
||||||
AutoGenList = []
|
AutoGenList = []
|
||||||
IgoredAutoGenList = []
|
IgoredAutoGenList = []
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user