From 34286b3b248c3a1cbcda58eeffe82b3b81109c28 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Tue, 25 Jul 2023 00:46:54 +0800 Subject: [PATCH] u-boot.mk: improve dependency check Signed-off-by: Tianling Shen --- include/u-boot.mk | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/include/u-boot.mk b/include/u-boot.mk index febd3e825e..8b96f38e78 100644 --- a/include/u-boot.mk +++ b/include/u-boot.mk @@ -27,13 +27,18 @@ ifdef UBOOT_USE_BINMAN endif ifdef UBOOT_USE_INTREE_DTC - $(eval $(call SetupHostCommand,swig,Please install 'swig', \ + $(eval $(call TestHostCommand,swig, \ + Please install the swig package, \ swig -version)) - $(eval $(call TestHostCommand,libpython3-dev, \ - Please install the libpython3-dev package, \ - $(STAGING_DIR_HOST)/bin/python3 -c 'import os; import sysconfig; \ - os.path.exists(sysconfig.get_paths()["include"] + "/Python.h") or exit(1)')) + $(eval $(call TestHostCommand,python3-dev, \ + Please install the python3-dev package, \ + python3.11-config --includes 2>&1 | grep 'python3', \ + python3.10-config --includes 2>&1 | grep 'python3', \ + python3.9-config --includes 2>&1 | grep 'python3', \ + python3.8-config --includes 2>&1 | grep 'python3', \ + python3.7-config --includes 2>&1 | grep 'python3', \ + python3-config --includes 2>&1 | grep -E 'python3\.([7-9]|[0-9][0-9])\.?')) endif export GCC_HONOUR_COPTS=s