Skip to content

Commit

Permalink
BaseTools: Update windows and linux run scripts file to use Python3
Browse files Browse the repository at this point in the history
Modify windows script, PosixLike script, edksetup.sh, edksetup.bat to
use Python3 based on PYTHON3_ENABLE environment.

Cc: Bob Feng <[email protected]>
Cc: Liming Gao <[email protected]>
Cc: Yonghong Zhu <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhiju.Fan <[email protected]>
Tested-by: Laszlo Ersek <[email protected]>
Tested-by: Ard Biesheuvel <[email protected]>
Reviewed-by: Liming Gao <[email protected]>
Reviewed-by: Bob Feng <[email protected]>
  • Loading branch information
zhijufan authored and BobCF committed Feb 1, 2019
1 parent 94c9129 commit 9c2d68c
Show file tree
Hide file tree
Showing 39 changed files with 177 additions and 93 deletions.
6 changes: 3 additions & 3 deletions BaseTools/Bin/CYGWIN_NT-5.1-i686/Ecc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
#python `dirname $0`/RunToolFromSource.py `basename $0` $*

# If a python2 command is available, use it in preference to python
if command -v python2 >/dev/null 2>&1; then
python_exe=python2
# If a ${PYTHON} command is available, use it in preference to python
if command -v ${PYTHON} >/dev/null 2>&1; then
python_exe=${PYTHON}
fi

full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here
Expand Down
6 changes: 3 additions & 3 deletions BaseTools/Bin/CYGWIN_NT-5.1-i686/GenDepex
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
#python `dirname $0`/RunToolFromSource.py `basename $0` $*

# If a python2 command is available, use it in preference to python
if command -v python2 >/dev/null 2>&1; then
python_exe=python2
# If a ${PYTHON} command is available, use it in preference to python
if command -v ${PYTHON} >/dev/null 2>&1; then
python_exe=${PYTHON}
fi

full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here
Expand Down
6 changes: 3 additions & 3 deletions BaseTools/Bin/CYGWIN_NT-5.1-i686/GenFds
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
#python `dirname $0`/RunToolFromSource.py `basename $0` $*

# If a python2 command is available, use it in preference to python
if command -v python2 >/dev/null 2>&1; then
python_exe=python2
# If a ${PYTHON} command is available, use it in preference to python
if command -v ${PYTHON} >/dev/null 2>&1; then
python_exe=${PYTHON}
fi

full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here
Expand Down
6 changes: 3 additions & 3 deletions BaseTools/Bin/CYGWIN_NT-5.1-i686/TargetTool
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
#python `dirname $0`/RunToolFromSource.py `basename $0` $*

# If a python2 command is available, use it in preference to python
if command -v python2 >/dev/null 2>&1; then
python_exe=python2
# If a ${PYTHON} command is available, use it in preference to python
if command -v ${PYTHON} >/dev/null 2>&1; then
python_exe=${PYTHON}
fi

full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here
Expand Down
6 changes: 3 additions & 3 deletions BaseTools/Bin/CYGWIN_NT-5.1-i686/Trim
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
#python `dirname $0`/RunToolFromSource.py `basename $0` $*

# If a python2 command is available, use it in preference to python
if command -v python2 >/dev/null 2>&1; then
python_exe=python2
# If a ${PYTHON} command is available, use it in preference to python
if command -v ${PYTHON} >/dev/null 2>&1; then
python_exe=${PYTHON}
fi

full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here
Expand Down
6 changes: 3 additions & 3 deletions BaseTools/Bin/CYGWIN_NT-5.1-i686/build
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
#python `dirname $0`/RunToolFromSource.py `basename $0` $*

# If a python2 command is available, use it in preference to python
if command -v python2 >/dev/null 2>&1; then
python_exe=python2
# If a ${PYTHON} command is available, use it in preference to python
if command -v ${PYTHON} >/dev/null 2>&1; then
python_exe=${PYTHON}
fi

full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here
Expand Down
6 changes: 3 additions & 3 deletions BaseTools/BinWrappers/PosixLike/BPDG
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
#python `dirname $0`/RunToolFromSource.py `basename $0` $*

# If a python2 command is available, use it in preference to python
if command -v python2 >/dev/null 2>&1; then
python_exe=python2
# If a ${PYTHON} command is available, use it in preference to python
if command -v ${PYTHON} >/dev/null 2>&1; then
python_exe=${PYTHON}
fi

full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here
Expand Down
6 changes: 3 additions & 3 deletions BaseTools/BinWrappers/PosixLike/Ecc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
#python `dirname $0`/RunToolFromSource.py `basename $0` $*

# If a python2 command is available, use it in preference to python
if command -v python2 >/dev/null 2>&1; then
python_exe=python2
# If a ${PYTHON} command is available, use it in preference to python
if command -v ${PYTHON} >/dev/null 2>&1; then
python_exe=${PYTHON}
fi

full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here
Expand Down
6 changes: 3 additions & 3 deletions BaseTools/BinWrappers/PosixLike/GenDepex
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
#python `dirname $0`/RunToolFromSource.py `basename $0` $*

# If a python2 command is available, use it in preference to python
if command -v python2 >/dev/null 2>&1; then
python_exe=python2
# If a ${PYTHON} command is available, use it in preference to python
if command -v ${PYTHON} >/dev/null 2>&1; then
python_exe=${PYTHON}
fi

full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here
Expand Down
6 changes: 3 additions & 3 deletions BaseTools/BinWrappers/PosixLike/GenFds
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
#python `dirname $0`/RunToolFromSource.py `basename $0` $*

# If a python2 command is available, use it in preference to python
if command -v python2 >/dev/null 2>&1; then
python_exe=python2
# If a ${PYTHON} command is available, use it in preference to python
if command -v ${PYTHON} >/dev/null 2>&1; then
python_exe=${PYTHON}
fi

full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here
Expand Down
6 changes: 3 additions & 3 deletions BaseTools/BinWrappers/PosixLike/GenPatchPcdTable
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
#python `dirname $0`/RunToolFromSource.py `basename $0` $*

# If a python2 command is available, use it in preference to python
if command -v python2 >/dev/null 2>&1; then
python_exe=python2
# If a ${PYTHON} command is available, use it in preference to python
if command -v ${PYTHON} >/dev/null 2>&1; then
python_exe=${PYTHON}
fi

full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here
Expand Down
6 changes: 3 additions & 3 deletions BaseTools/BinWrappers/PosixLike/GenerateCapsule
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
#python `dirname $0`/RunToolFromSource.py `basename $0` $*

# If a python2 command is available, use it in preference to python
if command -v python2 >/dev/null 2>&1; then
python_exe=python2
# If a ${PYTHON} command is available, use it in preference to python
if command -v ${PYTHON} >/dev/null 2>&1; then
python_exe=${PYTHON}
fi

full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here
Expand Down
6 changes: 3 additions & 3 deletions BaseTools/BinWrappers/PosixLike/PatchPcdValue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
#python `dirname $0`/RunToolFromSource.py `basename $0` $*

# If a python2 command is available, use it in preference to python
if command -v python2 >/dev/null 2>&1; then
python_exe=python2
# If a ${PYTHON} command is available, use it in preference to python
if command -v ${PYTHON} >/dev/null 2>&1; then
python_exe=${PYTHON}
fi

full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here
Expand Down
6 changes: 3 additions & 3 deletions BaseTools/BinWrappers/PosixLike/Pkcs7Sign
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
#python `dirname $0`/RunToolFromSource.py `basename $0` $*

# If a python2 command is available, use it in preference to python
if command -v python2 >/dev/null 2>&1; then
python_exe=python2
# If a ${PYTHON} command is available, use it in preference to python
if command -v ${PYTHON} >/dev/null 2>&1; then
python_exe=${PYTHON}
fi

full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here
Expand Down
6 changes: 3 additions & 3 deletions BaseTools/BinWrappers/PosixLike/Rsa2048Sha256GenerateKeys
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
#python `dirname $0`/RunToolFromSource.py `basename $0` $*

# If a python2 command is available, use it in preference to python
if command -v python2 >/dev/null 2>&1; then
python_exe=python2
# If a ${PYTHON} command is available, use it in preference to python
if command -v ${PYTHON} >/dev/null 2>&1; then
python_exe=${PYTHON}
fi

full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here
Expand Down
6 changes: 3 additions & 3 deletions BaseTools/BinWrappers/PosixLike/Rsa2048Sha256Sign
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
#python `dirname $0`/RunToolFromSource.py `basename $0` $*

# If a python2 command is available, use it in preference to python
if command -v python2 >/dev/null 2>&1; then
python_exe=python2
# If a ${PYTHON} command is available, use it in preference to python
if command -v ${PYTHON} >/dev/null 2>&1; then
python_exe=${PYTHON}
fi

full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here
Expand Down
6 changes: 3 additions & 3 deletions BaseTools/BinWrappers/PosixLike/TargetTool
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
#python `dirname $0`/RunToolFromSource.py `basename $0` $*

# If a python2 command is available, use it in preference to python
if command -v python2 >/dev/null 2>&1; then
python_exe=python2
# If a ${PYTHON} command is available, use it in preference to python
if command -v ${PYTHON} >/dev/null 2>&1; then
python_exe=${PYTHON}
fi

full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here
Expand Down
6 changes: 3 additions & 3 deletions BaseTools/BinWrappers/PosixLike/Trim
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
#python `dirname $0`/RunToolFromSource.py `basename $0` $*

# If a python2 command is available, use it in preference to python
if command -v python2 >/dev/null 2>&1; then
python_exe=python2
# If a ${PYTHON} command is available, use it in preference to python
if command -v ${PYTHON} >/dev/null 2>&1; then
python_exe=${PYTHON}
fi

full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here
Expand Down
6 changes: 3 additions & 3 deletions BaseTools/BinWrappers/PosixLike/UPT
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
#python `dirname $0`/RunToolFromSource.py `basename $0` $*

# If a python2 command is available, use it in preference to python
if command -v python2 >/dev/null 2>&1; then
python_exe=python2
# If a ${PYTHON} command is available, use it in preference to python
if command -v ${PYTHON} >/dev/null 2>&1; then
python_exe=${PYTHON}
fi

full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here
Expand Down
6 changes: 3 additions & 3 deletions BaseTools/BinWrappers/PosixLike/build
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
#python `dirname $0`/RunToolFromSource.py `basename $0` $*

# If a python2 command is available, use it in preference to python
if command -v python2 >/dev/null 2>&1; then
python_exe=python2
# If a ${PYTHON} command is available, use it in preference to python
if command -v ${PYTHON} >/dev/null 2>&1; then
python_exe=${PYTHON}
fi

full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here
Expand Down
2 changes: 1 addition & 1 deletion BaseTools/BinWrappers/WindowsLike/BPDG.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@setlocal
@set ToolName=%~n0%
@set PYTHONPATH=%PYTHONPATH%;%BASE_TOOLS_PATH%\Source\Python
@%PYTHON_HOME%\python.exe -m %ToolName%.%ToolName% %*
@%PYTHON% -m %ToolName%.%ToolName% %*
2 changes: 1 addition & 1 deletion BaseTools/BinWrappers/WindowsLike/Ecc.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@setlocal
@set ToolName=%~n0%
@set PYTHONPATH=%PYTHONPATH%;%BASE_TOOLS_PATH%\Source\Python
@%PYTHON_HOME%\python.exe -m %ToolName%.EccMain %*
@%PYTHON% -m %ToolName%.EccMain %*
2 changes: 1 addition & 1 deletion BaseTools/BinWrappers/WindowsLike/GenDepex.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@setlocal
@set ToolName=%~n0%
@%PYTHON_HOME%\python.exe %BASE_TOOLS_PATH%\Source\Python\AutoGen\%ToolName%.py %*
@%PYTHON% %BASE_TOOLS_PATH%\Source\Python\AutoGen\%ToolName%.py %*
2 changes: 1 addition & 1 deletion BaseTools/BinWrappers/WindowsLike/GenFds.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@setlocal
@set ToolName=%~n0%
@set PYTHONPATH=%PYTHONPATH%;%BASE_TOOLS_PATH%\Source\Python
@%PYTHON_HOME%\python.exe -m %ToolName%.%ToolName% %*
@%PYTHON% -m %ToolName%.%ToolName% %*
2 changes: 1 addition & 1 deletion BaseTools/BinWrappers/WindowsLike/GenPatchPcdTable.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@setlocal
@set ToolName=%~n0%
@%PYTHON_HOME%\python.exe %BASE_TOOLS_PATH%\Source\Python\%ToolName%\%ToolName%.py %*
@%PYTHON% %BASE_TOOLS_PATH%\Source\Python\%ToolName%\%ToolName%.py %*
2 changes: 1 addition & 1 deletion BaseTools/BinWrappers/WindowsLike/GenerateCapsule.bat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@%PYTHON_HOME%\python.exe %BASE_TOOLS_PATH%\Source\Python\Capsule\GenerateCapsule.py %*
@%PYTHON% %BASE_TOOLS_PATH%\Source\Python\Capsule\GenerateCapsule.py %*
2 changes: 1 addition & 1 deletion BaseTools/BinWrappers/WindowsLike/PatchPcdValue.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@setlocal
@set ToolName=%~n0%
@%PYTHON_HOME%\python.exe %BASE_TOOLS_PATH%\Source\Python\%ToolName%\%ToolName%.py %*
@%PYTHON% %BASE_TOOLS_PATH%\Source\Python\%ToolName%\%ToolName%.py %*
2 changes: 1 addition & 1 deletion BaseTools/BinWrappers/WindowsLike/Pkcs7Sign.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@setlocal
@set ToolName=%~n0%
@%PYTHON_HOME%\python.exe %BASE_TOOLS_PATH%\Source\Python\%ToolName%\%ToolName%.py %*
@%PYTHON% %BASE_TOOLS_PATH%\Source\Python\%ToolName%\%ToolName%.py %*
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@%PYTHON_HOME%\python.exe %BASE_TOOLS_PATH%\Source\Python\Rsa2048Sha256Sign\Rsa2048Sha256GenerateKeys.py %*
@%PYTHON% %BASE_TOOLS_PATH%\Source\Python\Rsa2048Sha256Sign\Rsa2048Sha256GenerateKeys.py %*
2 changes: 1 addition & 1 deletion BaseTools/BinWrappers/WindowsLike/Rsa2048Sha256Sign.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@setlocal
@set ToolName=%~n0%
@%PYTHON_HOME%\python.exe %BASE_TOOLS_PATH%\Source\Python\%ToolName%\%ToolName%.py %*
@%PYTHON% %BASE_TOOLS_PATH%\Source\Python\%ToolName%\%ToolName%.py %*
2 changes: 1 addition & 1 deletion BaseTools/BinWrappers/WindowsLike/TargetTool.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@setlocal
@set ToolName=%~n0%
@%PYTHON_HOME%\python.exe %BASE_TOOLS_PATH%\Source\Python\%ToolName%\%ToolName%.py %*
@%PYTHON% %BASE_TOOLS_PATH%\Source\Python\%ToolName%\%ToolName%.py %*
2 changes: 1 addition & 1 deletion BaseTools/BinWrappers/WindowsLike/Trim.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@setlocal
@set ToolName=%~n0%
@%PYTHON_HOME%\python.exe %BASE_TOOLS_PATH%\Source\Python\%ToolName%\%ToolName%.py %*
@%PYTHON% %BASE_TOOLS_PATH%\Source\Python\%ToolName%\%ToolName%.py %*
2 changes: 1 addition & 1 deletion BaseTools/BinWrappers/WindowsLike/UPT.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@setlocal
@set ToolName=%~n0%
@%PYTHON_HOME%\python.exe %BASE_TOOLS_PATH%\Source\Python\%ToolName%\%ToolName%.py %*
@%PYTHON% %BASE_TOOLS_PATH%\Source\Python\%ToolName%\%ToolName%.py %*
2 changes: 1 addition & 1 deletion BaseTools/BinWrappers/WindowsLike/build.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@setlocal
@set ToolName=%~n0%
@%PYTHON_HOME%\python.exe %BASE_TOOLS_PATH%\Source\Python\%ToolName%\%ToolName%.py %*
@%PYTHON% %BASE_TOOLS_PATH%\Source\Python\%ToolName%\%ToolName%.py %*
8 changes: 4 additions & 4 deletions BaseTools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ SUBDIRS = $(BASE_TOOLS_PATH)\Source\C $(BASE_TOOLS_PATH)\Source\Python
all: c

c :
@$(PYTHON_HOME)\python.exe $(BASE_TOOLS_PATH)\Source\C\Makefiles\NmakeSubdirs.py all $(BASE_TOOLS_PATH)\Source\C
@$(PYTHON) $(BASE_TOOLS_PATH)\Source\C\Makefiles\NmakeSubdirs.py all $(BASE_TOOLS_PATH)\Source\C


subdirs: $(SUBDIRS)
@$(PYTHON_HOME)\python.exe $(BASE_TOOLS_PATH)\Source\C\Makefiles\NmakeSubdirs.py all $**
@$(PYTHON) $(BASE_TOOLS_PATH)\Source\C\Makefiles\NmakeSubdirs.py all $**

.PHONY: clean
clean:
$(PYTHON_HOME)\python.exe $(BASE_TOOLS_PATH)\Source\C\Makefiles\NmakeSubdirs.py clean $(SUBDIRS)
$(PYTHON) $(BASE_TOOLS_PATH)\Source\C\Makefiles\NmakeSubdirs.py clean $(SUBDIRS)

.PHONY: cleanall
cleanall:
$(PYTHON_HOME)\python.exe $(BASE_TOOLS_PATH)\Source\C\Makefiles\NmakeSubdirs.py cleanall $(SUBDIRS)
$(PYTHON) $(BASE_TOOLS_PATH)\Source\C\Makefiles\NmakeSubdirs.py cleanall $(SUBDIRS)

8 changes: 4 additions & 4 deletions BaseTools/Source/C/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ libs: $(LIBRARIES)
@echo # Build libraries
@echo ######################
@if not exist $(LIB_PATH) mkdir $(LIB_PATH)
@$(PYTHON_HOME)\python.exe Makefiles\NmakeSubdirs.py all $**
@$(PYTHON) Makefiles\NmakeSubdirs.py all $**

apps: $(APPLICATIONS)
@echo.
@echo ######################
@echo # Build executables
@echo ######################
@if not exist $(BIN_PATH) mkdir $(BIN_PATH)
@$(PYTHON_HOME)\python.exe Makefiles\NmakeSubdirs.py all $**
@$(PYTHON) Makefiles\NmakeSubdirs.py all $**

install: $(LIB_PATH) $(BIN_PATH)
@echo.
Expand All @@ -60,11 +60,11 @@ install: $(LIB_PATH) $(BIN_PATH)

.PHONY: clean
clean:
@$(PYTHON_HOME)\python.exe Makefiles\NmakeSubdirs.py clean $(LIBRARIES) $(APPLICATIONS)
@$(PYTHON) Makefiles\NmakeSubdirs.py clean $(LIBRARIES) $(APPLICATIONS)

.PHONY: cleanall
cleanall:
@$(PYTHON_HOME)\python.exe Makefiles\NmakeSubdirs.py cleanall $(LIBRARIES) $(APPLICATIONS)
@$(PYTHON) Makefiles\NmakeSubdirs.py cleanall $(LIBRARIES) $(APPLICATIONS)

!INCLUDE Makefiles\ms.rule

2 changes: 1 addition & 1 deletion BaseTools/Tests/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
all: test

test:
@if command -v python2 >/dev/null 2>&1; then python2 RunTests.py; else python RunTests.py; fi
@if command -v $(PYTHON) >/dev/null 1; then $(PYTHON) RunTests.py; else python RunTests.py; fi

clean:
find . -name '*.pyc' -exec rm '{}' ';'
Expand Down
Loading

0 comments on commit 9c2d68c

Please sign in to comment.