mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-11-15 06:05:13 +08:00
kbuild: remove PYTHON variable
Python retired in 2020, and some distributions do not provide the
'python' command any more.
As in commit 51839e29cb
("scripts: switch explicitly to Python 3"),
we need to use more specific 'python3' to invoke scripts even if they
are written in a way compatible with both Python 2 and 3.
This commit removes the variable 'PYTHON', and switches the existing
users to 'PYTHON3'.
BTW, PEP 394 (https://www.python.org/dev/peps/pep-0394/) is a helpful
material.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
This commit is contained in:
parent
ed4e9e615b
commit
d8d2d38275
@ -75,7 +75,7 @@ quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4)
|
|||||||
cmd_sphinx = $(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) $(build)=Documentation/userspace-api/media $2 && \
|
cmd_sphinx = $(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) $(build)=Documentation/userspace-api/media $2 && \
|
||||||
PYTHONDONTWRITEBYTECODE=1 \
|
PYTHONDONTWRITEBYTECODE=1 \
|
||||||
BUILDDIR=$(abspath $(BUILDDIR)) SPHINX_CONF=$(abspath $(srctree)/$(src)/$5/$(SPHINX_CONF)) \
|
BUILDDIR=$(abspath $(BUILDDIR)) SPHINX_CONF=$(abspath $(srctree)/$(src)/$5/$(SPHINX_CONF)) \
|
||||||
$(PYTHON) $(srctree)/scripts/jobserver-exec \
|
$(PYTHON3) $(srctree)/scripts/jobserver-exec \
|
||||||
$(SHELL) $(srctree)/Documentation/sphinx/parallel-wrapper.sh \
|
$(SHELL) $(srctree)/Documentation/sphinx/parallel-wrapper.sh \
|
||||||
$(SPHINXBUILD) \
|
$(SPHINXBUILD) \
|
||||||
-b $2 \
|
-b $2 \
|
||||||
|
@ -755,7 +755,7 @@ more details, with real examples.
|
|||||||
bits on the scripts nonetheless.
|
bits on the scripts nonetheless.
|
||||||
|
|
||||||
Kbuild provides variables $(CONFIG_SHELL), $(AWK), $(PERL),
|
Kbuild provides variables $(CONFIG_SHELL), $(AWK), $(PERL),
|
||||||
$(PYTHON) and $(PYTHON3) to refer to interpreters for the respective
|
and $(PYTHON3) to refer to interpreters for the respective
|
||||||
scripts.
|
scripts.
|
||||||
|
|
||||||
Example::
|
Example::
|
||||||
|
3
Makefile
3
Makefile
@ -452,7 +452,6 @@ AWK = awk
|
|||||||
INSTALLKERNEL := installkernel
|
INSTALLKERNEL := installkernel
|
||||||
DEPMOD = depmod
|
DEPMOD = depmod
|
||||||
PERL = perl
|
PERL = perl
|
||||||
PYTHON = python
|
|
||||||
PYTHON3 = python3
|
PYTHON3 = python3
|
||||||
CHECK = sparse
|
CHECK = sparse
|
||||||
BASH = bash
|
BASH = bash
|
||||||
@ -508,7 +507,7 @@ CLANG_FLAGS :=
|
|||||||
|
|
||||||
export ARCH SRCARCH CONFIG_SHELL BASH HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE LD CC
|
export ARCH SRCARCH CONFIG_SHELL BASH HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE LD CC
|
||||||
export CPP AR NM STRIP OBJCOPY OBJDUMP READELF PAHOLE RESOLVE_BTFIDS LEX YACC AWK INSTALLKERNEL
|
export CPP AR NM STRIP OBJCOPY OBJDUMP READELF PAHOLE RESOLVE_BTFIDS LEX YACC AWK INSTALLKERNEL
|
||||||
export PERL PYTHON PYTHON3 CHECK CHECKFLAGS MAKE UTS_MACHINE HOSTCXX
|
export PERL PYTHON3 CHECK CHECKFLAGS MAKE UTS_MACHINE HOSTCXX
|
||||||
export KGZIP KBZIP2 KLZOP LZMA LZ4 XZ ZSTD
|
export KGZIP KBZIP2 KLZOP LZMA LZ4 XZ ZSTD
|
||||||
export KBUILD_HOSTCXXFLAGS KBUILD_HOSTLDFLAGS KBUILD_HOSTLDLIBS LDFLAGS_MODULE
|
export KBUILD_HOSTCXXFLAGS KBUILD_HOSTLDFLAGS KBUILD_HOSTLDLIBS LDFLAGS_MODULE
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ vmlinux.bin: vmlinux FORCE
|
|||||||
$(call if_changed,objcopy)
|
$(call if_changed,objcopy)
|
||||||
|
|
||||||
unwcheck: vmlinux
|
unwcheck: vmlinux
|
||||||
-$(Q)READELF=$(READELF) $(PYTHON) $(srctree)/arch/ia64/scripts/unwcheck.py $<
|
-$(Q)READELF=$(READELF) $(PYTHON3) $(srctree)/arch/ia64/scripts/unwcheck.py $<
|
||||||
|
|
||||||
archclean:
|
archclean:
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
#
|
#
|
||||||
# Usage: unwcheck.py FILE
|
# Usage: unwcheck.py FILE
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
# SPDX-License-Identifier: GPL-2.0+
|
# SPDX-License-Identifier: GPL-2.0+
|
||||||
#
|
#
|
||||||
# This determines how many parallel tasks "make" is expecting, as it is
|
# This determines how many parallel tasks "make" is expecting, as it is
|
||||||
|
Loading…
Reference in New Issue
Block a user