Commit 636b19ac authored by Ye Li's avatar Ye Li

MLK-14636 Tools: Add python lib dependency check for libfdt

The tools/makefile will build a libfdt Python module if swig is available.
But actually it not only need swig but also need python libary. We will get
build break below when python is not installed. It is better to add more
check for python lib.

Because applications may install some python libs, but not the full libpython-dev,
then the Python.h is missed. We check Python.h to instead checking libs.

tools/libfdt_wrap.c:147:21: fatal error: Python.h: No such file or directory
Signed-off-by: default avatarYe Li <>
parent 89f74eb9
......@@ -115,7 +115,7 @@ fit_check_sign-objs := $(dumpimage-mkimage-objs) fit_check_sign.o
# Build a libfdt Python module if swig is available
# Use 'sudo apt-get install swig libpython-dev' to enable this
hostprogs-y += \
$(if $(shell which swig 2> /dev/null),
$(if $(shell which swig 2> /dev/null), $(if $(wildcard /usr/include/python*/Python.h), += $(LIBFDT_OBJS)
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment