payloads: Force sub-make runs for in-tree payloads

The sub-process calls break make's dependency tracking, hence we have
to always perform the calls if we want to allow automatic, incremental
builds.

We let each rule depend on a new, phony target `force-payload`. It has
roughly the same effect as tagging all the targets as phony, but doing
so would feel wrong as some of them are actual files.

Change-Id: I1bc2406db371e8dddbfdf71f68a6665a5b558f5e
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47638
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
Nico Huber 2020-11-15 20:01:29 +01:00
parent a7d3293886
commit b726e09157
1 changed files with 6 additions and 3 deletions

View File

@ -29,12 +29,14 @@ payloads/external/GRUB2 \
payloads/external/LinuxBoot \
payloads/external/Yabits \
force-payload:
payloads/coreinfo/build/coreinfo.elf coreinfo: export CCACHE := $(CCACHE)
payloads/coreinfo/build/coreinfo.elf coreinfo:
payloads/coreinfo/build/coreinfo.elf coreinfo: force-payload
$(MAKE) -C payloads/coreinfo defaultbuild
payloads/nvramcui/build/nvramcui.elf nvramcui: export CCACHE := $(CCACHE)
payloads/nvramcui/build/nvramcui.elf nvramcui:
payloads/nvramcui/build/nvramcui.elf nvramcui: force-payload
$(MAKE) -C payloads/nvramcui
clean-payloads:
@ -46,4 +48,5 @@ distclean-payloads:
print-repo-info-payloads:
-$(foreach payload, $(PAYLOADS_LIST), $(MAKE) -C $(payload) print-repo-info 2>/dev/null; )
.PHONY: clean-payloads distclean-payloads print-repo-info-payloads nvramcui coreinfo
.PHONY: force-payload coreinfo nvramcui
.PHONY: clean-payloads distclean-payloads print-repo-info-payloads