prepare_port sel4: check required python modules

This prevents undescriptive errors when building sel4.

Ref #2490
This commit is contained in:
Martin Stein 2017-08-17 15:05:58 +02:00 committed by Christian Helmuth
parent 64377f4b80
commit abc80b7782
3 changed files with 9 additions and 1 deletions

View File

@ -1 +1 @@
112234357bb0cd71d9401f183734fa5b784543e1
8ab77c39000530e8f78a66581bf368a902cbcdc3

View File

@ -8,6 +8,9 @@ REV(sel4) := 8564ace4dfb622ec69e0f7d762ebfbc8552ec918
DIR(sel4) := src/kernel/sel4
$(call check_tool,python)
$(call check_python_module,future)
$(call check_python_module,tempita)
$(call check_python_module,ply)
PATCHES := $(wildcard $(REP_DIR)/patches/*.patch)

View File

@ -25,6 +25,11 @@ STRICT_HASH ?= no
#
check_tool = $(if $(shell which $(1)),,$(error Need to have '$(1)' installed.))
#
# Utility to check if a python module is installed
#
check_python_module = $(if $(shell python -c "import $(1)" 2>&1),$(error Need to have python module '$(1)' installed.),)
default:
.NOTPARALLEL: default