summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/Makefile
diff options
context:
space:
mode:
authorLiming Gao <liming.gao@intel.com>2016-09-12 15:25:07 +0800
committerLiming Gao <liming.gao@intel.com>2016-09-21 10:49:18 +0800
commitefb1e40f91353d763b02a40c41ad7a38f3d8ff90 (patch)
treea80cd7fed06861d7c9029dc6b97d66cf2f7c53e7 /BaseTools/Source/Python/Makefile
parent71f5913eb9127305dc6ec63936c3c283975d86c0 (diff)
downloadedk2-efb1e40f91353d763b02a40c41ad7a38f3d8ff90.tar.gz
edk2-efb1e40f91353d763b02a40c41ad7a38f3d8ff90.tar.bz2
edk2-efb1e40f91353d763b02a40c41ad7a38f3d8ff90.zip
BaseTools: Update Python Makefile not to depend on PYTHON_FREEZER_PATH
If PYTHON_FREEZER_PATH is not set, Python tools will not be freeze. Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Erik Bjorge <erik.c.bjorge@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Makefile')
-rw-r--r--BaseTools/Source/Python/Makefile17
1 files changed, 13 insertions, 4 deletions
diff --git a/BaseTools/Source/Python/Makefile b/BaseTools/Source/Python/Makefile
index 28be6717fe..e7755cdbf8 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