summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Theodore <tonyt@logyst.com>2018-08-18 05:48:55 (GMT)
committerTony Theodore <tonyt@logyst.com>2018-08-31 02:21:14 (GMT)
commit6f3bd170de176418d08d9f037d4543f51d2e498e (patch)
tree21e3e4e5d0fb8f18523fe9bd011d013823bec077
parent728b9006c90ed4574631158d90a93c423c0d4633 (diff)
downloadmxe-6f3bd170de176418d08d9f037d4543f51d2e498e.zip
mxe-6f3bd170de176418d08d9f037d4543f51d2e498e.tar.gz
mxe-6f3bd170de176418d08d9f037d4543f51d2e498e.tar.bz2
Makefile: check for python2 requirement
-rw-r--r--Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 5209d1e..2f5c367 100644
--- a/Makefile
+++ b/Makefile
@@ -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')