[LTP] [PATCH 2/4] doc: Reduce default sphinx verbosity with -q

Petr Vorel <[email protected]>
Newsgroups it.linux.lists.ltp
Message-ID <[email protected]>
Guard sphinx -v opt with V=1 make variable. This will be useful for
linuxdoc update which uses Sphinx logging in this version.

Actually '-q' is needed because even without '-v' the output would get
over thousand of kernel-doc INFO level messages like:

    include/tst_test_macros.h:811: [kernel-doc INFO] : prototype --> '#define TST_EXP_EQ_LI_SILENT(VAL_A, VAL_B) \'
    include/tst_test_macros.h:815: [kernel-doc INFO] : scanning doc for: function 'TST_EXP_EQ_LU'
    include/tst_test_macros.h:817: [kernel-doc INFO] : section: @VAL_A
    include/tst_test_macros.h:818: [kernel-doc INFO] : section: @VAL_B

which would easily hide a real error.

While at it, use this also for 'spelling' make target.

Signed-off-by: Petr Vorel <[email protected]>
---
 doc/Makefile | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/doc/Makefile b/doc/Makefile
index 1da240530c..76248c3ed4 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -8,6 +8,13 @@ include $(top_srcdir)/include/mk/env_pre.mk
 PYTHON := python3
 VENV_DIR := .venv
 
+ifdef VERBOSE
+OPTS := -v
+else
+# linuxdoc 20260504 is too verbose by default
+OPTS := -q
+endif
+
 # only fish and bash/zsh supported
 VENV_CMD := if [ "x${FISH_VERSION}" != "x" ]; then . $(VENV_DIR)/bin/activate.fish; else . $(VENV_DIR)/bin/activate; fi
 
@@ -24,10 +31,10 @@ ${abs_top_builddir}/metadata/ltp.json:
 	$(MAKE) -C ${abs_top_builddir}/metadata
 
 all: ${abs_top_builddir}/metadata/ltp.json
-	$(RUN_VENV); sphinx-build -v -b html . html
+	$(RUN_VENV); sphinx-build $(OPTS) -b html . html
 
 spelling:
-	$(RUN_VENV); sphinx-build -b spelling -d build/doctree . build/spelling
+	$(RUN_VENV); sphinx-build $(OPTS) -b spelling -d build/doctree . build/spelling
 
 clean:
 	rm -rf html/ build/ _static/syscalls.rst _static/tests.rst syscalls.tbl \
-- 
2.55.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.