From e68a4385d4e8d9e247ac1f09d406fd2fb4e9b1de Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Wed, 16 Mar 2016 10:45:35 -0600 Subject: [PATCH] payloads/Makefile.inc: Clean up Makefile - Instead of adding each payload to each common target, create a list and loop through the list for all of the payloads - '.phony' doesn't work - the target needs to be uppercase '.PHONY' Change-Id: I4a7712c94d0f127c2fff8cb8fada4b8132a4ab3b Signed-off-by: Martin Roth Reviewed-on: https://review.coreboot.org/14131 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- payloads/Makefile.inc | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/payloads/Makefile.inc b/payloads/Makefile.inc index ee3c41a133..44d1d7709c 100644 --- a/payloads/Makefile.inc +++ b/payloads/Makefile.inc @@ -17,24 +17,21 @@ cbfs-files-$(CONFIG_COREINFO_SECONDARY_PAYLOAD) += img/coreinfo img/coreinfo-file := payloads/coreinfo/build/coreinfo.elf img/coreinfo-type := payload +PAYLOADS_LIST=\ +payloads/coreinfo \ +payloads/libpayload \ +payloads/external/depthcharge \ +payloads/external/SeaBIOS \ +payloads/external/U-Boot \ +payloads/external/Memtest86Plus + payloads/coreinfo/build/coreinfo.elf coreinfo: $(MAKE) -C payloads/coreinfo defaultbuild clean-payloads: - $(MAKE) -C payloads/coreinfo clean - $(MAKE) -C payloads/libpayload clean - $(MAKE) -C payloads/external/depthcharge clean - $(MAKE) -C payloads/external/SeaBIOS clean - $(MAKE) -C payloads/external/U-Boot clean - $(MAKE) -C payloads/external/Memtest86Plus clean - + $(foreach payload, $(PAYLOADS_LIST), $(MAKE) -C $(payload) clean; ) distclean-payloads: - $(MAKE) -C payloads/coreinfo distclean - $(MAKE) -C payloads/libpayload distclean - $(MAKE) -C payloads/external/depthcharge distclean - $(MAKE) -C payloads/external/SeaBIOS distclean - $(MAKE) -C payloads/external/U-Boot distclean - $(MAKE) -C payloads/external/Memtest86Plus distclean + $(foreach payload, $(PAYLOADS_LIST), $(MAKE) -C $(payload) distclean; ) -.phony: clean-payloads distclean-payloads +.PHONY: clean-payloads distclean-payloads