From 46da35ecff48ae329e76201b3b9b3271d2acb1ba Mon Sep 17 00:00:00 2001 From: Juan Carrano Date: Wed, 28 Nov 2018 10:42:38 +0100 Subject: [PATCH] mcuboot.mk: make mcuboot targets depend on clean. When doing `make -j clean all' the directories can be cleaned after files are made. To ensure files are created after clean, those targets are made conditionally dependent on the clean target. This copies the handling done in Makefile.include. --- makefiles/mcuboot.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/makefiles/mcuboot.mk b/makefiles/mcuboot.mk index 107f368c45..bca6e7372e 100644 --- a/makefiles/mcuboot.mk +++ b/makefiles/mcuboot.mk @@ -12,6 +12,8 @@ MCUBOOT_BIN_MD5 ?= 0c71a0589bd3709fc2d90f07a0035ce7 export IMAGE_HDR_SIZE ?= 512 +$(MCUBOOT_KEYFILE) $(MCUBOOT_BIN): $(filter clean, $(MAKECMDGOALS)) + mcuboot-create-key: $(MCUBOOT_KEYFILE) ifeq ($(BINDIR)/key.pem,$(MCUBOOT_KEYFILE))