From: Randy Dunlap <rdunlap@infradead.org>
To: Mauro Carvalho Chehab <mchehab@s-opensource.com>,
Linux Media Mailing List <linux-media@vger.kernel.org>,
Jonathan Corbet <corbet@lwn.net>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>,
Linux Doc Mailing List <linux-doc@vger.kernel.org>,
linux-kernel@vger.kernel.org,
Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: Re: [PATCH 07/10] docs: kernel-doc.rst: add documentation about man pages
Date: Tue, 26 Sep 2017 19:07:24 -0700 [thread overview]
Message-ID: <b009cd2a-4ab4-930e-0a6a-411300df00a3@infradead.org> (raw)
In-Reply-To: <f5f708ba091ff23cad849779d66b1e3a7badb5c6.1506448061.git.mchehab@s-opensource.com>
On 09/26/17 10:59, Mauro Carvalho Chehab wrote:
> kernel-doc-nano-HOWTO.txt has a chapter about man pages
> production. While we don't have a working "make manpages"
> target, add it.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
> ---
> Documentation/doc-guide/kernel-doc.rst | 61 ++++++++++++++++++++++++++--------
> 1 file changed, 47 insertions(+), 14 deletions(-)
>
> diff --git a/Documentation/doc-guide/kernel-doc.rst b/Documentation/doc-guide/kernel-doc.rst
> index 9777aa53e3dd..50473f0db345 100644
> --- a/Documentation/doc-guide/kernel-doc.rst
> +++ b/Documentation/doc-guide/kernel-doc.rst
> @@ -377,7 +377,6 @@ cross-references.
> For further details, please refer to the `Sphinx C Domain`_ documentation.
>
>
> -
> In-line member documentation comments
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> @@ -391,19 +390,19 @@ on a line of their own, like all other kernel-doc comments::
> * @foo: The Foo member.
> */
> struct foo {
> - int foo;
> - /**
> - * @bar: The Bar member.
> - */
> - int bar;
> - /**
> - * @baz: The Baz member.
> - *
> - * Here, the member description may contain several paragraphs.
> - */
> - int baz;
> - /** @foobar: Single line description. */
> - int foobar;
> + int foo;
> + /**
> + * @bar: The Bar member.
> + */
> + int bar;
> + /**
> + * @baz: The Baz member.
> + *
> + * Here, the member description may contain several paragraphs.
> + */
> + int baz;
> + /** @foobar: Single line description. */
> + int foobar;
> }
The above doesn't belong in this patch. (??)
>
> @@ -452,3 +451,37 @@ file.
>
> Data structures visible in kernel include files should also be documented using
> kernel-doc formatted comments.
> +
> +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::
> +
> + $ scripts/kernel-doc -man $(git grep -l '/\*\*' |grep -v Documentation/) | ./split-man.pl /tmp/man
> +
> +Using the small ``split-man.pl`` script below::
> +
> +
> + #!/usr/bin/perl
> +
> + if ($#ARGV < 0) {
> + die "where do I put the results?\n";
> + }
> +
> + mkdir $ARGV[0],0777;
> + $state = 0;
> + while (<STDIN>) {
> + if (/^\.TH \"[^\"]*\" 9 \"([^\"]*)\"/) {
> + if ($state == 1) { close OUT }
> + $state = 1;
> + $fn = "$ARGV[0]/$1.9";
> + print STDERR "Creating $fn\n";
> + open OUT, ">$fn" or die "can't open $fn: $!\n";
> + print OUT $_;
> + } elsif ($state != 0) {
> + print OUT $_;
> + }
> + }
> +
> + close OUT;
>
--
~Randy
next prev parent reply other threads:[~2017-09-27 2:07 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-26 17:59 [PATCH 00/10] kernel-doc: add supported to document nested structs/unions Mauro Carvalho Chehab
2017-09-26 17:59 ` [PATCH 01/10] scripts: kernel-doc: get rid of unused output formats Mauro Carvalho Chehab
2017-09-27 14:36 ` Jani Nikula
2017-09-27 20:41 ` Mauro Carvalho Chehab
2017-09-26 17:59 ` [PATCH 02/10] docs: kernel-doc.rst: better describe kernel-doc arguments Mauro Carvalho Chehab
2017-09-27 2:04 ` Randy Dunlap
2017-09-26 17:59 ` [PATCH 03/10] docs: kernel-doc.rst: improve private members description Mauro Carvalho Chehab
2017-09-26 17:59 ` [PATCH 04/10] docs: kernel-doc.rst: improve function documentation section Mauro Carvalho Chehab
2017-09-26 17:59 ` [PATCH 05/10] docs: kernel-doc.rst: improve structs chapter Mauro Carvalho Chehab
2017-09-26 17:59 ` [PATCH 06/10] docs: kernel-doc: improve typedef documentation Mauro Carvalho Chehab
2017-09-26 17:59 ` [PATCH 07/10] docs: kernel-doc.rst: add documentation about man pages Mauro Carvalho Chehab
2017-09-27 2:07 ` Randy Dunlap [this message]
2017-09-26 17:59 ` [PATCH 08/10] docs: get rid of kernel-doc-nano-HOWTO.txt Mauro Carvalho Chehab
2017-09-26 17:59 ` [PATCH 09/10] scripts: kernel-doc: parse next structs/unions Mauro Carvalho Chehab
2017-09-26 20:29 ` Mauro Carvalho Chehab
2017-09-26 20:41 ` Jonathan Corbet
2017-09-26 17:59 ` [PATCH 10/10] [RFC] w1_netlink.h: add support for nested structs Mauro Carvalho Chehab
2017-10-01 5:57 ` Evgeniy Polyakov
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=b009cd2a-4ab4-930e-0a6a-411300df00a3@infradead.org \
--to=rdunlap@infradead.org \
--cc=corbet@lwn.net \
--cc=daniel.vetter@ffwll.ch \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=mchehab@s-opensource.com \
/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®