kbuild: allow to override Python command name
The specification of Python 3 is largely different from that of Python 2. For example, arch/ia64/scripts/unwcheck.py seems to be written in Python 2, not compatible with Python 3. It is not a good idea to invoke python scripts with the hard-coded command name 'python'. The command 'python' could possibly be Python 3 on some systems. For that case, it is reasonable to allow to override the command name by giving 'PYTHON=python2' from the command line. The 'python' in arch/ia64/Makefile should be replaced with '$(PYTHON)'. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: linux-ia64@vger.kernel.org Signed-off-by: Michal Marek <mmarek@suse.cz>wifi-calibration
parent
1791ff7179
commit
011bf12547
3
Makefile
3
Makefile
|
@ -366,6 +366,7 @@ GENKSYMS = scripts/genksyms/genksyms
|
||||||
INSTALLKERNEL := installkernel
|
INSTALLKERNEL := installkernel
|
||||||
DEPMOD = /sbin/depmod
|
DEPMOD = /sbin/depmod
|
||||||
PERL = perl
|
PERL = perl
|
||||||
|
PYTHON = python
|
||||||
CHECK = sparse
|
CHECK = sparse
|
||||||
|
|
||||||
CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
|
CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
|
||||||
|
@ -416,7 +417,7 @@ KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(S
|
||||||
export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION
|
export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION
|
||||||
export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC
|
export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC
|
||||||
export CPP AR NM STRIP OBJCOPY OBJDUMP
|
export CPP AR NM STRIP OBJCOPY OBJDUMP
|
||||||
export MAKE AWK GENKSYMS INSTALLKERNEL PERL UTS_MACHINE
|
export MAKE AWK GENKSYMS INSTALLKERNEL PERL PYTHON UTS_MACHINE
|
||||||
export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
|
export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
|
||||||
|
|
||||||
export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS
|
export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS
|
||||||
|
|
|
@ -76,7 +76,7 @@ vmlinux.gz: vmlinux
|
||||||
$(Q)$(MAKE) $(build)=$(boot) $@
|
$(Q)$(MAKE) $(build)=$(boot) $@
|
||||||
|
|
||||||
unwcheck: vmlinux
|
unwcheck: vmlinux
|
||||||
-$(Q)READELF=$(READELF) python $(srctree)/arch/ia64/scripts/unwcheck.py $<
|
-$(Q)READELF=$(READELF) $(PYTHON) $(srctree)/arch/ia64/scripts/unwcheck.py $<
|
||||||
|
|
||||||
archclean:
|
archclean:
|
||||||
$(Q)$(MAKE) $(clean)=$(boot)
|
$(Q)$(MAKE) $(clean)=$(boot)
|
||||||
|
|
Loading…
Reference in New Issue