diff mbox

[U-Boot,RFC,2/7] Use ALL-y style instead of ifeq blocks for better readability and upgradeability

Message ID 1309352967-5719-3-git-send-email-aneesh@ti.com
State RFC
Headers show

Commit Message

Aneesh V June 29, 2011, 1:09 p.m. UTC
From: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
---
 Makefile |   18 +++++-------------
 1 files changed, 5 insertions(+), 13 deletions(-)

Comments

Mike Frysinger June 29, 2011, 6:54 p.m. UTC | #1
On Wednesday, June 29, 2011 09:09:22 Aneesh V wrote:
>  Makefile |   18 +++++-------------
>  1 files changed, 5 insertions(+), 13 deletions(-)
> 
>  # Always append ALL so that arch config.mk's can add custom ones

as this comment indicates, you forgot to up date arch config.mk's that append 
ALL.  they'll need converting to ALL-y too.
-mike
Aneesh V June 30, 2011, 5:14 a.m. UTC | #2
On Thursday 30 June 2011 12:24 AM, Mike Frysinger wrote:
> On Wednesday, June 29, 2011 09:09:22 Aneesh V wrote:
>>   Makefile |   18 +++++-------------
>>   1 files changed, 5 insertions(+), 13 deletions(-)
>>
>>   # Always append ALL so that arch config.mk's can add custom ones
>
> as this comment indicates, you forgot to up date arch config.mk's that append
> ALL.  they'll need converting to ALL-y too.
> -mike

Ok. Will correct all config.mk's

br,
Aneesh
diff mbox

Patch

diff --git a/Makefile b/Makefile
index dcf5d93..813b03b 100644
--- a/Makefile
+++ b/Makefile
@@ -311,22 +311,14 @@  BOARD_SIZE_CHECK =
 endif
 
 # Always append ALL so that arch config.mk's can add custom ones
-ALL += $(obj)u-boot.srec $(obj)u-boot.bin $(obj)System.map
+ALL-y += $(obj)u-boot.srec $(obj)u-boot.bin $(obj)System.map
 
-ifeq ($(CONFIG_NAND_U_BOOT),y)
-ALL += $(obj)u-boot-nand.bin
-endif
-
-ifeq ($(CONFIG_ONENAND_U_BOOT),y)
-ALL += $(obj)u-boot-onenand.bin
+ALL-$(CONFIG_NAND_U_BOOT) += $(obj)u-boot-nand.bin
+ALL-$(CONFIG_ONENAND_U_BOOT) += $(obj)u-boot-onenand.bin
 ONENAND_BIN ?= $(obj)onenand_ipl/onenand-ipl-2k.bin
-endif
-
-ifeq ($(CONFIG_MMC_U_BOOT),y)
-ALL += $(obj)mmc_spl/u-boot-mmc-spl.bin
-endif
+ALL-$(CONFIG_MMC_U_BOOT) += $(obj)mmc_spl/u-boot-mmc-spl.bin
 
-all:		$(ALL)
+all:		$(ALL-y)
 
 $(obj)u-boot.hex:	$(obj)u-boot
 		$(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@