public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch] BaseTools: add some comment for .PrebuildEnv file's usage
@ 2017-07-25  5:58 Yonghong Zhu
  2017-07-26  0:52 ` Gao, Liming
  0 siblings, 1 reply; 2+ messages in thread
From: Yonghong Zhu @ 2017-07-25  5:58 UTC (permalink / raw)
  To: edk2-devel; +Cc: Liming Gao

This patch add some comments to explain why we use .PrebuildEnv file to
save environment variable settings set by the prebuild script.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
---
 BaseTools/Source/Python/build/build.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py
index f7634fa..4d05ee2 100644
--- a/BaseTools/Source/Python/build/build.py
+++ b/BaseTools/Source/Python/build/build.py
@@ -1027,10 +1027,15 @@ class Build():
 
     def LaunchPrebuild(self):
         if self.Prebuild:
             EdkLogger.info("\n- Prebuild Start -\n")
             self.LaunchPrebuildFlag = True
+            #
+            # The purpose of .PrebuildEnv file is capture environment variable settings set by the prebuild script
+            # and preserve them for the rest of the main build step, because the child process environment will
+            # evaporate as soon as it exits, we cannot get it in build step.
+            #
             PrebuildEnvFile = os.path.join(GlobalData.gConfDirectory,'.cache','.PrebuildEnv')
             if os.path.isfile(PrebuildEnvFile):
                 os.remove(PrebuildEnvFile)
             if os.path.isfile(self.PlatformBuildPath):
                 os.remove(self.PlatformBuildPath)
-- 
2.6.1.windows.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Patch] BaseTools: add some comment for .PrebuildEnv file's usage
  2017-07-25  5:58 [Patch] BaseTools: add some comment for .PrebuildEnv file's usage Yonghong Zhu
@ 2017-07-26  0:52 ` Gao, Liming
  0 siblings, 0 replies; 2+ messages in thread
From: Gao, Liming @ 2017-07-26  0:52 UTC (permalink / raw)
  To: Zhu, Yonghong, edk2-devel@lists.01.org

Reviewed-by: Liming Gao <liming.gao@intel.com>

>-----Original Message-----
>From: Zhu, Yonghong
>Sent: Tuesday, July 25, 2017 1:58 PM
>To: edk2-devel@lists.01.org
>Cc: Gao, Liming <liming.gao@intel.com>
>Subject: [Patch] BaseTools: add some comment for .PrebuildEnv file's usage
>
>This patch add some comments to explain why we use .PrebuildEnv file to
>save environment variable settings set by the prebuild script.
>
>Cc: Liming Gao <liming.gao@intel.com>
>Contributed-under: TianoCore Contribution Agreement 1.0
>Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
>---
> BaseTools/Source/Python/build/build.py | 5 +++++
> 1 file changed, 5 insertions(+)
>
>diff --git a/BaseTools/Source/Python/build/build.py
>b/BaseTools/Source/Python/build/build.py
>index f7634fa..4d05ee2 100644
>--- a/BaseTools/Source/Python/build/build.py
>+++ b/BaseTools/Source/Python/build/build.py
>@@ -1027,10 +1027,15 @@ class Build():
>
>     def LaunchPrebuild(self):
>         if self.Prebuild:
>             EdkLogger.info("\n- Prebuild Start -\n")
>             self.LaunchPrebuildFlag = True
>+            #
>+            # The purpose of .PrebuildEnv file is capture environment variable
>settings set by the prebuild script
>+            # and preserve them for the rest of the main build step, because the
>child process environment will
>+            # evaporate as soon as it exits, we cannot get it in build step.
>+            #
>             PrebuildEnvFile =
>os.path.join(GlobalData.gConfDirectory,'.cache','.PrebuildEnv')
>             if os.path.isfile(PrebuildEnvFile):
>                 os.remove(PrebuildEnvFile)
>             if os.path.isfile(self.PlatformBuildPath):
>                 os.remove(self.PlatformBuildPath)
>--
>2.6.1.windows.1



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-07-26  0:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-25  5:58 [Patch] BaseTools: add some comment for .PrebuildEnv file's usage Yonghong Zhu
2017-07-26  0:52 ` Gao, Liming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox