[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <38b24e97a3cbd2def418359a8e69b1b087a945ad.1769500383.git.mchehab+huawei@kernel.org>
Date: Tue, 27 Jan 2026 09:03:33 +0100
From: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
To: Linux Doc Mailing List <linux-doc@...r.kernel.org>,
Mauro Carvalho Chehab <mchehab@...nel.org>
Cc: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
linux-kernel@...r.kernel.org,
Akira Yokosawa <akiyks@...il.com>,
Jani Nikula <jani.nikula@...el.com>,
Jonathan Corbet <corbet@....net>,
Shuah Khan <skhan@...uxfoundation.org>
Subject: [PATCH 2/3] docs: sphinx-build-wrapper: allow -v override -q
Documentation builds were using "-q" for a long time, but sometimes
it is nice to see the Sphinx progress, without increasing build
verbosity - which would also turn on kernel-doc verbosity.
Instead of doing that, let's parse the sphinx-build already-existing
-v: each time it is used, it increases the verbosity level.
With that, if the default is to use -q, a single -v will disable
quiet mode. Passing more -v will keep increasing its verbosity.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
---
tools/docs/sphinx-build-wrapper | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/tools/docs/sphinx-build-wrapper b/tools/docs/sphinx-build-wrapper
index 78ff7ac202ef..8080ace60680 100755
--- a/tools/docs/sphinx-build-wrapper
+++ b/tools/docs/sphinx-build-wrapper
@@ -168,6 +168,7 @@ class SphinxBuilder:
parser = argparse.ArgumentParser()
parser.add_argument('-j', '--jobs', type=int)
parser.add_argument('-q', '--quiet', action='store_true')
+ parser.add_argument('-v', '--verbose', default=0, action='count')
#
# Other sphinx-build arguments go as-is, so place them
@@ -179,10 +180,14 @@ class SphinxBuilder:
# Build a list of sphinx args, honoring verbosity here if specified
#
- verbose = self.verbose
sphinx_args, self.sphinxopts = parser.parse_known_args(sphinxopts)
+
+ verbose = sphinx_args.verbose
+ if self.verbose:
+ verbose += 1
+
if sphinx_args.quiet is True:
- verbose = False
+ verbose = 0
#
# If the user explicitly sets "-j" at command line, use it.
@@ -195,8 +200,11 @@ class SphinxBuilder:
else:
self.n_jobs = None
- if not verbose:
+ if verbose < 1:
self.sphinxopts += ["-q"]
+ else:
+ for i in range(1, sphinx_args.verbose):
+ self.sphinxopts += ["-v"]
def __init__(self, builddir, venv=None, verbose=False, n_jobs=None,
interactive=None):
--
2.52.0
Powered by blists - more mailing lists