qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC PATCH 3/3] docker: remove SUBMAKE_NOCACHE_HACK for deb


From: Alex Bennée
Subject: [Qemu-devel] [RFC PATCH 3/3] docker: remove SUBMAKE_NOCACHE_HACK for debian-sid based images
Date: Fri, 8 Jun 2018 17:04:32 +0100

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 <address@hidden>
---
 tests/docker/Makefile.include | 25 ++++++++++++++-----------
 tests/tcg/Makefile.include    |  1 -
 2 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index 3393e9f97d..2ce72de180 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -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
diff --git a/tests/tcg/Makefile.include b/tests/tcg/Makefile.include
index 951f40c28d..4851df0951 100644
--- a/tests/tcg/Makefile.include
+++ b/tests/tcg/Makefile.include
@@ -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) \
-- 
2.17.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]