@@ -66,18 +66,21 @@ docker-image-debian-win64-cross: docker-image-debian8-mxe
# its children. However when doing check-tcg we ensure everything is
# built at top-level make so we can dispense with NOCACHE here to
# avoid excessive re-builds.
-ifneq ($(SUBMAKE_NOCACHE_HACK),y)
docker-image-debian-sid: NOCACHE=1
-endif
-
-docker-image-debian-alpha-cross: docker-image-debian-sid
-docker-image-debian-hppa-cross: docker-image-debian-sid
-docker-image-debian-m68k-cross: docker-image-debian-sid
-docker-image-debian-sh4-cross: docker-image-debian-sid
-docker-image-debian-sparc64-cross: docker-image-debian-sid
-docker-image-debian-mips64-cross: docker-image-debian-sid
-docker-image-debian-riscv64-cross: docker-image-debian-sid
-docker-image-debian-powerpc-cross: docker-image-debian-sid
+
+# $1 = dockerfile, $2 = dependancy
+cond-dock-dep = $(if \
+ $(call $(DOCKER_SCRIPT) check --quiet \
+ -t qemu:$1 $(DOCKER_FILES_DIR)/$1.docker),$2)
+
+docker-image-debian-alpha-cross: $(call cond-dock-dep,debian-alpha-cross,docker-image-debian-sid)
+docker-image-debian-hppa-cross: $(call cond-dock-dep,debian-hppa-cross,docker-image-debian-sid)
+docker-image-debian-m68k-cross: $(call cond-dock-dep,debian-m68k-cross,docker-image-debian-sid)
+docker-image-debian-sh4-cross: $(call cond-dock-dep,debian-sh4-cross,docker-image-debian-sid)
+docker-image-debian-sparc64-cross: $(call cond-dock-dep,debian-sparc64-cross,docker-image-debian-sid)
+docker-image-debian-mips64-cross: $(call cond-dock-dep,debian-mip64-cross,docker-image-debian-sid)
+docker-image-debian-riscv64-cross: $(call cond-dock-dep,debian-riscv64-cross,docker-image-debian-sid)
+docker-image-debian-powerpc-cross: $(call cond-dock-dep,debian-powerpc-cross,docker-image-debian-sid)
docker-image-travis: NOUSER=1
# Specialist build images, sometimes very limited tools
@@ -39,7 +39,6 @@ ifeq ($(HAVE_USER_DOCKER)$(GUEST_BUILD),y)
ifneq ($(DOCKER_IMAGE),)
# We also need the Docker make rules to depend on
-SUBMAKE_NOCACHE_HACK=y
include $(SRC_PATH)/tests/docker/Makefile.include
DOCKER_COMPILE_CMD="$(DOCKER_SCRIPT) cc --user $(shell id -u) \
Now we can conditionally make docker-image-debian-sid a dependency depending on if we actually need to re-build our image we can remove this hack and use that mechanism. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> --- tests/docker/Makefile.include | 25 ++++++++++++++----------- tests/tcg/Makefile.include | 1 - 2 files changed, 14 insertions(+), 12 deletions(-) -- 2.17.1