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: 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@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <38b24e97a3cbd2def418359a8e69b1b087a945ad.1769500383.git.mchehab+huawei@kernel.org>

authored by

Mauro Carvalho Chehab and committed by
Jonathan Corbet
b09cc1dd 98f51c46

+11 -3
+11 -3
tools/docs/sphinx-build-wrapper
··· 168 168 parser = argparse.ArgumentParser() 169 169 parser.add_argument('-j', '--jobs', type=int) 170 170 parser.add_argument('-q', '--quiet', action='store_true') 171 + parser.add_argument('-v', '--verbose', default=0, action='count') 171 172 172 173 # 173 174 # Other sphinx-build arguments go as-is, so place them ··· 180 179 # Build a list of sphinx args, honoring verbosity here if specified 181 180 # 182 181 183 - verbose = self.verbose 184 182 sphinx_args, self.sphinxopts = parser.parse_known_args(sphinxopts) 183 + 184 + verbose = sphinx_args.verbose 185 + if self.verbose: 186 + verbose += 1 187 + 185 188 if sphinx_args.quiet is True: 186 - verbose = False 189 + verbose = 0 187 190 188 191 # 189 192 # If the user explicitly sets "-j" at command line, use it. ··· 200 195 else: 201 196 self.n_jobs = None 202 197 203 - if not verbose: 198 + if verbose < 1: 204 199 self.sphinxopts += ["-q"] 200 + else: 201 + for i in range(1, sphinx_args.verbose): 202 + self.sphinxopts += ["-v"] 205 203 206 204 def __init__(self, builddir, venv=None, verbose=False, n_jobs=None, 207 205 interactive=None):