From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A916EC4338F for ; Wed, 4 Aug 2021 21:53:07 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D45CA61078 for ; Wed, 4 Aug 2021 21:53:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D45CA61078 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AF29482BCE; Wed, 4 Aug 2021 23:53:04 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="iFXq6XzE"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 938E482DED; Wed, 4 Aug 2021 23:53:01 +0200 (CEST) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 622F4829E2 for ; Wed, 4 Aug 2021 23:52:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: by mail.kernel.org (Postfix) with ESMTPSA id 3CBE06105A; Wed, 4 Aug 2021 21:52:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1628113975; bh=UUH5zb0mA9vPCo4XRAfObd7wNN/LmalcwcidPxNFhl4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=iFXq6XzEhfkT47v7qI3U7urNH/WPW3UAPhryOR8N7C8ORr2nwYCf8sUqpjkpMwiFc yM/nTEKiiWbnjNNgtCbwoviUOv6QxgJPO4At82tUy8hBmthkNfvCBk5x0+G61YAsIm akUG3Wh+mqqiCqK6P8inMwm4UlSUPQGnT1BiwMlI+7qbMl8hbw/QF2fkHuiDS66vRE +qq7CQCKeI9g6nNjF/JGOj7dO094BAnYqSurr4SbdZBR6kdhQkMQxm92uALZdRbc09 O4iyQ17dK7FEWrPzOrjYf8zw+Mp2PIxGAwDcGL0+vV8njPbgIuYjIKsPdria4grNgc 3+PhTSR1zaQbg== Received: by pali.im (Postfix) id E30AE77F; Wed, 4 Aug 2021 23:52:52 +0200 (CEST) Date: Wed, 4 Aug 2021 23:52:52 +0200 From: Pali =?utf-8?B?Um9ow6Fy?= To: Sean Anderson Cc: Simon Glass , Heinrich Schuchardt , Alexander Graf , Huan Wang , Angelo Dureghello , Wolfgang Denk , Priyanka Jain , Christophe Leroy , Bin Meng , Marek =?utf-8?B?QmVow7pu?= , Tom Rini , U-Boot Mailing List Subject: Re: [PATCH 11/11] Remove including timestamp.h in version.h Message-ID: <20210804215252.xycai6sna45opnzb@pali> References: <20210802131838.21097-1-pali@kernel.org> <20210802131838.21097-12-pali@kernel.org> <815b40e2-aa57-abfb-901f-979507a9e3b7@seco.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <815b40e2-aa57-abfb-901f-979507a9e3b7@seco.com> User-Agent: NeoMutt/20180716 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On Wednesday 04 August 2021 17:43:41 Sean Anderson wrote: > On 8/2/21 3:21 PM, Simon Glass wrote: > > Hi Pali, > > > > On Mon, 2 Aug 2021 at 07:20, Pali Rohár wrote: > > > > > > Header file version.h does not use anything from timestamp.h. Including of > > > timestamp.h has side effect which cause recompiling object file at every > > > make run because timestamp.h changes at every run. > > > > > > So remove timestamp.h from version.h and include timestamp.h in files > > > which needs it. > > > > > > This change reduce recompilation time of final U-Boot binary when U-Boot > > > source files were not changed as less source files needs to be recompiled. > > > > > > Signed-off-by: Pali Rohár > > > --- > > > arch/arm/mach-rockchip/tpl.c | 4 ++++ > > > board/work-microwave/work_92105/work_92105_display.c | 1 + > > > cmd/version.c | 1 + > > > common/spl/spl.c | 4 ++++ > > > drivers/rtc/emul_rtc.c | 2 +- > > > include/version.h | 2 -- > > > 6 files changed, 11 insertions(+), 3 deletions(-) > > > > Reviewed-by: Simon Glass > > > > I assume we do actually want to regenerate the timestamp when U-Boot > > builds, even if nothing has changed. Is that right? > > I know this is the current behavior, but it would be nice if this was > not the case. If one is building U-Boot as part of a larger project, one > might want to have a makefile rule like > > u-boot/u-boot.bin: > $(MAKE) -C u-boot $(@F) You are missing 'FORCE' prerequisite for u-boot/u-boot.bin target (but I understand what you mean; I'm using this stuff too). > but u-boot/u-boot.bin will always be remade even if no changes have been > done. This will cause make to remake all dependents of U-Boot as well > (which can be rather time-consuming). > > At the moment, I just use U-Boot as an order-only dependency and remake > it manually. But I would love it if U-Boot was only remade if > dependencies had actually changed, since this would make it easier to > integrate it with the rest of my build system. This behavior which you described is e.g. used by Linux kernel build system (also based on Makefile(s) and Kbuild as U-Boot). Maybe we can discuss if such change can or cannot be useful for U-Boot too. But to not make another confusion, it is not part and it is not related to this my patch series. So I would suggest to discuss about it in separate / new thread (fell free to CC me).