From patchwork Fri Apr 3 03:30:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 457838 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 2F1C6140083 for ; Fri, 3 Apr 2015 14:30:56 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3F1493929; Fri, 3 Apr 2015 05:30:52 +0200 (CEST) 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 RXVn0xY0vM5a; Fri, 3 Apr 2015 05:30:52 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6BCAAB37B3; Fri, 3 Apr 2015 05:30:51 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DBD0AB37B3 for ; Fri, 3 Apr 2015 05:30:48 +0200 (CEST) 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 qxP4vwr-ITOs for ; Fri, 3 Apr 2015 05:30:48 +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 conuserg009-v.nifty.com (conuserg009.nifty.com [202.248.44.35]) by theia.denx.de (Postfix) with ESMTPS id 2150EB37B2 for ; Fri, 3 Apr 2015 05:30:44 +0200 (CEST) Received: from beagle.diag.org (KD106178186157.au-net.ne.jp [106.178.186.157]) (authenticated) by conuserg009-v.nifty.com with ESMTP id t333UGPD019682; Fri, 3 Apr 2015 12:30:22 +0900 X-Nifty-SrcIP: [106.178.186.157] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Fri, 3 Apr 2015 12:30:25 +0900 Message-Id: <1428031825-13573-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 Cc: Marek Vasut , Tom Rini , Jeroen Hofstee , Stefan Roese Subject: [U-Boot] [PATCH] kbuild: include config.mk when auto.conf is not older than .config X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Since the Kconfig conversion, config.mk has been included only when include/config/auto.conf is newer than the .config file. It causes build error if both files have the same time-stamps. It is actually possible because EXT* file systems have a 1s time-stamp resolution. The config.mk should be included when include/config/auto.conf is *not older* than the .config file. Signed-off-by: Masahiro Yamada Reported-by: Tom Rini Reported-by: York Sun Reported-by: Stephen Warren Reported-by: Matthew Gerlach Tested-by: Stephen Warren --- Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index f1bce44..53ad450 100644 --- a/Makefile +++ b/Makefile @@ -513,12 +513,16 @@ include/config/%.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd # is up-to-date. When we switch to a different board configuration, old CONFIG # macros are still remaining in include/config/auto.conf. Without the following # gimmick, wrong config.mk would be included leading nasty warnings/errors. -autoconf_is_current := $(if $(wildcard $(KCONFIG_CONFIG)),$(shell find . \ - -path ./include/config/auto.conf -newer $(KCONFIG_CONFIG))) -ifneq ($(autoconf_is_current),) +ifneq ($(wildcard $(KCONFIG_CONFIG)),) +ifneq ($(wildcard include/config/auto.conf),) +autoconf_is_old := $(shell find . -path ./$(KCONFIG_CONFIG) -newer \ + include/config/auto.conf) +ifeq ($(autoconf_is_old),) include $(srctree)/config.mk include $(srctree)/arch/$(ARCH)/Makefile endif +endif +endif # If board code explicitly specified LDSCRIPT or CONFIG_SYS_LDSCRIPT, use # that (or fail if absent). Otherwise, search for a linker script in a