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.

doc tools: better handle KBUILD_VERBOSE

As reported by Jacob, there are troubles when KBUILD_VERBOSE is
set at the environment.

Fix it on both kernel-doc and sphinx-build-wrapper.

Reported-by: Jacob Keller <jacob.e.keller@intel.com>
Closes: https://lore.kernel.org/linux-doc/9367d899-53af-4d9c-9320-22fc4dbadca5@intel.com/
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tested-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <7a99788db75630fb14828d612c0fd77c45ec1891.1774591065.git.mchehab+huawei@kernel.org>

authored by

Mauro Carvalho Chehab and committed by
Jonathan Corbet
d642acfd 3a614394

+12 -2
+6 -1
tools/docs/sphinx-build-wrapper
··· 238 238 self.latexopts = os.environ.get("LATEXOPTS", "") 239 239 240 240 if not verbose: 241 - verbose = bool(os.environ.get("KBUILD_VERBOSE", "") != "") 241 + try: 242 + verbose = bool(int(os.environ.get("KBUILD_VERBOSE", 0))) 243 + except ValueError: 244 + # Handles an eventual case where verbosity is not a number 245 + # like KBUILD_VERBOSE="" 246 + verbose = False 242 247 243 248 if verbose is not None: 244 249 self.verbose = verbose
+6 -1
tools/lib/python/kdoc/kdoc_files.py
··· 238 238 """ 239 239 240 240 if not verbose: 241 - verbose = bool(os.environ.get("KBUILD_VERBOSE", 0)) 241 + try: 242 + verbose = bool(int(os.environ.get("KBUILD_VERBOSE", 0))) 243 + except ValueError: 244 + # Handles an eventual case where verbosity is not a number 245 + # like KBUILD_VERBOSE="" 246 + verbose = False 242 247 243 248 if out_style is None: 244 249 out_style = OutputFormat()