]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: add some comment for .PrebuildEnv file's usage
authorYonghong Zhu <yonghong.zhu@intel.com>
Tue, 25 Jul 2017 05:56:53 +0000 (13:56 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Wed, 26 Jul 2017 02:26:40 +0000 (10:26 +0800)
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>
Reviewed-by: Liming Gao <liming.gao@intel.com>
BaseTools/Source/Python/build/build.py

index 1e14fb4dcc7d259f48347fc9a6f61a36e7930ef5..eff1e66b08f327994eddcf605202b4e4a7d69b38 100644 (file)
@@ -1029,6 +1029,11 @@ class Build():
         if self.Prebuild:\r
             EdkLogger.info("\n- Prebuild Start -\n")\r
             self.LaunchPrebuildFlag = True\r
+            #\r
+            # The purpose of .PrebuildEnv file is capture environment variable settings set by the prebuild script\r
+            # and preserve them for the rest of the main build step, because the child process environment will\r
+            # evaporate as soon as it exits, we cannot get it in build step.\r
+            #\r
             PrebuildEnvFile = os.path.join(GlobalData.gConfDirectory,'.cache','.PrebuildEnv')\r
             if os.path.isfile(PrebuildEnvFile):\r
                 os.remove(PrebuildEnvFile)\r