qemu-patch-raspberry4/tests/tcg/Makefile.probe
Alex Bennée 1a7fab926b tests: add top-level make dependency for docker builds
One problem with satisfying your docker dependencies in a sub-make it
you might end up trying to satisfy the dependency multiple times. This
is especially a problem with debian-sid based cross compilers and CI
setups. We solve this by doing a docker build pass at the top level
before any sub-makes are called.

We still need to satisfy dependencies in the Makefile.target call so
people can run tests from individual target directories. We introduce
a new Makefile.probe which gets called for each PROBE_TARGET and
allows us to build up the list. It does require multiply including
config-target.mak which shouldn't cause any issues as it shouldn't
define anything that clashes with config-host.mak. However we undefine
a few key variables each time around.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2018-06-20 22:13:32 +01:00

32 lines
870 B
Makefile

# -*- Mode: makefile -*-
#
# TCG Compiler Probe
#
# This Makefile fragement is included multiple times in the main make
# script to probe for available compilers. This is used to build up a
# selection of required docker targets before we invoke a sub-make for
# each target.
# First we need the target makefile which tells us the target architecture
-include $(BUILD_DIR)/$(PROBE_TARGET)/config-target.mak
# Then we load up the target architecture makefiles which tell us
# about the compilers
CROSS_CC_GUEST:=
DOCKER_IMAGE:=
DOCKER_PREREQ:=
-include $(SRC_PATH)/tests/tcg/$(TARGET_BASE_ARCH)/Makefile.include
-include $(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.include
ifndef CROSS_CC_GUEST
ifneq ($(DOCKER_IMAGE),)
DOCKER_PREREQ:=docker-image-$(DOCKER_IMAGE)
endif
endif
# Clean-up
# undefine TARGET_NAME
# undefine TARGET_BASE_ARCH
# undefine TARGET_ABI_DIR