summaryrefslogtreecommitdiff
path: root/tools/docs/sphinx-build-wrapper
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>2025-09-20 11:40:26 +0200
committerJonathan Corbet <corbet@lwn.net>2025-09-21 16:40:37 -0600
commit72603d73fae3d727fd1c97ab003940f1c2309226 (patch)
tree2f9611cc9526e67b8d3a549db5253500e3a4aa40 /tools/docs/sphinx-build-wrapper
parentc2381e8a6105dcc3eeee93766ba628cf656057f3 (diff)
docs: conf.py: get rid of load_config.py
The code here was meant to handle 3 functions: 1. allow having a separate conf.py file, per subdir; 2. generate a list of latex documents. 3. set "subproject" tag if SPHINXDIRS points to a subdir. We don't have (1) anymore, and (3) is now properly handled entirely inside conf.py. So, only (3) is still needed, and this is a single-line change at conf.py. So, drop it, moving the remaining code to conf.py. While here, drop a duplicated $(RUSTDOC) command-line argument. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Message-ID: <ec998f9f268a401ca6aa36e3221d39c97efeccaa.1758361087.git.mchehab+huawei@kernel.org>
Diffstat (limited to 'tools/docs/sphinx-build-wrapper')
-rwxr-xr-xtools/docs/sphinx-build-wrapper9
1 files changed, 2 insertions, 7 deletions
diff --git a/tools/docs/sphinx-build-wrapper b/tools/docs/sphinx-build-wrapper
index b7e97c10d7dc..bd8e2ed746e7 100755
--- a/tools/docs/sphinx-build-wrapper
+++ b/tools/docs/sphinx-build-wrapper
@@ -602,7 +602,7 @@ class SphinxBuilder:
"""Remove documentation output directory"""
shutil.rmtree(self.builddir, ignore_errors=True)
- def build(self, target, sphinxdirs=None, conf="conf.py",
+ def build(self, target, sphinxdirs=None,
theme=None, css=None, paper=None, deny_vf=None, rustdoc=False):
"""
Build documentation using Sphinx. This is the core function of this
@@ -653,9 +653,6 @@ class SphinxBuilder:
if rustdoc:
args.extend(["-t", "rustdoc"])
- if conf:
- self.env["SPHINX_CONF"] = self.get_path(conf, abs_path=True)
-
if not sphinxdirs:
sphinxdirs = os.environ.get("SPHINXDIRS", ".")
@@ -773,8 +770,6 @@ def main():
help="Documentation target to build")
parser.add_argument("--sphinxdirs", nargs="+",
help="Specific directories to build")
- parser.add_argument("--conf", default="conf.py",
- help="Sphinx configuration file")
parser.add_argument("--builddir", default="output",
help="Sphinx configuration file")
@@ -813,7 +808,7 @@ def main():
verbose=args.verbose, n_jobs=args.jobs,
interactive=args.interactive)
- builder.build(args.target, sphinxdirs=args.sphinxdirs, conf=args.conf,
+ builder.build(args.target, sphinxdirs=args.sphinxdirs,
theme=args.theme, css=args.css, paper=args.paper,
rustdoc=args.rustdoc, deny_vf=args.deny_vf)