Received: by 2002:a05:6a10:8a4d:0:0:0:0 with SMTP id dn13csp592876pxb; Fri, 13 Aug 2021 01:48:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTHnfohVWJpCbnzekEVd046aarFBhYMoOQQ1bV9sPyJoZHCqF/JGAWWOxJWHobTOFTMHcy X-Received: by 2002:a5e:cb09:: with SMTP id p9mr1187996iom.180.1628844529384; Fri, 13 Aug 2021 01:48:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628844529; cv=none; d=google.com; s=arc-20160816; b=eJbb3jTDN6fgd9zGAWbKmCiQ7NabEAtgcYb7ca0eMeD6Urlah+BSu5/7ODmALLzg1X jvK/kGpuBaJT7f9A/h8AqhhkD59aypXPobpQayvcWPJphpWd20CNR3HkifaihgCUGDUS qVL/NLghdV/5fCVuAnoC/4ObyZUZdl4+iAjuuv3Ph6wrl++mXLSxWt3Q/fr+p7C57vfc fvjx+WbaEn3aSfC5D2e4HPyziFGfaJA7/57/FpwOXj1gVbDy+KwqX0mifTtVHkSqumXM jLyKLhgwrOnlvhdrM5QAwYIEKhDJXX1mOefAMF8SxroOGZZ0eg+IcEQR67MOORgj/gK6 rV+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature:dkim-filter; bh=BV8wnGfpU0adexwE48wxaMnANp7xHb9xXsYRk1N/H18=; b=gX3zVRUJAn7ogNgbBUxmKV8MKhyoRpXDKzjOphrw2fZDp+i8Fk4vc2uzxSQV3qMr0g HH0KUexsnQ2fU6cPXmuGxHZyvLrpHA6xsqn9nnZSr3BxDyyj9RYpZNB3q5mk4O7y8jNT 50ncAh/Z6mJIxDJxQcwclz9OWTwPWzQZMS5In5jXXag+YmyYTTBISa7a8Q+UdI2TDaI4 Zl9juJfb2DRnlVTnWBE7p3RPlE/Lbs3jkAQ0V7MvMsPKPltYe9uW6bAag1o1WcQ53YXk 7XBUxKtvN9dxm2iTeTge1xNS8JVB8/Kpaob7R0FJePov9pkAmD2IW/KcYuzmJJygtRJ1 rl1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=Wv4bUS5D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w15si1206109iov.42.2021.08.13.01.48.38; Fri, 13 Aug 2021 01:48:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=Wv4bUS5D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239426AbhHMH3f (ORCPT + 99 others); Fri, 13 Aug 2021 03:29:35 -0400 Received: from conssluserg-02.nifty.com ([210.131.2.81]:32656 "EHLO conssluserg-02.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238816AbhHMH3f (ORCPT ); Fri, 13 Aug 2021 03:29:35 -0400 Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) (authenticated) by conssluserg-02.nifty.com with ESMTP id 17D7SX08005023; Fri, 13 Aug 2021 16:28:34 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-02.nifty.com 17D7SX08005023 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1628839714; bh=BV8wnGfpU0adexwE48wxaMnANp7xHb9xXsYRk1N/H18=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Wv4bUS5DC5jMTBHGvc+v/2dW0yUAhx2C+vVmHRxcKO0FCnXTMbyfr+1kYaPLgsdmb AP8MkQY25tURaJfMeMLWoHXModJ1xvNbovHw1LwfoDwxzwQ0QZcA6WMpHBPlrz/PzW 8pMYW2ou/pAtxqGmZG1/trSXXAFJkwvrfU+Zt4diwVYcotLBQfF3VCngLvke/aYuZr idCzI9IhobsRo3C9RDNZLgoYPGkzZTjAruIftr1v9cU/AznvCg7APk4Q0d1jiZdX/A C8lT50sItK11iJWza+Ot/5wbjAQiUq8UqEtgLwpWHako41bNM1yrCX0xC84Eq5OdNo 5l6C+LwCi/zKQ== X-Nifty-SrcIP: [209.85.216.47] Received: by mail-pj1-f47.google.com with SMTP id bo18so14171538pjb.0; Fri, 13 Aug 2021 00:28:34 -0700 (PDT) X-Gm-Message-State: AOAM531vw/gAV0yRVmhLy/1WD4XoyGkmE1pV7aoOqhCCU/wGwtKAkd9N 13Rv/p6oa7wSQyZVHcIjczct7weFXsW+w/NkwtM= X-Received: by 2002:a17:90a:7384:: with SMTP id j4mr1212507pjg.153.1628839713522; Fri, 13 Aug 2021 00:28:33 -0700 (PDT) MIME-Version: 1.0 References: <20210811225442.9537-1-rdunlap@infradead.org> In-Reply-To: <20210811225442.9537-1-rdunlap@infradead.org> From: Masahiro Yamada Date: Fri, 13 Aug 2021 16:27:56 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] kbuild: allow "make" targets 'versioncheck' and 'includecheck' withoug .config file To: Randy Dunlap Cc: Linux Kernel Mailing List , Michal Marek , Linux Kbuild mailing list Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 12, 2021 at 7:54 AM Randy Dunlap wrote: > > Top-level Makefile targets 'versioncheck' and 'includecheck' don't > need a configured kernel (i.e., don't need a .config file), so add > them the the list of "no-dot-config-targets". > This eliminates the 'make' error: > > *** > *** Configuration file ".config" not found! > *** > *** Please run some configurator (e.g. "make oldconfig" or > *** "make menuconfig" or "make xconfig"). > *** > Makefile:759: include/config/auto.conf.cmd: No such file or directory > > Signed-off-by: Randy Dunlap > Cc: Masahiro Yamada > Cc: Michal Marek > Cc: linux-kbuild@vger.kernel.org > --- > Fixes: I couldn't determine this. > > Makefile | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > --- linux-next-20210811.orig/Makefile > +++ linux-next-20210811/Makefile > @@ -274,7 +274,8 @@ no-dot-config-targets := $(clean-targets > cscope gtags TAGS tags help% %docs check% coccicheck \ > $(version_h) headers headers_% archheaders archscripts \ > %asm-generic kernelversion %src-pkg dt_binding_check \ > - outputmakefile rustfmt rustfmtcheck > + outputmakefile rustfmt rustfmtcheck \ > + versioncheck includecheck > # Installation targets should not require compiler. Unfortunately, vdso_install > # is an exception where build artifacts may be updated. This must be fixed. > no-compiler-targets := $(no-dot-config-targets) install dtbs_install \ There is no good reason to invoke checkincludes.pl via GNU Make in the first place. A better solution is to do it by a shell script or to make checkincludes.pl traverse the subdirectories by itself. [1] An easy solution Add scripts/checkincludes-all: #!/bin/sh find . -name '*.[hcS]' -type f -print | sort \ | xargs $(dirname $0)/checkincludes.pl Then, remove the 'includecheck' target from the Makefile. You can do 'scripts/checkincludes-all' instead of 'make includecheck'. [2] A better solution Extend scripts/checkincludes.pl so that it checks all *.[hcS] files under the current directory when no argument is passed. You can simply do 'scripts/checkincludes.py' -- Best Regards Masahiro Yamada