From patchwork Tue Jul 5 16:26:20 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Schwierzeck X-Patchwork-Id: 103327 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 22E441007D7 for ; Wed, 6 Jul 2011 02:26:58 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AAE9D28094; Tue, 5 Jul 2011 18:26:48 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vbDE8dJZ6Gdz; Tue, 5 Jul 2011 18:26:48 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B0A9B28096; Tue, 5 Jul 2011 18:26:41 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 642582808B for ; Tue, 5 Jul 2011 18:26:37 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id r6PnLmXmsMNG for ; Tue, 5 Jul 2011 18:26:36 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-fx0-f50.google.com (mail-fx0-f50.google.com [209.85.161.50]) by theia.denx.de (Postfix) with ESMTPS id 1E91F2808A for ; Tue, 5 Jul 2011 18:26:35 +0200 (CEST) Received: by mail-fx0-f50.google.com with SMTP id 2so4479644fxh.23 for ; Tue, 05 Jul 2011 09:26:35 -0700 (PDT) Received: by 10.223.7.66 with SMTP id c2mr24654fac.35.1309883195181; Tue, 05 Jul 2011 09:26:35 -0700 (PDT) Received: from localhost.localdomain (dslb-088-073-211-095.pools.arcor-ip.net [88.73.211.95]) by mx.google.com with ESMTPS id r10sm5398948fah.26.2011.07.05.09.26.32 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 05 Jul 2011 09:26:34 -0700 (PDT) From: Daniel Schwierzeck To: u-boot@lists.denx.de Date: Tue, 5 Jul 2011 18:26:20 +0200 Message-Id: <1309883182-12854-3-git-send-email-daniel.schwierzeck@googlemail.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1309883182-12854-1-git-send-email-daniel.schwierzeck@googlemail.com> References: <1309352967-5719-1-git-send-email-aneesh@ti.com> <1309883182-12854-1-git-send-email-daniel.schwierzeck@googlemail.com> Cc: Scott Wood Subject: [U-Boot] [RFC PATCH 2/4] Use ALL-y style instead of ifeq blocks for better readability and upgradeability X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de [daniel.schwierzeck@googlemail.com: 1. changed all appendings of ALL target in several config.mk files as Mike Frysinger suggested ] Signed-off-by: Daniel Schwierzeck Acked-by: Mike Frysinger Acked-by: Wolfgang Denk --- Makefile | 18 +++++------------- arch/blackfin/config.mk | 2 +- board/pcs440ep/config.mk | 2 +- board/spear/spear300/config.mk | 2 +- board/spear/spear310/config.mk | 2 +- board/spear/spear320/config.mk | 2 +- board/spear/spear600/config.mk | 2 +- 7 files changed, 11 insertions(+), 19 deletions(-) diff --git a/Makefile b/Makefile index e56fa02..8833f4b 100644 --- a/Makefile +++ b/Makefile @@ -341,22 +341,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 $< $@ diff --git a/arch/blackfin/config.mk b/arch/blackfin/config.mk index 71fd53f..f9d46de 100644 --- a/arch/blackfin/config.mk +++ b/arch/blackfin/config.mk @@ -44,7 +44,7 @@ PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections PLATFORM_RELFLAGS += -mcpu=$(CONFIG_BFIN_CPU) ifneq ($(CONFIG_BFIN_BOOT_MODE),BFIN_BOOT_BYPASS) -ALL += $(obj)u-boot.ldr +ALL-y += $(obj)u-boot.ldr endif ifeq ($(CONFIG_ENV_IS_EMBEDDED_IN_LDR),y) CREATE_LDR_ENV = $(obj)tools/envcrc --binary > $(obj)env-ldr.o diff --git a/board/pcs440ep/config.mk b/board/pcs440ep/config.mk index 23631c5..f560ec6 100644 --- a/board/pcs440ep/config.mk +++ b/board/pcs440ep/config.mk @@ -26,7 +26,7 @@ # # Check the U-Boot Image with a SHA1 checksum -ALL += $(obj)u-boot.sha1 +ALL-y += $(obj)u-boot.sha1 PLATFORM_CPPFLAGS += -DCONFIG_440=1 diff --git a/board/spear/spear300/config.mk b/board/spear/spear300/config.mk index 11da2c3..5848ef8 100644 --- a/board/spear/spear300/config.mk +++ b/board/spear/spear300/config.mk @@ -25,7 +25,7 @@ CONFIG_SYS_TEXT_BASE = 0x00700000 -ALL += $(obj)u-boot.img +ALL-y += $(obj)u-boot.img # Environment variables in NAND ifeq ($(ENV),NAND) diff --git a/board/spear/spear310/config.mk b/board/spear/spear310/config.mk index 2b59c39..f8a6bdb 100644 --- a/board/spear/spear310/config.mk +++ b/board/spear/spear310/config.mk @@ -25,7 +25,7 @@ CONFIG_SYS_TEXT_BASE = 0x00700000 -ALL += $(obj)u-boot.img +ALL-y += $(obj)u-boot.img # Environment variables in NAND ifeq ($(ENV),NAND) diff --git a/board/spear/spear320/config.mk b/board/spear/spear320/config.mk index 2b59c39..f8a6bdb 100644 --- a/board/spear/spear320/config.mk +++ b/board/spear/spear320/config.mk @@ -25,7 +25,7 @@ CONFIG_SYS_TEXT_BASE = 0x00700000 -ALL += $(obj)u-boot.img +ALL-y += $(obj)u-boot.img # Environment variables in NAND ifeq ($(ENV),NAND) diff --git a/board/spear/spear600/config.mk b/board/spear/spear600/config.mk index 11da2c3..5848ef8 100644 --- a/board/spear/spear600/config.mk +++ b/board/spear/spear600/config.mk @@ -25,7 +25,7 @@ CONFIG_SYS_TEXT_BASE = 0x00700000 -ALL += $(obj)u-boot.img +ALL-y += $(obj)u-boot.img # Environment variables in NAND ifeq ($(ENV),NAND)