Currently, generation of manpages is hacky: one needs to run kernel-doc over c source files and then use an extra script to split results. The new kernel-doc tool supports multiple files and even dirs, so there's no need to use git ls-files anymore. Yet, it produces a single output. Change the logic to add, instead a target to docs Makefile to produce them, moving the split and build logic to sphinx-build-wrapper. That allows honoring SPHINXDIRS when they point to a subdir, while scanning all files by default. This series comes after: https://lore.kernel.org/linux-doc/cover.1756138805.git.mchehab+huawei@xxxxxxxxxx/T/#t Mauro Carvalho Chehab (1): docs: add support to build manpages from kerneldoc output Documentation/Makefile | 3 +- Documentation/doc-guide/kernel-doc.rst | 19 ++----- Makefile | 2 +- scripts/split-man.pl | 28 ---------- tools/docs/sphinx-build-wrapper | 77 ++++++++++++++++++++++++-- 5 files changed, 80 insertions(+), 49 deletions(-) delete mode 100755 scripts/split-man.pl -- 2.51.0