From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Jonathan Corbet <corbet@lwn.net>
Cc: Linux Doc Mailing List <linux-doc@vger.kernel.org>,
linux-kernel@vger.kernel.org, Akira Yokosawa <akiyks@gmail.com>
Subject: Re: [PATCH v8 00/24] Split sphinx call logic from docs Makefile
Date: Fri, 19 Sep 2025 01:39:42 +0200 [thread overview]
Message-ID: <20250919013942.030544ed@foz.lan> (raw)
In-Reply-To: <878qib7dy6.fsf@trenco.lwn.net>
Em Thu, 18 Sep 2025 13:33:53 -0600
Jonathan Corbet <corbet@lwn.net> escreveu:
> Mauro Carvalho Chehab <mchehab+huawei@kernel.org> writes:
>
> >> I haven't
> >> had the time to figure it out.
> >
> > I don't remember anymore what "subproject" really means inside
> > ".. only::", block, but I guess it is meant to be used when one
> > passes SPHINXDIRS.
>
> I found myself in a similar position... it is set in
> Documentation/sphinx/load_config.py, it seems a certain Mauro added that
> in 2019 :)
LOL!
> Since then, it has seemingly been cargo-culted all over the
> place; I wonder if we really need it.
It looks to me that it have been ages since last touched load_config.py,
as it is hard to remember about its dirty secrets.... Maybe it is part
of some traumatic experiences that we shared ;-)
Anyway, looking at:
a84d9e899683 ("docs: load_config.py: avoid needing a conf.py just due to LaTeX docs")
and seeking for what we had before, you might noticed that, in the
early days, someone called Jonathan wrote patches for instance, adding
core-api docs, including this one:
commit 22917b992d3713157e759f23a5a090687d004331
Author: Jonathan Corbet <corbet@lwn.net>
Date: Wed Nov 16 16:07:02 2016 -0700
docs: Add more manuals to the PDF build
There were a few manuals that weren't being built in PDF format, but
there's no reason not to...
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
diff --git a/Documentation/core-api/conf.py b/Documentation/core-api/conf.py
index fed87ab7f486..db1f7659f3da 100644
--- a/Documentation/core-api/conf.py
+++ b/Documentation/core-api/conf.py
@@ -3,3 +3,8 @@
project = "Core-API Documentation"
tags.add("subproject")
+
+latex_documents = [
+ ('index', 'core-api.tex', project,
+ 'The kernel development community', 'manual'),
+]
there you can see that our mistic "subproject" tag was already present :-D
What happens is that, before a84d9e899683, for every single book we
wanted to build via SPHINXDIRS, a conf.py file was required.
The actual logic is a way more complex than that, but what it does is
similar to (untested):
#
# namespace comes from conf.py: loadConfig(globals())
#
def loadConfig(namespace):
if os.path.basename(os.getcwd()) != "Documentation":
config = namespace.copy()
config['tags'].add("subproject")
namespace.update(config)
(it also has some logic there for latex_documents)
On other words:
- subproject exists only on Documentation subdirs. It is basically
used to tell *.rst files that SPHINXDIRS=<subdirs>
- its goal is to run genindex when SPHINXDIRS is used to build
html documentation.
And that explains why when rust is built, it has a duplicated indexes:
neither the current docs Makefile nor sphinx-build-wrapper should be
manually adding "-t subproject".
-
That's said, as part of our doc build cleanups, IMHO we should add on
our todo to drop load_config.py, adding the missing bits on conf.py
while properly documenting it.
Thanks,
Mauro
next prev parent reply other threads:[~2025-09-18 23:39 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-18 11:54 [PATCH v8 00/24] Split sphinx call logic from docs Makefile Mauro Carvalho Chehab
2025-09-18 11:54 ` [PATCH v8 01/24] scripts/jobserver-exec: move the code to a class Mauro Carvalho Chehab
2025-09-18 16:58 ` Jonathan Corbet
2025-09-18 17:33 ` Mauro Carvalho Chehab
2025-09-18 11:54 ` [PATCH v8 02/24] scripts/jobserver-exec: move its class to the lib directory Mauro Carvalho Chehab
2025-09-18 11:54 ` [PATCH v8 03/24] scripts/jobserver-exec: add a help message Mauro Carvalho Chehab
2025-09-18 11:54 ` [PATCH v8 04/24] scripts: check-variable-fonts.sh: convert to Python Mauro Carvalho Chehab
2025-09-18 11:54 ` [PATCH v8 05/24] tools/docs: check-variable-fonts.py: split into a lib and an exec file Mauro Carvalho Chehab
2025-09-18 11:54 ` [PATCH v8 06/24] check-variable-fonts.py: add a helper to display instructions Mauro Carvalho Chehab
2025-09-18 11:54 ` [PATCH v8 07/24] scripts: sphinx-pre-install: move it to tools/docs Mauro Carvalho Chehab
2025-09-18 11:54 ` [PATCH v8 08/24] tools/docs: sphinx-pre-install: drop a debug print Mauro Carvalho Chehab
2025-09-18 11:54 ` [PATCH v8 09/24] tools/docs: sphinx-pre-install: allow check for alternatives and bail out Mauro Carvalho Chehab
2025-09-18 11:54 ` [PATCH v8 10/24] tools/docs: python_version: move version check from sphinx-pre-install Mauro Carvalho Chehab
2025-09-18 11:54 ` [PATCH v8 11/24] tools/docs: sphinx-build-wrapper: add a wrapper for sphinx-build Mauro Carvalho Chehab
2025-09-18 11:54 ` [PATCH v8 12/24] docs: parallel-wrapper.sh: remove script Mauro Carvalho Chehab
2025-09-18 11:54 ` [PATCH v8 13/24] docs: Makefile: document latex/PDF PAPER= parameter Mauro Carvalho Chehab
2025-09-18 11:54 ` [PATCH v8 14/24] docs: Makefile: document FONTS_CONF_DENY_VF= parameter Mauro Carvalho Chehab
2025-09-18 11:54 ` [PATCH v8 15/24] tools/docs: sphinx-build-wrapper: add an argument for LaTeX interactive mode Mauro Carvalho Chehab
2025-09-18 11:54 ` [PATCH v8 16/24] tools/docs: sphinx-build-wrapper: allow building PDF files in parallel Mauro Carvalho Chehab
2025-09-18 11:54 ` [PATCH v8 17/24] tools/docs,scripts: sphinx-*: prevent sphinx-build crashes Mauro Carvalho Chehab
2025-09-18 11:54 ` [PATCH v8 18/24] tools/docs: sphinx-build-wrapper: Fix output for duplicated names Mauro Carvalho Chehab
2025-09-18 11:54 ` [PATCH v8 19/24] docs: add support to build manpages from kerneldoc output Mauro Carvalho Chehab
2025-09-27 20:35 ` Nicolas Schier
2025-09-29 0:44 ` Mauro Carvalho Chehab
2025-09-18 11:54 ` [PATCH v8 20/24] tools: kernel-doc: add a see also section at man pages Mauro Carvalho Chehab
2025-09-18 11:54 ` [PATCH v8 21/24] scripts: kdoc_parser.py: warn about Python version only once Mauro Carvalho Chehab
2025-09-18 11:54 ` [PATCH v8 22/24] tools/docs: sphinx-build-wrapper: move rust doc builder to wrapper Mauro Carvalho Chehab
2025-09-18 11:54 ` [PATCH v8 23/24] tools/docs: sphinx-* break documentation bulds on openSUSE Mauro Carvalho Chehab
2025-09-18 11:54 ` [PATCH v8 24/24] tools/docs: sphinx-build-wrapper: add support to run inside venv Mauro Carvalho Chehab
2025-09-18 17:47 ` [PATCH v8 00/24] Split sphinx call logic from docs Makefile Jonathan Corbet
2025-09-18 19:23 ` Mauro Carvalho Chehab
2025-09-18 19:33 ` Jonathan Corbet
2025-09-18 23:39 ` Mauro Carvalho Chehab [this message]
2025-10-17 20:13 ` Jonathan Corbet
2025-10-18 10:41 ` 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=20250919013942.030544ed@foz.lan \
--to=mchehab+huawei@kernel.org \
--cc=akiyks@gmail.com \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@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;
as well as URLs for NNTP newsgroup(s).