From b28ef6b9eb2401b9500c59cb32ff5fe43400f0be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Sat, 18 Aug 2018 00:03:37 -0300 Subject: docker: Clean dangling tarball files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a container fails, it leaves a dangling tarball which name is based on a timestamp. Further uses of make won't clean those files, neither calling the 'docker-clean' target. Use the .DELETE_ON_ERROR built-in target to let make remove those temporary tarballs in case of failure. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20180818030337.22271-1-f4bug@amsat.org> Signed-off-by: Fam Zheng --- tests/docker/Makefile.include | 1 + 1 file changed, 1 insertion(+) (limited to 'tests') diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index d3101af..6e03235 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -25,6 +25,7 @@ IMAGES ?= % CUR_TIME := $(shell date +%Y-%m-%d-%H.%M.%S.$$$$) DOCKER_SRC_COPY := $(BUILD_DIR)/docker-src.$(CUR_TIME) +.DELETE_ON_ERROR: $(DOCKER_SRC_COPY) $(DOCKER_SRC_COPY): @mkdir $@ $(if $(SRC_ARCHIVE), \ -- cgit v1.1