mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Nicolas Schier <nsc@kernel.org>
Cc: "Linux Doc Mailing List" <linux-doc@vger.kernel.org>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Thomas Weißschuh" <thomas.weissschuh@linutronix.de>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Randy Dunlap" <rdunlap@infradead.org>,
	"Tamir Duberstein" <tamird@gmail.com>,
	linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/2] docs: add support to build manpages from kerneldoc output
Date: Thu, 28 Aug 2025 23:07:44 +0200	[thread overview]
Message-ID: <20250828230744.1fa2f291@foz.lan> (raw)
In-Reply-To: <aK-A2DmxhGDQGVEf@levanger>

Em Thu, 28 Aug 2025 00:04:08 +0200
Nicolas Schier <nsc@kernel.org> escreveu:

> Please check your mail tooling: something strange happened to all
> @kernel.org adresses:
> 
> > Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
> >         Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
> >         Thomas Weißschuh <thomas.weissschuh@linutronix.de>,
> >         Alice Ryhl <aliceryhl@google.com>,
> >         Masahiro Yamada <mchehab+huawei@kernel.org>,
> >         Miguel Ojeda <mchehab+huawei@kernel.org>,
> >         Nathan Chancellor <mchehab+huawei@kernel.org>,
> >         Nicolas Schier <nicolas.schier@linux.dev>,
> >         Randy Dunlap <rdunlap@infradead.org>,
> >         Tamir Duberstein <tamird@gmail.com>,
> >         linux-kbuild@vger.kernel.org,
> >         linux-kernel@vger.kernel.org  

That's really weird! Thanks for letting me know. It was not supposed
to do any e-mail changes.

> 
> On Wed, Aug 27, 2025 at 10:26:37AM +0200, Mauro Carvalho Chehab wrote:
> > Generating man files currently requires running a separate
> > script. The target also doesn't appear at the docs Makefile.
> > 
> > Add support for mandocs at the Makefile, adding the build
> > logic inside sphinx-build-wrapper, updating documentation
> > and dropping the ancillary script.
> > 
> > Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> > ---
> >  Documentation/Makefile                 |  3 +-
> >  Documentation/doc-guide/kernel-doc.rst | 29 ++++-----
> >  Makefile                               |  2 +-
> >  scripts/split-man.pl                   | 28 ---------
> >  tools/docs/sphinx-build-wrapper        | 81 ++++++++++++++++++++++++--
> >  5 files changed, 95 insertions(+), 48 deletions(-)
> >  delete mode 100755 scripts/split-man.pl
> > 
> > diff --git a/Documentation/Makefile b/Documentation/Makefile
> > index 3e1cb44a5fbb..22e39e5ed07d 100644
> > --- a/Documentation/Makefile
> > +++ b/Documentation/Makefile
> > @@ -53,7 +53,7 @@ ifeq ($(HAVE_SPHINX),0)
> >  else # HAVE_SPHINX
> >  
> >  # Common documentation targets
> > -infodocs texinfodocs latexdocs epubdocs xmldocs pdfdocs linkcheckdocs:
> > +mandocs infodocs texinfodocs latexdocs epubdocs xmldocs pdfdocs linkcheckdocs:
> >  	$(Q)@$(srctree)/tools/docs/sphinx-pre-install --version-check
> >  	+$(Q)$(PYTHON3) $(BUILD_WRAPPER) $@ \
> >  		--sphinxdirs="$(SPHINXDIRS)" --conf=$(SPHINX_CONF) \
> > @@ -104,6 +104,7 @@ dochelp:
> >  	@echo  '  htmldocs        - HTML'
> >  	@echo  '  texinfodocs     - Texinfo'
> >  	@echo  '  infodocs        - Info'
> > +	@echo  '  mandocs         - Man pages'
> >  	@echo  '  latexdocs       - LaTeX'
> >  	@echo  '  pdfdocs         - PDF'
> >  	@echo  '  epubdocs        - EPUB'
> > diff --git a/Documentation/doc-guide/kernel-doc.rst b/Documentation/doc-guide/kernel-doc.rst
> > index af9697e60165..4370cc8fbcf5 100644
> > --- a/Documentation/doc-guide/kernel-doc.rst
> > +++ b/Documentation/doc-guide/kernel-doc.rst
> > @@ -579,20 +579,23 @@ source.
> >  How to use kernel-doc to generate man pages
> >  -------------------------------------------
> >  
> > -If you just want to use kernel-doc to generate man pages you can do this
> > -from the kernel git tree::
> > +To generate man pages for all files that contain kernel-doc markups, run::
> >  
> > -  $ scripts/kernel-doc -man \
> > -    $(git grep -l '/\*\*' -- :^Documentation :^tools) \
> > -    | scripts/split-man.pl /tmp/man
> > +  $ make mandocs
> >  
> > -Some older versions of git do not support some of the variants of syntax for
> > -path exclusion.  One of the following commands may work for those versions::
> > +Or calling ``script-build-wrapper`` directly::  
> 
>                 ^^^^^^ sphinx-build-wrapper ?

This is on a separate patch series:

https://lore.kernel.org/linux-doc/cover.1756138805.git.mchehab+huawei@kernel.org/

It basically moves the complex logic around docs Makefile into a
script that can either be called via Makefile or directly.

Thanks,
Mauro

  reply	other threads:[~2025-08-28 21:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-27  8:26 [PATCH v3 0/2] add a make target to generate man pages from kernel-doc Mauro Carvalho Chehab
2025-08-27  8:26 ` [PATCH v3 1/2] docs: add support to build manpages from kerneldoc output Mauro Carvalho Chehab
2025-08-27 22:04   ` Nicolas Schier
2025-08-28 21:07     ` Mauro Carvalho Chehab [this message]
2025-08-27  8:26 ` [PATCH v3 2/2] tools: kernel-doc: add a see also section at man pages Mauro Carvalho Chehab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250828230744.1fa2f291@foz.lan \
    --to=mchehab+huawei@kernel.org \
    --cc=aliceryhl@google.com \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nsc@kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=tamird@gmail.com \
    --cc=thomas.weissschuh@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®