]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Fix the regression bug to build single module
authorYonghong Zhu <yonghong.zhu@intel.com>
Wed, 27 Sep 2017 13:18:00 +0000 (21:18 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Thu, 28 Sep 2017 02:10:39 +0000 (10:10 +0800)
The bug is introduced by 1b8eca to collect single module's build time.
Now the fix solution is copied from Platform build.

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/build/build.py

index dd65c66b659fed9dfad99eeea3eb7f60d227a4cd..13d8e503b11d41bc2eba3170d2dcb4ce3e9c56e9 100644 (file)
@@ -1832,6 +1832,18 @@ class Build():
                         if self.ModuleFile.Dir == Module.Dir and self.ModuleFile.File == Module.File:\r
                             Ma = ModuleAutoGen(Wa, Module, BuildTarget, ToolChain, Arch, self.PlatformFile)\r
                             if Ma == None: continue\r
+                            # Not to auto-gen for targets 'clean', 'cleanlib', 'cleanall', 'run', 'fds'\r
+                            if self.Target not in ['clean', 'cleanlib', 'cleanall', 'run', 'fds']:\r
+                                # for target which must generate AutoGen code and makefile\r
+                                if not self.SkipAutoGen or self.Target == 'genc':\r
+                                    Ma.CreateCodeFile(True)\r
+                                if self.Target == "genc":\r
+                                    continue\r
+\r
+                                if not self.SkipAutoGen or self.Target == 'genmake':\r
+                                    Ma.CreateMakeFile(True)\r
+                                if self.Target == "genmake":\r
+                                    continue\r
                             MaList.append(Ma)\r
                             self.BuildModules.append(Ma)\r
                     self.AutoGenTime += int(round((time.time() - AutoGenStart)))\r