From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id C17A02095DBBA for ; Mon, 24 Jul 2017 22:56:03 -0700 (PDT) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jul 2017 22:58:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,410,1496127600"; d="scan'208";a="129094443" Received: from shwdeopenpsi168.ccr.corp.intel.com ([10.239.158.121]) by orsmga005.jf.intel.com with ESMTP; 24 Jul 2017 22:58:03 -0700 From: Yonghong Zhu To: edk2-devel@lists.01.org Cc: Liming Gao Date: Tue, 25 Jul 2017 13:58:00 +0800 Message-Id: <1500962280-24272-1-git-send-email-yonghong.zhu@intel.com> X-Mailer: git-send-email 2.6.1.windows.1 Subject: [Patch] BaseTools: add some comment for .PrebuildEnv file's usage X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Jul 2017 05:56:04 -0000 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 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- 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