Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs: conf.py: fix doc name with SPHINXDIRS

When SPHINXDIRS is used, the current logic produces a wrong
list of files, as it will not pick the SPHINXDIRS directory,
picking instead their children.

Add a rule to detect it and create the PDF doc with the right
name.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/183f630643eacf414cfa8d892f03dd1b1055c21e.1755763127.git.mchehab+huawei@kernel.org

authored by

Mauro Carvalho Chehab and committed by
Jonathan Corbet
280fa75c f62ed768

+13
+13
Documentation/conf.py
··· 91 91 # LaTeX and PDF output require a list of documents with are dependent 92 92 # of the app.srcdir. Add them here 93 93 94 + # When SPHINXDIRS is used, we just need to get index.rst, if it exists 95 + if not os.path.samefile(doctree, app.srcdir): 96 + doc = "index" 97 + doc_name = os.path.basename(app.srcdir) 98 + if os.path.exists(os.path.join(app.srcdir, doc + ".rst")): 99 + latex_documents.append((doc, doc_name + ".tex", 100 + "Linux %s Documentation" % doc_name.capitalize(), 101 + "The kernel development community", 102 + "manual")) 103 + return 104 + 105 + # When building all docs, or when a main index.rst doesn't exist, seek 106 + # for it on subdirectories 94 107 for fn in os.listdir(app.srcdir): 95 108 doc = os.path.join(fn, "index") 96 109 if not os.path.exists(os.path.join(app.srcdir, doc + ".rst")):