LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Masahiro Yamada <masahiroy@kernel.org>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Michal Marek <michal.lkml@markovi.net>,
	Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>
Subject: Re: [PATCH] kbuild: allow "make" targets 'versioncheck' and 'includecheck' withoug .config file
Date: Fri, 13 Aug 2021 16:27:56 +0900	[thread overview]
Message-ID: <CAK7LNASJi3HWY9ut8+mkSOAWD=QxB7ftnkHdqZRW0fLbO5NDhg@mail.gmail.com> (raw)
In-Reply-To: <20210811225442.9537-1-rdunlap@infradead.org>

On Thu, Aug 12, 2021 at 7:54 AM Randy Dunlap <rdunlap@infradead.org> 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 <rdunlap@infradead.org>
> Cc: Masahiro Yamada <masahiroy@kernel.org>
> Cc: Michal Marek <michal.lkml@markovi.net>
> 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

  reply	other threads:[~2021-08-13  7:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-11 22:54 [PATCH] kbuild: allow "make" targets 'versioncheck' and 'includecheck' withoug .config file Randy Dunlap
2021-08-13  7:27 ` Masahiro Yamada [this message]
2021-08-13  8:32 ` Nicolas Schier
2021-08-13 15:00   ` Randy Dunlap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAK7LNASJi3HWY9ut8+mkSOAWD=QxB7ftnkHdqZRW0fLbO5NDhg@mail.gmail.com' \
    --to=masahiroy@kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=rdunlap@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).