public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Akira Yokosawa <akiyks@gmail.com>
To: mchehab+huawei@kernel.org
Cc: corbet@lwn.net, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Jani Nikula <jani.nikula@linux.intel.com>,
	Akira Yokosawa <akiyks@gmail.com>
Subject: Re: [PATCH v6 10/21] tools/docs: sphinx-build-wrapper: add a wrapper for sphinx-build
Date: Wed, 17 Sep 2025 17:35:31 +0900	[thread overview]
Message-ID: <1d454604-288d-4185-8567-836e06b3cbea@gmail.com> (raw)
In-Reply-To: <4d4dc78a4e29f2478fd1c1a746378dc61a090ca3.1758018030.git.mchehab+huawei@kernel.org>

[+CC: Jani, -CC: rust people and list]

On Tue, 16 Sep 2025 12:22:46 +0200, Mauro Carvalho Chehab wrote:
> There are too much magic inside docs Makefile to properly run
> sphinx-build. Create an ancillary script that contains all
> kernel-related sphinx-build call logic currently at Makefile.
> 
> Such script is designed to work both as an standalone command
> and as part of a Makefile. As such, it properly handles POSIX
> jobserver used by GNU make.
> 
> On a side note, there was a line number increase due to the
> conversion (ignoring comments) is:
> 
>  Documentation/Makefile          |  131 +++----------
>  tools/docs/sphinx-build-wrapper |  293 +++++++++++++++++++++++++++++++
>  2 files changed, 323 insertions(+), 101 deletions(-)
> 
> Comments and descriptions adds:
>  tools/docs/sphinx-build-wrapper | 261 +++++++++++++++++++++++++++++++-
> 
> So, about half of the script are comments/descriptions.
> 
> This is because some things are more verbosed on Python and because
> it requires reading env vars from Makefile. Besides it, this script
> has some extra features that don't exist at the Makefile:
> 
> - It can be called directly from command line;
> - It properly return PDF build errors.
> 
> When running the script alone, it will only take handle sphinx-build
> targets. On other words, it won't runn make rustdoc after building
> htmlfiles, nor it will run the extra check scripts.
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> ---
>  Documentation/Makefile          | 131 ++-----
>  tools/docs/sphinx-build-wrapper | 581 ++++++++++++++++++++++++++++++++
>  2 files changed, 611 insertions(+), 101 deletions(-)
>  create mode 100755 tools/docs/sphinx-build-wrapper
> 
> diff --git a/Documentation/Makefile b/Documentation/Makefile
> index 7570d4cf3b13..4736f02b6c9e 100644
> --- a/Documentation/Makefile
> +++ b/Documentation/Makefile
> @@ -23,21 +23,22 @@ SPHINXOPTS    =
>  SPHINXDIRS    = .
>  DOCS_THEME    =
>  DOCS_CSS      =
> -_SPHINXDIRS   = $(sort $(patsubst $(srctree)/Documentation/%/index.rst,%,$(wildcard $(srctree)/Documentation/*/index.rst)))

Wait!  In the cover-letter, you said:

    It should be noticed that it is out of the scope of this series
    to change the implementation. Surely the process can be improved,
    but first let's consolidate and document everything on a single
    place.

Removing current restriction on SPHINXDIRS does look inconsistent with
your own words to me.

So, I guess I have to NAK 06/21 as well.

Regards,
Akira


  reply	other threads:[~2025-09-17  8:35 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-16 10:22 [PATCH v6 00/21] Split sphinx call logic from docs Makefile Mauro Carvalho Chehab
2025-09-16 10:22 ` [PATCH v6 01/21] scripts/jobserver-exec: move the code to a class Mauro Carvalho Chehab
2025-09-16 10:22 ` [PATCH v6 02/21] scripts/jobserver-exec: move its class to the lib directory Mauro Carvalho Chehab
2025-09-16 10:22 ` [PATCH v6 03/21] scripts/jobserver-exec: add a help message Mauro Carvalho Chehab
2025-09-16 10:22 ` [PATCH v6 04/21] scripts: check-variable-fonts.sh: convert to Python Mauro Carvalho Chehab
2025-09-17  1:09   ` Akira Yokosawa
2025-09-17  8:48     ` Mauro Carvalho Chehab
2025-09-17 23:22       ` Akira Yokosawa
2025-09-18  8:51         ` Mauro Carvalho Chehab
2025-09-16 10:22 ` [PATCH v6 05/21] tools/docs: check-variable-fonts.py: split into a lib and an exec file Mauro Carvalho Chehab
2025-09-16 10:22 ` [PATCH v6 06/21] scripts: sphinx-pre-install: move it to tools/docs Mauro Carvalho Chehab
2025-09-16 10:22 ` [PATCH v6 07/21] tools/docs: python_version: move version check from sphinx-pre-install Mauro Carvalho Chehab
2025-09-16 10:22 ` [PATCH v6 08/21] tools/docs: python_version: drop a debug print Mauro Carvalho Chehab
2025-09-16 10:22 ` [PATCH v6 09/21] tools/docs: python_version: allow check for alternatives and bail out Mauro Carvalho Chehab
2025-09-16 10:22 ` [PATCH v6 10/21] tools/docs: sphinx-build-wrapper: add a wrapper for sphinx-build Mauro Carvalho Chehab
2025-09-17  8:35   ` Akira Yokosawa [this message]
2025-09-17  8:45     ` Akira Yokosawa
2025-09-17 15:11     ` Jonathan Corbet
2025-09-17 23:43       ` Akira Yokosawa
2025-09-18  8:24         ` Mauro Carvalho Chehab
2025-09-17 15:18     ` Mauro Carvalho Chehab
2025-09-16 10:22 ` [PATCH v6 11/21] docs: parallel-wrapper.sh: remove script Mauro Carvalho Chehab
2025-09-16 10:22 ` [PATCH v6 12/21] docs: Makefile: document latex/PDF PAPER= parameter Mauro Carvalho Chehab
2025-09-16 10:22 ` [PATCH v6 13/21] tools/docs: sphinx-build-wrapper: add an argument for LaTeX interactive mode Mauro Carvalho Chehab
2025-09-16 10:22 ` [PATCH v6 14/21] tools/docs,scripts: sphinx-*: prevent sphinx-build crashes Mauro Carvalho Chehab
2025-09-16 10:22 ` [PATCH v6 15/21] tools/docs: sphinx-build-wrapper: allow building PDF files in parallel Mauro Carvalho Chehab
2025-09-16 10:22 ` [PATCH v6 16/21] tools/docs: sphinx-build-wrapper: Fix output for duplicated names Mauro Carvalho Chehab
2025-09-16 10:22 ` [PATCH v6 17/21] docs: add support to build manpages from kerneldoc output Mauro Carvalho Chehab
2025-09-16 10:22 ` [PATCH v6 18/21] tools: kernel-doc: add a see also section at man pages Mauro Carvalho Chehab
2025-09-16 10:22 ` [PATCH v6 19/21] scripts: kdoc_parser.py: warn about Python version only once Mauro Carvalho Chehab
2025-09-16 10:22 ` [PATCH v6 20/21] tools/docs: sphinx-* break documentation bulds on openSUSE Mauro Carvalho Chehab
2025-09-16 10:22 ` [PATCH v6 21/21] tools/docs: sphinx-build-wrapper: add support to run inside venv Mauro Carvalho Chehab
2025-09-16 10:31 ` [PATCH v6 00/21] Split sphinx call logic from docs Makefile Mauro Carvalho Chehab
2025-09-16 15:47 ` Jonathan Corbet

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=1d454604-288d-4185-8567-836e06b3cbea@gmail.com \
    --to=akiyks@gmail.com \
    --cc=corbet@lwn.net \
    --cc=jani.nikula@linux.intel.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab+huawei@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