From patchwork Tue Feb 13 07:58:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Magnusson X-Patchwork-Id: 10215281 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8938260467 for ; Tue, 13 Feb 2018 07:59:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7FA0D28E60 for ; Tue, 13 Feb 2018 07:59:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7438128E62; Tue, 13 Feb 2018 07:59:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ED7DC28E60 for ; Tue, 13 Feb 2018 07:59:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933656AbeBMH6j (ORCPT ); Tue, 13 Feb 2018 02:58:39 -0500 Received: from mail-lf0-f52.google.com ([209.85.215.52]:40780 "EHLO mail-lf0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933617AbeBMH6g (ORCPT ); Tue, 13 Feb 2018 02:58:36 -0500 Received: by mail-lf0-f52.google.com with SMTP id 37so5016802lfs.7; Mon, 12 Feb 2018 23:58:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=yGjZVPKBWu4doztk3Junzr+U09y9LFeg3XmZUHNV/Hw=; b=EqAPX5RpjeuHDZO037iVVpWOo7QnsaRx/gqD0gC0+fZ8vYzhKFNYzFqcMs2mAoKQPu KPCRHGLkpNF/W99+NjkpZ/rVPLrEyK91uV1QwkOhx1Gf46HatiadNmP8BvX2vmQrqOGX VFWx0PXbXUNxcftcY1Ds3oyVvCBAVr5HM3P2OyvHEgXCFz+w09rX2JMq0hvAPIlBTlnP 8Cf+OYQLLdso7EsyrE0B37xbhimle6/omC5fEFxpIE6YSLoI6M0GwArOsui6OyROot0G qzxzd5Y8WF00kxzO8GQxsn5e9mSS03TweZAgGvt9s7JKqWIvOoI4Ee3df9ZtpLbKYb09 3QmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=yGjZVPKBWu4doztk3Junzr+U09y9LFeg3XmZUHNV/Hw=; b=uJoShT6qolWcPdlwTFirxTBawdNlZewWTOzMCdmpJwkMxkqX7/fKJWHn1VWbkrAGRn 7W2Lo2iwMQ9IruhwFIEzAOYAXFKEY1C301lClK1ZygQGwxoK/At1RgoywBY3Kb/FVSU+ xyyZNWHF2CcJsWcxtRtiFySr/J2N0NsZMKNn6jqRD727xJoU79BSityFDm4zkayuLCX1 m2nFGy3YumHPC5Oz9IqAaGL1d0CvnUjRNFE8ETzHuGzCzZndbQanbXpVQII5Rev/zPkZ mLXEeHZ3Qy5iSRHv5MwDD8+RExWy0g/qxs2vkSoZLEPb62/hAGVVy7NdPZ0iTYmQ4EnL cT/g== X-Gm-Message-State: APf1xPA1tjtsK/Awx8oXYAMh7h1f0RKOisEqWcHasRjm3zWoG2tBknIu OpLMFSfntbYOvQIMizkFmXNhtSdODKs= X-Google-Smtp-Source: AH8x225waYmCemrVf8b2votC4Wci7RUEKcfEklk17SEfYgjnbx7qjm5oeJ26fgA8EWP7SiEbeNb4BQ== X-Received: by 10.46.75.1 with SMTP id y1mr289767lja.33.1518508714658; Mon, 12 Feb 2018 23:58:34 -0800 (PST) Received: from huvuddator.lan (ua-213-113-106-221.cust.bredbandsbolaget.se. [213.113.106.221]) by smtp.gmail.com with ESMTPSA id g10sm1977525ljg.94.2018.02.12.23.58.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Feb 2018 23:58:34 -0800 (PST) From: Ulf Magnusson To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, yamada.masahiro@socionext.com, Ulf Magnusson , Michal Marek Subject: [PATCH v2] Makefile: Fix lying comment re. silentoldconfig Date: Tue, 13 Feb 2018 08:58:20 +0100 Message-Id: <20180213075821.24499-1-ulfalizer@gmail.com> X-Mailer: git-send-email 2.14.1 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The comment above the silentoldconfig invocation is outdated. 'make oldconfig' updates just .config and doesn't touch the include/config/ tree. This came up in https://lkml.org/lkml/2018/2/12/415. While fixing the comment, make it more informative by explaining the purpose of the unfortunately named silentoldconfig. I can't make sense of the comment re. auto.conf.cmd and a cleaned tree. include/config/auto.conf and include/config/auto.conf.cmd are both created simultaneously by silentoldconfig (in scripts/kconfig/confdata.c, by conf_write_autoconf()), and nothing seems to remove auto.conf.cmd that wouldn't remove auto.conf. Remove that part of the comment rather than blindly copying it. It might be a leftover from an older way of doing things. The include/config/auto.conf.cmd prerequisite might be there to ensure that silentoldconfig gets rerun if conf_write_autoconf() fails between writing out auto.conf.cmd and auto.conf (a comment in the function indicates that auto.conf is deliberately written out last to mark completion of the operation). It seems the Makefile dependency between include/config/auto.conf and .config would already take care of that though, since include/config/auto.conf would still be out of date re. .config if the operation fails. Cop out and leave the prerequisite in for now. Signed-off-by: Ulf Magnusson --- Changes in v2: include/config/auto.conf depends on .config, not the other way around, so swap them in some places in the commit message to make it less confusing. Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 79ad2bfa24b6..61ed99ad4b1b 100644 --- a/Makefile +++ b/Makefile @@ -579,10 +579,13 @@ ifeq ($(KBUILD_EXTMOD),) # To avoid any implicit rule to kick in, define an empty command $(KCONFIG_CONFIG) include/config/auto.conf.cmd: ; -# If .config is newer than include/config/auto.conf, someone tinkered -# with it and forgot to run make oldconfig. -# if auto.conf.cmd is missing then we are probably in a cleaned tree so -# we execute the config step to be sure to catch updated Kconfig files +# The actual configuration files used during the build are stored in +# include/generated/ and include/config/. Update them if .config is newer than +# include/config/auto.conf (which mirrors .config). +# +# The include/config/ tree manages dependencies between source files and +# Kconfig symbols and lets us avoid doing a full rebuild whenever the +# configuration is changed. See scripts/basic/fixdep.c include/config/%.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd $(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig else