]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
Only build the libfdt python module if 'swig' is available
authorSimon Glass <sjg@chromium.org>
Mon, 4 Jul 2016 17:58:12 +0000 (11:58 -0600)
committerSimon Glass <sjg@chromium.org>
Fri, 15 Jul 2016 02:40:24 +0000 (20:40 -0600)
When swig is not available, we can still build correctly. So make this
optional. Add a comment about how to enable this build.

Signed-off-by: Simon Glass <sjg@chromium.org>
tools/Makefile

index 2731b7ac9f5f0a70531169ae9f0c7914192c5460..421414bc154b0a596cb5833148f2c19c614d5fa9 100644 (file)
@@ -107,7 +107,10 @@ mkimage-objs   := $(dumpimage-mkimage-objs) mkimage.o
 fit_info-objs   := $(dumpimage-mkimage-objs) fit_info.o
 fit_check_sign-objs   := $(dumpimage-mkimage-objs) fit_check_sign.o
 
-hostprogs-$(CONFIG_SPL_OF_PLATDATA) += _libfdt.so
+# Build a libfdt Python module if swig is available
+# Use 'sudo apt-get install swig libpython-dev' to enable this
+hostprogs-$(CONFIG_SPL_OF_PLATDATA) += \
+       $(if $(shell which swig),_libfdt.so)
 _libfdt.so-sharedobjs += $(LIBFDT_OBJS)
 libfdt: