]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Fix the bug to re-build uni file for Library
authorYonghong Zhu <yonghong.zhu@intel.com>
Mon, 13 Nov 2017 02:50:49 +0000 (10:50 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Tue, 14 Nov 2017 08:23:07 +0000 (16:23 +0800)
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>
BaseTools/Source/Python/AutoGen/AutoGen.py

index 5317921cbe20cb2f184066fefa23f51661d43759..b3e708951ee4aadeb485c8792ecc95a91abf2c5b 100644 (file)
@@ -4229,13 +4229,14 @@ class ModuleAutoGen(AutoGen):
 \r
         if self.IsMakeFileCreated:\r
             return\r
-        if self.CanSkip():\r
-            return\r
 \r
         if not self.IsLibrary and CreateLibraryMakeFile:\r
             for LibraryAutoGen in self.LibraryAutoGenList:\r
                 LibraryAutoGen.CreateMakeFile()\r
 \r
+        if self.CanSkip():\r
+            return\r
+\r
         if len(self.CustomMakefile) == 0:\r
             Makefile = GenMake.ModuleMakefile(self)\r
         else:\r
@@ -4263,8 +4264,6 @@ class ModuleAutoGen(AutoGen):
     def CreateCodeFile(self, CreateLibraryCodeFile=True):\r
         if self.IsCodeFileCreated:\r
             return\r
-        if self.CanSkip():\r
-            return\r
 \r
         # Need to generate PcdDatabase even PcdDriver is binarymodule\r
         if self.IsBinaryModule and self.PcdIsDriver != '':\r
@@ -4279,6 +4278,9 @@ class ModuleAutoGen(AutoGen):
             for LibraryAutoGen in self.LibraryAutoGenList:\r
                 LibraryAutoGen.CreateCodeFile()\r
 \r
+        if self.CanSkip():\r
+            return\r
+\r
         AutoGenList = []\r
         IgoredAutoGenList = []\r
 \r