diff options
author | Liming Gao <liming.gao@intel.com> | 2018-12-28 16:25:04 +0800 |
---|---|---|
committer | Feng, Bob C <bob.c.feng@intel.com> | 2019-02-01 11:09:23 +0800 |
commit | 7aef7b7cbf16f79fb17c5ace98b1bc7f15bb90fa (patch) | |
tree | 360f42806db00160fa79e6d2647722b3782c5206 /BaseTools/Source/C | |
parent | d8238aaf862a55eec77040844c71a02c71294e86 (diff) | |
download | edk2-7aef7b7cbf16f79fb17c5ace98b1bc7f15bb90fa.tar.gz edk2-7aef7b7cbf16f79fb17c5ace98b1bc7f15bb90fa.tar.bz2 edk2-7aef7b7cbf16f79fb17c5ace98b1bc7f15bb90fa.zip |
BaseTools: Update PYTHON env to PYTHON_COMMAND
Update PYTHON env to PYTHON_COMMAND.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
Diffstat (limited to 'BaseTools/Source/C')
-rw-r--r-- | BaseTools/Source/C/Makefile | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/BaseTools/Source/C/Makefile b/BaseTools/Source/C/Makefile index dd39661272..08f0081212 100644 --- a/BaseTools/Source/C/Makefile +++ b/BaseTools/Source/C/Makefile @@ -38,7 +38,8 @@ libs: $(LIBRARIES) @echo # Build libraries
@echo ######################
@if not exist $(LIB_PATH) mkdir $(LIB_PATH)
- @$(PYTHON) Makefiles\NmakeSubdirs.py all $**
+ @if defined PYTHON_COMMAND $(PYTHON_COMMAND) Makefiles\NmakeSubdirs.py all $**
+ @if not defined PYTHON_COMMAND $(PYTHON_HOME)\python.exe Makefiles\NmakeSubdirs.py all $**
apps: $(APPLICATIONS)
@echo.
@@ -46,7 +47,8 @@ apps: $(APPLICATIONS) @echo # Build executables
@echo ######################
@if not exist $(BIN_PATH) mkdir $(BIN_PATH)
- @$(PYTHON) Makefiles\NmakeSubdirs.py all $**
+ @if defined PYTHON_COMMAND $(PYTHON_COMMAND) Makefiles\NmakeSubdirs.py all $**
+ @if not defined PYTHON_COMMAND $(PYTHON_HOME)\python.exe Makefiles\NmakeSubdirs.py all $**
install: $(LIB_PATH) $(BIN_PATH)
@echo.
@@ -60,11 +62,13 @@ install: $(LIB_PATH) $(BIN_PATH) .PHONY: clean
clean:
- @$(PYTHON) Makefiles\NmakeSubdirs.py clean $(LIBRARIES) $(APPLICATIONS)
+ @if defined PYTHON_COMMAND $(PYTHON_COMMAND) Makefiles\NmakeSubdirs.py clean $(LIBRARIES) $(APPLICATIONS)
+ @if not defined PYTHON_COMMAND $(PYTHON_HOME)\python.exe Makefiles\NmakeSubdirs.py clean $(LIBRARIES) $(APPLICATIONS)
.PHONY: cleanall
cleanall:
- @$(PYTHON) Makefiles\NmakeSubdirs.py cleanall $(LIBRARIES) $(APPLICATIONS)
+ @if defined PYTHON_COMMAND $(PYTHON_COMMAND) $(PYTHON_COMMAND) Makefiles\NmakeSubdirs.py cleanall $(LIBRARIES) $(APPLICATIONS)
+ @if not defined PYTHON_COMMAND $(PYTHON_HOME)\python.exe $(PYTHON_COMMAND) Makefiles\NmakeSubdirs.py cleanall $(LIBRARIES) $(APPLICATIONS)
!INCLUDE Makefiles\ms.rule
|