public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Schier <nsc@kernel.org>
To: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Masahiro Yamada <masahiroy@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>,
	Nathan Chancellor <nathan@kernel.org>,
	linux-kbuild@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	Rong Zhang <i@rong.moe>,
	Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Subject: Re: [PATCH] kbuild: Do not run kernel-doc when building external modules
Date: Wed, 4 Feb 2026 11:11:33 +0100	[thread overview]
Message-ID: <aYMbVcNvJPlLPaaG@derry.ads.avm.de> (raw)
In-Reply-To: <6387ba7b99fb952a59932c3a851dfd0ecc4dfb2c@intel.com>

On Wed, Feb 04, 2026 at 11:10:37AM +0200, Jani Nikula wrote:
> On Wed, 04 Feb 2026, Masahiro Yamada <masahiroy@kernel.org> wrote:
> > Since kernel-doc is a part of Kbuild,
> > all dependent libraries should exist under scripts/.
> 
> Huh. I've always wondered why all the Kbuild makefiles are placed in
> scripts/, which appears to be a haphazard collection of, well, scripts
> and tools. But then you also have tools/.

From the kbuild perspective, as Masahiro mentioned, every tooling
related to kernel builds, kbuild or kconfig should be placed in
scripts/.  The tools/ subtree isn't using kbuild; rules, definitionas
and other expectations that are valid for kbuild may not be true in
tools/, cp. commit 6e6ef2da3a28f [1].

Unfortunately, there _are_ things in tools/ that are required for kernel
builds (e.g. objtool), but there is no consent on moving these parts out
of the tools/ subtree [2].

> I've followed the kernel-doc refactoring from the sidelines, commenting
> on some things, but it never crossed my mind the build shouldn't depend
> on something outside of scripts/. (That's what I'm inferring here
> anyway.) And apparently that thought didn't occur to a lot of other
> people either, with even more kernel experience than myself.

Yes, I also saw the changes fly by but did not think about the
implications.

> Sounds like the kernel config and build system would deserve a top-level
> directory like build/ or kbuild/, which collects everything needed for
> the build, nothing more, nothing less. Because scripts/ is not *that*.

Well, sounds straight forward at first, but where should we make the cut
between kbuild and non-kbuild?  I admit that there are some scripts
below scripts/ that I'd rather label as "contrib", but I don't think
that these are too much.

> I understand all of this may be a historical accident, and possibly too
> painful to fix now, but is any of this documented anywhere either?

No, I am afraid it isn't.

Kind regards,
Nicolas


[1]: https://git.kernel.org/kbuild/c/6e6ef2da3a28f
[2]: https://lore.kernel.org/linux-kbuild/1551764896-8453-3-git-send-email-yamada.masahiro@socionext.com/

  reply	other threads:[~2026-02-04 10:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-30 21:37 [PATCH] kbuild: Do not run kernel-doc when building external modules Nathan Chancellor
2026-01-30 23:18 ` Randy Dunlap
2026-01-31 15:15 ` Nicolas Schier
2026-02-04  7:02   ` Masahiro Yamada
2026-02-04  7:39     ` Nathan Chancellor
2026-02-04 10:22       ` Mauro Carvalho Chehab
2026-02-04  9:10     ` Jani Nikula
2026-02-04 10:11       ` Nicolas Schier [this message]
2026-02-04 10:32         ` Mauro Carvalho Chehab
2026-02-04 10:39         ` Jani Nikula
2026-02-04 11:12           ` Mauro Carvalho Chehab

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=aYMbVcNvJPlLPaaG@derry.ads.avm.de \
    --to=nsc@kernel.org \
    --cc=corbet@lwn.net \
    --cc=i@rong.moe \
    --cc=jani.nikula@linux.intel.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=mchehab+huawei@kernel.org \
    --cc=nathan@kernel.org \
    --cc=stable@vger.kernel.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