Skip to content

Commit

Permalink
BaseTools: Update PYTHON env to PYTHON_COMMAND
Browse files Browse the repository at this point in the history
Update PYTHON env to PYTHON_COMMAND.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <[email protected]>
Tested-by: Laszlo Ersek <[email protected]>
Tested-by: Ard Biesheuvel <[email protected]>
Reviewed-by: Bob Feng <[email protected]>
  • Loading branch information
lgao4 authored and BobCF committed Feb 1, 2019
1 parent d8238aa commit 7aef7b7
Show file tree
Hide file tree
Showing 41 changed files with 194 additions and 120 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 ${PYTHON} command is available, use it in preference to python
if command -v ${PYTHON} >/dev/null 2>&1; then
python_exe=${PYTHON}
# If a ${PYTHON_COMMAND} command is available, use it in preference to python
if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then
python_exe=${PYTHON_COMMAND}
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 ${PYTHON} command is available, use it in preference to python
if command -v ${PYTHON} >/dev/null 2>&1; then
python_exe=${PYTHON}
# If a ${PYTHON_COMMAND} command is available, use it in preference to python
if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then
python_exe=${PYTHON_COMMAND}
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 ${PYTHON} command is available, use it in preference to python
if command -v ${PYTHON} >/dev/null 2>&1; then
python_exe=${PYTHON}
# If a ${PYTHON_COMMAND} command is available, use it in preference to python
if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then
python_exe=${PYTHON_COMMAND}
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 ${PYTHON} command is available, use it in preference to python
if command -v ${PYTHON} >/dev/null 2>&1; then
python_exe=${PYTHON}
# If a ${PYTHON_COMMAND} command is available, use it in preference to python
if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then
python_exe=${PYTHON_COMMAND}
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 ${PYTHON} command is available, use it in preference to python
if command -v ${PYTHON} >/dev/null 2>&1; then
python_exe=${PYTHON}
# If a ${PYTHON_COMMAND} command is available, use it in preference to python
if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then
python_exe=${PYTHON_COMMAND}
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 ${PYTHON} command is available, use it in preference to python
if command -v ${PYTHON} >/dev/null 2>&1; then
python_exe=${PYTHON}
# If a ${PYTHON_COMMAND} command is available, use it in preference to python
if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then
python_exe=${PYTHON_COMMAND}
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 ${PYTHON} command is available, use it in preference to python
if command -v ${PYTHON} >/dev/null 2>&1; then
python_exe=${PYTHON}
# If a ${PYTHON_COMMAND} command is available, use it in preference to python
if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then
python_exe=${PYTHON_COMMAND}
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 ${PYTHON} command is available, use it in preference to python
if command -v ${PYTHON} >/dev/null 2>&1; then
python_exe=${PYTHON}
# If a ${PYTHON_COMMAND} command is available, use it in preference to python
if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then
python_exe=${PYTHON_COMMAND}
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 ${PYTHON} command is available, use it in preference to python
if command -v ${PYTHON} >/dev/null 2>&1; then
python_exe=${PYTHON}
# If a ${PYTHON_COMMAND} command is available, use it in preference to python
if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then
python_exe=${PYTHON_COMMAND}
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 ${PYTHON} command is available, use it in preference to python
if command -v ${PYTHON} >/dev/null 2>&1; then
python_exe=${PYTHON}
# If a ${PYTHON_COMMAND} command is available, use it in preference to python
if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then
python_exe=${PYTHON_COMMAND}
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 ${PYTHON} command is available, use it in preference to python
if command -v ${PYTHON} >/dev/null 2>&1; then
python_exe=${PYTHON}
# If a ${PYTHON_COMMAND} command is available, use it in preference to python
if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then
python_exe=${PYTHON_COMMAND}
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 ${PYTHON} command is available, use it in preference to python
if command -v ${PYTHON} >/dev/null 2>&1; then
python_exe=${PYTHON}
# If a ${PYTHON_COMMAND} command is available, use it in preference to python
if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then
python_exe=${PYTHON_COMMAND}
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 ${PYTHON} command is available, use it in preference to python
if command -v ${PYTHON} >/dev/null 2>&1; then
python_exe=${PYTHON}
# If a ${PYTHON_COMMAND} command is available, use it in preference to python
if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then
python_exe=${PYTHON_COMMAND}
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 ${PYTHON} command is available, use it in preference to python
if command -v ${PYTHON} >/dev/null 2>&1; then
python_exe=${PYTHON}
# If a ${PYTHON_COMMAND} command is available, use it in preference to python
if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then
python_exe=${PYTHON_COMMAND}
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 ${PYTHON} command is available, use it in preference to python
if command -v ${PYTHON} >/dev/null 2>&1; then
python_exe=${PYTHON}
# If a ${PYTHON_COMMAND} command is available, use it in preference to python
if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then
python_exe=${PYTHON_COMMAND}
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 ${PYTHON} command is available, use it in preference to python
if command -v ${PYTHON} >/dev/null 2>&1; then
python_exe=${PYTHON}
# If a ${PYTHON_COMMAND} command is available, use it in preference to python
if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then
python_exe=${PYTHON_COMMAND}
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 ${PYTHON} command is available, use it in preference to python
if command -v ${PYTHON} >/dev/null 2>&1; then
python_exe=${PYTHON}
# If a ${PYTHON_COMMAND} command is available, use it in preference to python
if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then
python_exe=${PYTHON_COMMAND}
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 ${PYTHON} command is available, use it in preference to python
if command -v ${PYTHON} >/dev/null 2>&1; then
python_exe=${PYTHON}
# If a ${PYTHON_COMMAND} command is available, use it in preference to python
if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then
python_exe=${PYTHON_COMMAND}
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 ${PYTHON} command is available, use it in preference to python
if command -v ${PYTHON} >/dev/null 2>&1; then
python_exe=${PYTHON}
# If a ${PYTHON_COMMAND} command is available, use it in preference to python
if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then
python_exe=${PYTHON_COMMAND}
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 ${PYTHON} command is available, use it in preference to python
if command -v ${PYTHON} >/dev/null 2>&1; then
python_exe=${PYTHON}
# If a ${PYTHON_COMMAND} command is available, use it in preference to python
if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then
python_exe=${PYTHON_COMMAND}
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% -m %ToolName%.%ToolName% %*
@%PYTHON_COMMAND% -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% -m %ToolName%.EccMain %*
@%PYTHON_COMMAND% -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% %BASE_TOOLS_PATH%\Source\Python\AutoGen\%ToolName%.py %*
@%PYTHON_COMMAND% %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% -m %ToolName%.%ToolName% %*
@%PYTHON_COMMAND% -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% %BASE_TOOLS_PATH%\Source\Python\%ToolName%\%ToolName%.py %*
@%PYTHON_COMMAND% %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% %BASE_TOOLS_PATH%\Source\Python\Capsule\GenerateCapsule.py %*
@%PYTHON_COMMAND% %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% %BASE_TOOLS_PATH%\Source\Python\%ToolName%\%ToolName%.py %*
@%PYTHON_COMMAND% %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% %BASE_TOOLS_PATH%\Source\Python\%ToolName%\%ToolName%.py %*
@%PYTHON_COMMAND% %BASE_TOOLS_PATH%\Source\Python\%ToolName%\%ToolName%.py %*
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@%PYTHON% %BASE_TOOLS_PATH%\Source\Python\Rsa2048Sha256Sign\Rsa2048Sha256GenerateKeys.py %*
@%PYTHON_COMMAND% %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% %BASE_TOOLS_PATH%\Source\Python\%ToolName%\%ToolName%.py %*
@%PYTHON_COMMAND% %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% %BASE_TOOLS_PATH%\Source\Python\%ToolName%\%ToolName%.py %*
@%PYTHON_COMMAND% %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% %BASE_TOOLS_PATH%\Source\Python\%ToolName%\%ToolName%.py %*
@%PYTHON_COMMAND% %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% %BASE_TOOLS_PATH%\Source\Python\%ToolName%\%ToolName%.py %*
@%PYTHON_COMMAND% %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% %BASE_TOOLS_PATH%\Source\Python\%ToolName%\%ToolName%.py %*
@%PYTHON_COMMAND% %BASE_TOOLS_PATH%\Source\Python\%ToolName%\%ToolName%.py %*
12 changes: 8 additions & 4 deletions BaseTools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,21 @@ SUBDIRS = $(BASE_TOOLS_PATH)\Source\C $(BASE_TOOLS_PATH)\Source\Python
all: c

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


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

.PHONY: clean
clean:
$(PYTHON) $(BASE_TOOLS_PATH)\Source\C\Makefiles\NmakeSubdirs.py clean $(SUBDIRS)
@if defined PYTHON_COMMAND $(PYTHON_COMMAND) $(BASE_TOOLS_PATH)\Source\C\Makefiles\NmakeSubdirs.py clean $(SUBDIRS)
@if not defined PYTHON_COMMAND $(PYTHON_HOME)\python.exe $(BASE_TOOLS_PATH)\Source\C\Makefiles\NmakeSubdirs.py clean $(SUBDIRS)

.PHONY: cleanall
cleanall:
$(PYTHON) $(BASE_TOOLS_PATH)\Source\C\Makefiles\NmakeSubdirs.py cleanall $(SUBDIRS)
@if defined PYTHON_COMMAND $(PYTHON_COMMAND) $(BASE_TOOLS_PATH)\Source\C\Makefiles\NmakeSubdirs.py cleanall $(SUBDIRS)
@if not defined PYTHON_COMMAND $(PYTHON_HOME)\python.exe $(BASE_TOOLS_PATH)\Source\C\Makefiles\NmakeSubdirs.py cleanall $(SUBDIRS)

12 changes: 8 additions & 4 deletions BaseTools/Source/C/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,17 @@ 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.
@echo ######################
@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.
Expand All @@ -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

Loading

0 comments on commit 7aef7b7

Please sign in to comment.