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 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D6D001A1E11 for ; Mon, 12 Sep 2016 09:05:06 -0700 (PDT) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga102.fm.intel.com with ESMTP; 12 Sep 2016 09:05:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,323,1470726000"; d="scan'208";a="7595457" Received: from shwde7172.ccr.corp.intel.com ([10.239.9.23]) by orsmga005.jf.intel.com with ESMTP; 12 Sep 2016 09:05:05 -0700 From: Liming Gao To: edk2-devel@lists.01.org Cc: Yonghong Zhu , Michael Kinney , Erik Bjorge Date: Tue, 13 Sep 2016 00:03:29 +0800 Message-Id: <1473696210-6264-4-git-send-email-liming.gao@intel.com> X-Mailer: git-send-email 2.8.0.windows.1 In-Reply-To: <1473696210-6264-1-git-send-email-liming.gao@intel.com> References: <1473696210-6264-1-git-send-email-liming.gao@intel.com> Subject: [Patch 3/4] BaseTools: Update Python Makefile not to depend on PYTHON_FREEZER_PATH X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Sep 2016 16:05:07 -0000 If PYTHON_FREEZER_PATH is not set, Python tools will not be freeze. Cc: Yonghong Zhu Cc: Michael Kinney Cc: Erik Bjorge Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao --- BaseTools/Source/Python/Makefile | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/BaseTools/Source/Python/Makefile b/BaseTools/Source/Python/Makefile index 28be671..e7755cd 100644 --- a/BaseTools/Source/Python/Makefile +++ b/BaseTools/Source/Python/Makefile @@ -11,16 +11,17 @@ # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # -!IFNDEF PYTHON_FREEZER_PATH -!ERROR PYTHON_FREEZER_PATH must be defined! +!IFNDEF PYTHON_HOME +!ERROR PYTHON_HOME must be defined! !ENDIF +!IFDEF PYTHON_FREEZER_PATH !IF EXIST ($(PYTHON_FREEZER_PATH)\cxfreeze) # Using cx_Freeze 4.2.3 with Python 2.7.2 FREEZE=$(PYTHON_HOME)\python $(PYTHON_FREEZER_PATH)\cxfreeze !ELSE -# Using cx_Freeze 3.0.3 with Python 2.5.4 -FREEZE=$(PYTHON_FREEZER_PATH)\FreezePython.exe +!ERROR PYTHON_FREEZER_PATH does not exist! +!ENDIF !ENDIF MODULES=encodings.cp437,encodings.gbk,encodings.utf_16,encodings.utf_8,encodings.utf_16_le,encodings.latin_1,encodings.ascii @@ -236,7 +237,14 @@ CMD_UPT=$(BASE_TOOLS_PATH)\Source\Python\UPT\Core\DependencyRules.py \ $(BASE_TOOLS_PATH)\Source\Python\UPT\Xml\XmlParser.py \ $(BASE_TOOLS_PATH)\Source\Python\UPT\Xml\XmlParserMisc.py +!IFDEF PYTHON_FREEZER_PATH all: SetPythonPath $(APPLICATIONS) +!ELSE +all: + @echo. + @echo !!! WARNING !!! PYTHON_FREEZER_PATH is not set. + @echo Cannot make executable from Python code, executing python scripts instead !!! +!ENDIF SetPythonPath: set PYTHONPATH=$(BASE_TOOLS_PATH)\Source\Python @@ -310,5 +318,6 @@ $(BIN_DIR)\TestRoot.pub.pem: $(BASE_TOOLS_PATH)\Source\Python\Pkcs7Sign\TestRoot clean: cleanall: @del /f /q $(BIN_DIR)\*.pyd $(BIN_DIR)\*.dll + @del /f /q $(BASE_TOOLS_PATH)\Source\Python\*.pyc @for %%i in ($(APPLICATIONS)) do @del /f /q %%i -- 2.8.0.windows.1