From: Angus Gratton Date: Tue, 15 Nov 2016 23:35:47 +0000 (+1100) Subject: build system: Fix embedding files which are themselves generated by the X-Git-Tag: v1.0~48^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4eeb2bc41e43c850d468ed9132c0202f0ddbf638;p=esp-idf build system: Fix embedding files which are themselves generated by the build system Used by secure boot, which generates the secure boot signing key inside build/. --- diff --git a/make/component_wrapper.mk b/make/component_wrapper.mk index 55a135158a..6f903f9fce 100644 --- a/make/component_wrapper.mk +++ b/make/component_wrapper.mk @@ -194,7 +194,7 @@ OBJCOPY_EMBED_ARGS := --input binary --output elf32-xtensa-le --binary-architect define GenerateEmbedTarget $(1).$(2).o: $(call resolvepath,$(1),$(COMPONENT_PATH)) | $$(dir $(1)) $(summary) EMBED $$@ - $$(if $$(filter-out $$(notdir $$(abspath $$<)),$$(abspath $$(notdir $$<))), cp $$< $$(notdir $$<) ) # copy input file to build dir, unless already in build dir + $(if $(filter-out $$(notdir $$(abspath $$<)),$$(abspath $$(notdir $$<))), cp $$< $$(notdir $$<) ) # copy input file to build dir, unless already in build dir $$(if $$(subst bin,,$(2)),echo -ne '\0' >> $$(notdir $$<) ) # trailing NUL byte on text output $(OBJCOPY) $(OBJCOPY_EMBED_ARGS) $$(notdir $$<) $$@ rm $$(notdir $$<)