Makefile: check for python2 requirement

This commit is contained in:
Tony Theodore 2018-08-18 15:48:55 +10:00
parent 728b9006c9
commit 6f3bd170de
1 changed files with 5 additions and 0 deletions

View File

@ -38,6 +38,11 @@ LIBTOOL := $(shell glibtool --help >/dev/null 2>&1 && echo g)libtool
LIBTOOLIZE := $(shell glibtoolize --help >/dev/null 2>&1 && echo g)libtoolize
OPENSSL := openssl
PATCH := $(shell gpatch --help >/dev/null 2>&1 && echo g)patch
PYTHON2 := $(or $(shell ([ `python -c "import sys; print('{0[0]}'.format(sys.version_info))"` == 2 ] && echo python) 2>/dev/null || \
which python2 2>/dev/null || \
which python2.7 2>/dev/null), \
$(warning Warning: python v2 not found (or default python changed to v3))\
$(shell touch check-requirements-failed))
SED := $(shell gsed --help >/dev/null 2>&1 && echo g)sed
SORT := $(shell gsort --help >/dev/null 2>&1 && echo g)sort
DEFAULT_UA := $(shell wget --version | $(SED) -n 's,GNU \(Wget\) \([0-9.]*\).*,\1/\2,p')