From patchwork Wed Dec 15 12:17:31 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 75641 X-Patchwork-Delegate: wd@denx.de 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 4BEA41007D1 for ; Wed, 15 Dec 2010 23:11:40 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7159428096; Wed, 15 Dec 2010 13:11:37 +0100 (CET) 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 Wx1wULy3AYQW; Wed, 15 Dec 2010 13:11:37 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 342842809A; Wed, 15 Dec 2010 13:11:35 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 136212809A for ; Wed, 15 Dec 2010 13:11:33 +0100 (CET) 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 U4xplBTQEEFK for ; Wed, 15 Dec 2010 13:11:31 +0100 (CET) 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 smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by theia.denx.de (Postfix) with ESMTPS id 059CD28096 for ; Wed, 15 Dec 2010 13:11:29 +0100 (CET) Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 237D31B41E5 for ; Wed, 15 Dec 2010 12:11:27 +0000 (UTC) From: Mike Frysinger To: u-boot@lists.denx.de Date: Wed, 15 Dec 2010 07:17:31 -0500 Message-Id: <1292415451-18909-1-git-send-email-vapier@gentoo.org> X-Mailer: git-send-email 1.7.3.3 Subject: [U-Boot] [PATCH] config.mk: unify duplicated flag setting 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 Multiple rules are using the expanded AFLAGS/CFLAGS settings and some are getting so long that the rules need to be line wrapped. So unify them in one variable, use that variable in the rule, and then unwrap things. This makes the actual `make` output nicer as it doesn't have line continuations in it anymore. Signed-off-by: Mike Frysinger --- config.mk | 17 +++++++---------- 1 files changed, 7 insertions(+), 10 deletions(-) diff --git a/config.mk b/config.mk index eb95093..d6ca9b9 100644 --- a/config.mk +++ b/config.mk @@ -242,20 +242,17 @@ export TEXT_BASE PLATFORM_CPPFLAGS PLATFORM_RELFLAGS CPPFLAGS CFLAGS AFLAGS # Allow boards to use custom optimize flags on a per dir/file basis BCURDIR = $(subst $(SRCTREE)/,,$(CURDIR:$(obj)%=%)) +ALL_AFLAGS = $(AFLAGS) $(AFLAGS_$(BCURDIR)/$(@F)) $(AFLAGS_$(BCURDIR)) +ALL_CFLAGS = $(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) $(obj)%.s: %.S - $(CPP) $(AFLAGS) $(AFLAGS_$(BCURDIR)/$(@F)) $(AFLAGS_$(BCURDIR)) \ - -o $@ $< + $(CPP) $(ALL_AFLAGS) -o $@ $< $(obj)%.o: %.S - $(CC) $(AFLAGS) $(AFLAGS_$(BCURDIR)/$(@F)) $(AFLAGS_$(BCURDIR)) \ - -o $@ $< -c + $(CC) $(ALL_AFLAGS) -o $@ $< -c $(obj)%.o: %.c - $(CC) $(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \ - -o $@ $< -c + $(CC) $(ALL_CFLAGS) -o $@ $< -c $(obj)%.i: %.c - $(CPP) $(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \ - -o $@ $< -c + $(CPP) $(ALL_CFLAGS) -o $@ $< -c $(obj)%.s: %.c - $(CC) $(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \ - -o $@ $< -c -S + $(CC) $(ALL_CFLAGS) -o $@ $< -c -S #########################################################################