From: Yonghong Zhu Date: Mon, 13 Nov 2017 02:50:49 +0000 (+0800) Subject: BaseTools: Fix the bug to re-build uni file for Library X-Git-Tag: edk2-stable201903~3107 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=36513f3a6bcc67a460f63190b27deb3565bd2de3 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 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu Reviewed-by: Liming Gao --- diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py index 5317921cbe..b3e708951e 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -4229,13 +4229,14 @@ class ModuleAutoGen(AutoGen): if self.IsMakeFileCreated: return - if self.CanSkip(): - return if not self.IsLibrary and CreateLibraryMakeFile: for LibraryAutoGen in self.LibraryAutoGenList: LibraryAutoGen.CreateMakeFile() + if self.CanSkip(): + return + if len(self.CustomMakefile) == 0: Makefile = GenMake.ModuleMakefile(self) else: @@ -4263,8 +4264,6 @@ class ModuleAutoGen(AutoGen): def CreateCodeFile(self, CreateLibraryCodeFile=True): if self.IsCodeFileCreated: return - if self.CanSkip(): - return # Need to generate PcdDatabase even PcdDriver is binarymodule if self.IsBinaryModule and self.PcdIsDriver != '': @@ -4279,6 +4278,9 @@ class ModuleAutoGen(AutoGen): for LibraryAutoGen in self.LibraryAutoGenList: LibraryAutoGen.CreateCodeFile() + if self.CanSkip(): + return + AutoGenList = [] IgoredAutoGenList = []