From 116dc23480d52455e8ceafc471902be7f0bc0eb3 Mon Sep 17 00:00:00 2001 From: Federico Pellegrin Date: Thu, 20 Sep 2018 04:17:09 +0200 Subject: [PATCH] makefiles/riotboot.mk: enforce rule precedence (signed.bin before .bin) make is a bit strange sometimes and considers various factors to decide the precedence of the rule to be applied: definition order is one (and the %.signed.bin is after %.bin, and would be also if we put it at the end of Makefile.include), but also if a rule is implicit is then preferred no matter the order. A quite complete and coincise overview of the topic can be found here: https://stackoverflow.com/questions/28842851/force-make-to-use-a-more-specific-rule Given the inclusion mechanism used in RIOT it should be safer to explicitly state things, although may seem ugly sometimes. --- makefiles/riotboot.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefiles/riotboot.mk b/makefiles/riotboot.mk index c674934df543..5d2cca523183 100644 --- a/makefiles/riotboot.mk +++ b/makefiles/riotboot.mk @@ -34,7 +34,7 @@ $(BINDIR)/$(APPLICATION)-slot1.elf: ROM_OFFSET=$(SLOT1_OFFSET) $(BINDIR)/$(APPLICATION)-slot2.elf: ROM_OFFSET=$(SLOT2_OFFSET) # create signed binary target -%.signed.bin: %.sig %.bin +$(BINDIR)/$(APPLICATION)-slot1.signed.bin $(BINDIR)/$(APPLICATION)-slot2.signed.bin: %.signed.bin: %.sig %.bin @echo "creating $@..." cat $^ > $@