make: Fix python command in Makefile

Remove detection of python command. If PYTHON_COMMAND isn't set, PYCMD
defaults to python which doesn't exist in some python3 only environments
such as yocto. genconfig.py has already been updated to deprecate
python2 support.

Change-Id: I1a289bc0e30a2de9396e1397a72d8f0e81912a68
Signed-off-by: Jonathan Richardson <jonathan.richardson@broadcom.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/483418
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Scott Branden <sbranden@gmail.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Jonathan Richardson 2020-01-07 14:19:53 -08:00 committed by Jim Harris
parent 16cc6464db
commit b41f404d9f

View File

@ -103,11 +103,9 @@ mk/cc.mk:
false false
include/spdk/config.h: mk/config.mk scripts/genconfig.py include/spdk/config.h: mk/config.mk scripts/genconfig.py
$(Q)PYCMD=$$(cat PYTHON_COMMAND 2>/dev/null) ; \
test -z "$$PYCMD" && PYCMD=python ; \
echo "#ifndef SPDK_CONFIG_H" > $@.tmp; \ echo "#ifndef SPDK_CONFIG_H" > $@.tmp; \
echo "#define SPDK_CONFIG_H" >> $@.tmp; \ echo "#define SPDK_CONFIG_H" >> $@.tmp; \
$$PYCMD scripts/genconfig.py $(MAKEFLAGS) >> $@.tmp; \ scripts/genconfig.py $(MAKEFLAGS) >> $@.tmp; \
echo "#endif /* SPDK_CONFIG_H */" >> $@.tmp; \ echo "#endif /* SPDK_CONFIG_H */" >> $@.tmp; \
cmp -s $@.tmp $@ || mv $@.tmp $@ ; \ cmp -s $@.tmp $@ || mv $@.tmp $@ ; \
rm -f $@.tmp rm -f $@.tmp