]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Fix the bug for single module build with GenC/GenMake
authorYonghong Zhu <yonghong.zhu@intel.com>
Wed, 28 Feb 2018 16:07:48 +0000 (00:07 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Thu, 1 Mar 2018 23:55:32 +0000 (07:55 +0800)
copy the same logic from _BuildPa() function.

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 14a2ceb4bc64dff3be542580fa1a4a29b7266b28..bb130a02cc1cbdf9b5d4cfcdcffc0bf5f4469f31 100644 (file)
@@ -1865,13 +1865,21 @@ class Build():
                             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
                             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
+                                    self.Progress.Start("Generating code")\r
                                     Ma.CreateCodeFile(True)\r
                                     Ma.CreateCodeFile(True)\r
+                                    self.Progress.Stop("done!")\r
+                                if self.Target == "genc":\r
+                                    return True\r
                                 if not self.SkipAutoGen or self.Target == 'genmake':\r
                                 if not self.SkipAutoGen or self.Target == 'genmake':\r
+                                    self.Progress.Start("Generating makefile")\r
                                     if CmdListDict and self.Fdf and (Module.File, Arch) in CmdListDict:\r
                                         Ma.CreateMakeFile(True, CmdListDict[Module.File, Arch])\r
                                         del CmdListDict[Module.File, Arch]\r
                                     else:\r
                                         Ma.CreateMakeFile(True)\r
                                     if CmdListDict and self.Fdf and (Module.File, Arch) in CmdListDict:\r
                                         Ma.CreateMakeFile(True, CmdListDict[Module.File, Arch])\r
                                         del CmdListDict[Module.File, Arch]\r
                                     else:\r
                                         Ma.CreateMakeFile(True)\r
+                                    self.Progress.Stop("done!")\r
+                                if self.Target == "genmake":\r
+                                    return True\r
                             self.BuildModules.append(Ma)\r
                     self.AutoGenTime += int(round((time.time() - AutoGenStart)))\r
                     MakeStart = time.time()\r
                             self.BuildModules.append(Ma)\r
                     self.AutoGenTime += int(round((time.time() - AutoGenStart)))\r
                     MakeStart = time.time()\r