From patchwork Fri Jan 10 06:44:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 309114 X-Patchwork-Delegate: trini@ti.com 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 F0DFB2C00A6 for ; Fri, 10 Jan 2014 17:46:49 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1AD4C4ACB2; Fri, 10 Jan 2014 07:46:47 +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 AxtTE163uFH9; Fri, 10 Jan 2014 07:46:46 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 085CA4AC13; Fri, 10 Jan 2014 07:45:17 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 87CCA4AC5B for ; Fri, 10 Jan 2014 07:45:07 +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 tqASjE3qWTQn for ; Fri, 10 Jan 2014 07:45:06 +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.mei.co.jp (smtp.mei.co.jp [133.183.100.20]) by theia.denx.de (Postfix) with ESMTP id 4106A4ABFC for ; Fri, 10 Jan 2014 07:44:47 +0100 (CET) Received: from mail-gw.jp.panasonic.com ([157.8.1.157]) by smtp.mei.co.jp (8.12.11.20060614/3.7W/kc-maile12) with ESMTP id s0A6iiAq011016; Fri, 10 Jan 2014 15:44:44 +0900 (JST) Received: from epochmail.jp.panasonic.com ([157.8.1.130]) by mail.jp.panasonic.com (8.11.6p2/3.7W/kc-maili11) with ESMTP id s0A6iiR08416; Fri, 10 Jan 2014 15:44:44 +0900 Received: by epochmail.jp.panasonic.com (8.12.11.20060308/3.7W/lomi14) id s0A6iicZ018335; Fri, 10 Jan 2014 15:44:44 +0900 Received: from poodle by lomi14.jp.panasonic.com (8.12.11.20060308/3.7W) with ESMTP id s0A6iiiK018253; Fri, 10 Jan 2014 15:44:44 +0900 Received: from beagle.diag.org (beagle.diag.org [10.184.179.16]) by poodle (Postfix) with ESMTP id 4FE822740043; Fri, 10 Jan 2014 15:44:44 +0900 (JST) From: Masahiro Yamada To: u-boot@lists.denx.de Date: Fri, 10 Jan 2014 15:44:23 +0900 Message-Id: <1389336274-7234-27-git-send-email-yamada.m@jp.panasonic.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1389336274-7234-1-git-send-email-yamada.m@jp.panasonic.com> References: <1389336274-7234-1-git-send-email-yamada.m@jp.panasonic.com> Cc: Tom Rini Subject: [U-Boot] [PATCH v4 26/37] kbuild: generate {spl, tpl}-autoconf.mk only when it is necessary X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 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 Before this commit, {spl,tpl}-autoconf.mk was always generated at the top Makefile even if SPL(TPL) build was not selected. This commit moves the build rule of {spl,tpl}-autoconf.mk from the top Makefile to spl/Makefile. It prevents unnecessary {spl,tpl}-autoconf.mk from being generated. Signed-off-by: Masahiro Yamada --- Changes in v4: None Changes in v3: None Changes in v2: None Makefile | 23 ----------------------- spl/Makefile | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 23 deletions(-) diff --git a/Makefile b/Makefile index 393aa0b..72bfb9d 100644 --- a/Makefile +++ b/Makefile @@ -862,9 +862,6 @@ tpl/u-boot-tpl.bin: $(SUBDIR_TOOLS) depend scripts_basic # Explicitly make _depend in subdirs containing multiple targets to prevent # parallel sub-makes creating .depend files simultaneously. depend dep: $(TIMESTAMP_FILE) $(VERSION_FILE) \ - include/spl-autoconf.mk \ - include/tpl-autoconf.mk \ - include/autoconf.mk \ include/generated/generic-asm-offsets.h \ include/generated/asm-offsets.h @@ -946,26 +943,6 @@ quiet_cmd_autoconf = GEN $@ include/autoconf.mk: include/config.h $(call cmd,autoconf) -# Auto-generate the spl-autoconf.mk file (which is included by all makefiles for SPL) -quiet_cmd_tpl-autoconf = GEN $@ - cmd_tpl-autoconf = \ - $(CPP) $(c_flags) -DCONFIG_TPL_BUILD -DCONFIG_SPL_BUILD\ - -DDO_DEPS_ONLY -dM $(srctree)/include/common.h > $@.tmp && \ - sed -n -f $(srctree)/tools/scripts/define2mk.sed $@.tmp > $@; \ - rm $@.tmp - -include/tpl-autoconf.mk: include/config.h - $(call cmd,tpl-autoconf) - -quiet_cmd_spl-autoconf = GEN $@ - cmd_spl-autoconf = \ - $(CPP) $(c_flags) -DCONFIG_SPL_BUILD -DDO_DEPS_ONLY -dM $(srctree)/include/common.h > $@.tmp && \ - sed -n -f $(srctree)/tools/scripts/define2mk.sed $@.tmp > $@; \ - rm $@.tmp - -include/spl-autoconf.mk: include/config.h - $(call cmd,spl-autoconf) - quiet_cmd_offsets = GEN $@ cmd_offsets = $(srctree)/tools/scripts/make-asm-offsets $< $@ diff --git a/spl/Makefile b/spl/Makefile index bf886f7..55d6824 100644 --- a/spl/Makefile +++ b/spl/Makefile @@ -50,6 +50,22 @@ include $(srctree)/scripts/Kbuild.include include $(TOPDIR)/config.mk +# FIX ME +c_flags := $(KBUILD_CFLAGS) $(KBUILD_CPPFLAGS) $(CPPFLAGS) $(UBOOTINCLUDE) $(NOSTDINC_FLAGS) + +# Auto-generate the spl-autoconf.mk file (which is included by all makefiles for SPL) +quiet_cmd_autoconf = GEN $@ + cmd_autoconf = \ + $(CPP) $(c_flags) -DDO_DEPS_ONLY -dM $(srctree)/include/common.h > $@.tmp && \ + sed -n -f $(srctree)/tools/scripts/define2mk.sed $@.tmp > $@; \ + rm $@.tmp + +include/tpl-autoconf.mk: include/config.h + $(call cmd,autoconf) + +include/spl-autoconf.mk: include/config.h + $(call cmd,autoconf) + HAVE_VENDOR_COMMON_LIB = $(if $(wildcard $(SRCTREE)/board/$(VENDOR)/common/Makefile),y,n) ifdef CONFIG_SPL_START_S_PATH