summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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')