MLK-16729 tools: fix build break when libpython3-dev is installed
authorYe Li <ye.li@nxp.com>
Tue, 31 Oct 2017 02:33:27 +0000 (21:33 -0500)
committerJason Liu <jason.hui.liu@nxp.com>
Thu, 2 Nov 2017 18:37:29 +0000 (02:37 +0800)
commitc76e037391f92712dae2a1c8df7937120f4bc3b5
tree7fbc2107df7ee0bb6ee2993231574d8150544951
parent6353adf8863f564d0f384819c933363a4a15450c
MLK-16729 tools: fix build break when libpython3-dev is installed

The u-boot meets break, when host build server has installed swig and libpython3-dev,
but no libpython-dev installed.

tools/libfdt_wrap.c:147:21: fatal error: Python.h: No such file or directory

The root cause is tools/makefile checks the Python.h before building a libfdt Python module.
Since the u-boot is using "python" command not "python3", we should change to check the Python.h
under python2.x directory not every python directory (like python3.x). Otherwise when a python3
develop package is installed, the script will get the file and start to build libfdt if swig
is installed as well.

Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
tools/Makefile