[edk2] [Patch] BaseTools: Fix the bug for single module build with GenC/GenMake

Yonghong Zhu posted 1 patch 6 years, 1 month ago
Failed in applying to current master (apply log)
BaseTools/Source/Python/build/build.py | 8 ++++++++
1 file changed, 8 insertions(+)
[edk2] [Patch] BaseTools: Fix the bug for single module build with GenC/GenMake
Posted by Yonghong Zhu 6 years, 1 month ago
copy the same logic from _BuildPa() function.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
---
 BaseTools/Source/Python/build/build.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py
index 14a2ceb..bb130a0 100644
--- a/BaseTools/Source/Python/build/build.py
+++ b/BaseTools/Source/Python/build/build.py
@@ -1863,17 +1863,25 @@ class Build():
                                 continue
                             # Not to auto-gen for targets 'clean', 'cleanlib', 'cleanall', 'run', 'fds'
                             if self.Target not in ['clean', 'cleanlib', 'cleanall', 'run', 'fds']:
                                 # for target which must generate AutoGen code and makefile
                                 if not self.SkipAutoGen or self.Target == 'genc':
+                                    self.Progress.Start("Generating code")
                                     Ma.CreateCodeFile(True)
+                                    self.Progress.Stop("done!")
+                                if self.Target == "genc":
+                                    return True
                                 if not self.SkipAutoGen or self.Target == 'genmake':
+                                    self.Progress.Start("Generating makefile")
                                     if CmdListDict and self.Fdf and (Module.File, Arch) in CmdListDict:
                                         Ma.CreateMakeFile(True, CmdListDict[Module.File, Arch])
                                         del CmdListDict[Module.File, Arch]
                                     else:
                                         Ma.CreateMakeFile(True)
+                                    self.Progress.Stop("done!")
+                                if self.Target == "genmake":
+                                    return True
                             self.BuildModules.append(Ma)
                     self.AutoGenTime += int(round((time.time() - AutoGenStart)))
                     MakeStart = time.time()
                     for Ma in self.BuildModules:
                         if not Ma.IsBinaryModule:
-- 
2.6.1.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch] BaseTools: Fix the bug for single module build with GenC/GenMake
Posted by Gao, Liming 6 years, 1 month ago
Reviewed-by: Liming Gao <liming.gao@intel.com>

>-----Original Message-----
>From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
>Yonghong Zhu
>Sent: Thursday, March 01, 2018 12:09 AM
>To: edk2-devel@lists.01.org
>Subject: [edk2] [Patch] BaseTools: Fix the bug for single module build with
>GenC/GenMake
>
>copy the same logic from _BuildPa() function.
>
>Contributed-under: TianoCore Contribution Agreement 1.1
>Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
>---
> BaseTools/Source/Python/build/build.py | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
>diff --git a/BaseTools/Source/Python/build/build.py
>b/BaseTools/Source/Python/build/build.py
>index 14a2ceb..bb130a0 100644
>--- a/BaseTools/Source/Python/build/build.py
>+++ b/BaseTools/Source/Python/build/build.py
>@@ -1863,17 +1863,25 @@ class Build():
>                                 continue
>                             # Not to auto-gen for targets 'clean', 'cleanlib', 'cleanall', 'run',
>'fds'
>                             if self.Target not in ['clean', 'cleanlib', 'cleanall', 'run', 'fds']:
>                                 # for target which must generate AutoGen code and makefile
>                                 if not self.SkipAutoGen or self.Target == 'genc':
>+                                    self.Progress.Start("Generating code")
>                                     Ma.CreateCodeFile(True)
>+                                    self.Progress.Stop("done!")
>+                                if self.Target == "genc":
>+                                    return True
>                                 if not self.SkipAutoGen or self.Target == 'genmake':
>+                                    self.Progress.Start("Generating makefile")
>                                     if CmdListDict and self.Fdf and (Module.File, Arch) in
>CmdListDict:
>                                         Ma.CreateMakeFile(True, CmdListDict[Module.File, Arch])
>                                         del CmdListDict[Module.File, Arch]
>                                     else:
>                                         Ma.CreateMakeFile(True)
>+                                    self.Progress.Stop("done!")
>+                                if self.Target == "genmake":
>+                                    return True
>                             self.BuildModules.append(Ma)
>                     self.AutoGenTime += int(round((time.time() - AutoGenStart)))
>                     MakeStart = time.time()
>                     for Ma in self.BuildModules:
>                         if not Ma.IsBinaryModule:
>--
>2.6.1.windows.1
>
>_______________________________________________
>edk2-devel mailing list
>edk2-devel@lists.01.org
>https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel