]> git.sur5r.net Git - u-boot/commitdiff
tools: allow to override python
authorStefano Babic <sbabic@denx.de>
Wed, 5 Apr 2017 15:46:41 +0000 (17:46 +0200)
committerSimon Glass <sjg@chromium.org>
Thu, 13 Apr 2017 20:44:49 +0000 (14:44 -0600)
Not force to use python from PATH. Issue was noted when building with
Yocto, because python from the distro is always taken instead of
python-native built during Yocto process.

Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Makefile
tools/Makefile

index 09b597d45051f9899abbb517a98d67297a19237c..8d4e6050b37d07a145d7a23bcf475d0c0cf6b6b9 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -348,7 +348,7 @@ OBJCOPY             = $(CROSS_COMPILE)objcopy
 OBJDUMP                = $(CROSS_COMPILE)objdump
 AWK            = awk
 PERL           = perl
-PYTHON         = python
+PYTHON         ?= python
 DTC            = dtc
 CHECK          = sparse
 
index fa1b85bdae2f4281662b48647249fd5fdc985e89..2fc4a583d448638ce03b5d9984f495cd06983306 100644 (file)
@@ -120,7 +120,7 @@ _libfdt.so-sharedobjs += $(LIBFDT_OBJS)
 libfdt:
 
 tools/_libfdt.so: $(patsubst %.o,%.c,$(LIBFDT_OBJS)) tools/libfdt_wrap.c
-       LDFLAGS="$(HOSTLDFLAGS)" CFLAGS= python $(srctree)/lib/libfdt/setup.py \
+       LDFLAGS="$(HOSTLDFLAGS)" CFLAGS= ${PYTHON} $(srctree)/lib/libfdt/setup.py \
                "$(_hostc_flags)" $^
        mv _libfdt.so $@