aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorLumir Balhar <lbalhar@redhat.com>2018-07-09 12:38:59 +0200
committerDavid Gibson <david@gibson.dropbear.id.au>2018-11-23 17:37:56 +1100
commit8113c00b99d303c8073a2493f6b8978600e54967 (patch)
treed23de9f523907c6e03c89dbe2a1f8a9f6e8d7446 /Makefile
parent11738cf01f150afae913b88fb68675a272803d63 (diff)
downloaddtc-8113c00b99d303c8073a2493f6b8978600e54967.zip
dtc-8113c00b99d303c8073a2493f6b8978600e54967.tar.gz
dtc-8113c00b99d303c8073a2493f6b8978600e54967.tar.bz2
pylibfdt: Allow switch to Python 3 via environment variable PYTHON
Python 2 is still the default but it can be changed by setting environment variable PYTHON before build/test. Signed-off-by: Lumir Balhar <lbalhar@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 7a472b7..d9495f0 100644
--- a/Makefile
+++ b/Makefile
@@ -24,6 +24,7 @@ BISON = bison
LEX = flex
SWIG = swig
PKG_CONFIG ?= pkg-config
+PYTHON ?= python2
INSTALL = /usr/bin/install
INSTALL_PROGRAM = $(INSTALL)
@@ -147,7 +148,7 @@ all: $(BIN) libfdt
# We need both Python and swig to build/install pylibfdt.
# This builds the given make ${target} if those deps are found.
check_python_deps = \
- if $(PKG_CONFIG) --cflags python2 >/dev/null 2>&1; then \
+ if $(PKG_CONFIG) --cflags $(PYTHON) >/dev/null 2>&1; then \
if which swig >/dev/null 2>&1; then \
can_build=yes; \
fi; \