From: Mauro Carvalho Chehab <mchehab@infradead.org>
To: Markus Heiser <markus.heiser@darmarit.de>
Cc: Jonathan Corbet <corbet@lwn.net>,
Jani Nikula <jani.nikula@intel.com>,
Linux Media Mailing List <linux-media@vger.kernel.org>,
linux-doc@vger.kernel.org
Subject: Re: [PATCH 0/7] doc-rst: sphinx sub-folders & parseheaders directive
Date: Tue, 16 Aug 2016 15:22:43 -0300 [thread overview]
Message-ID: <20160816152243.17927afe@vento.lan> (raw)
In-Reply-To: <DCB8AFBC-2E5E-4CD0-97A0-9325686CE17F@darmarit.de>
Em Mon, 15 Aug 2016 10:21:07 +0200
Markus Heiser <markus.heiser@darmarit.de> escreveu:
> Am 14.08.2016 um 20:09 schrieb Jonathan Corbet <corbet@lwn.net>:
>
> > On Sat, 13 Aug 2016 16:12:41 +0200
> > Markus Heiser <markus.heiser@darmarit.de> wrote:
> >
> >> this series is a consolidation on Jon's docs-next branch. It merges the "sphinx
> >> sub-folders" patch [1] and the "parseheaders directive" patch [2] on top of
> >> Jon's docs-next.
> >>
> >> In sense of consolidation, it also includes:
> >>
> >> * doc-rst: add media/conf_nitpick.py
> >>
> >> Adds media/conf_nitpick.py from mchehab/docs-next [3].
> >>
> >> * doc-rst: migrated media build to parseheaders directive
> >
> > OK, I have applied the first five of these,
>
> Thanks!
>
> > but stopped at parse-header.
> > At this point, I have a few requests. These are in approximate order of
> > decreasing importance, but they're all important, I think.
After writing the PDF support, I'm starting to think that maybe we
should migrate the entire functionality to the Sphinx extension.
The rationale is that we won't need to be concerned about output
specific escape codes there.
> >
> > - The new directive could really use some ... documentation. Preferably in
> > kernel-documentation.rst with the rest. What is parse-header, how does
> > it differ from kernel-doc, why might a kernel developer doing
> > documentation want (or not want) to use it? That's all pretty obscure
> > now. If we want others to jump onto this little bandwagon of ours, we
> > need to make sure it's all really clear.
>
> This could be answered by Mauro.
We use it to allow including an entire header file as-is at the
documentation, and cross-reference it with the documents.
IMO, this is very useful to document the ioctl UAPI. There, the most
important things to be documented are the ioctl themselves. We don't
have any way to document via kernel-doc (as they're #define macros).
Also, when documenting an ioctl, we want to document the structures
that are used (most media ioctls use a struct instead of a single value).
So, what we do is that we write a proper description for the ioctl and
everything related to it outside the source code. As we want to be
sure that everything in the header is documented, we use the
"parse-header.pl" (ok, this name really sucks) to create cross-references
between the header and the documentation itself.
So, it is actually a script that replaces all occurrences of typedefs,
defines, structs, functions, enums into references to the uAPI
documentation.
This is is somewhat equivalent to:
.. code-block:: c
Or, even better, it resembles the Doxygen's \example directive:
https://www.stack.nl/~dimitri/doxygen/manual/commands.html#cmdexample
With produces a parsed file, like this one:
https://linuxtv.org/docs/libdvbv5/dvb-fe-tool_8c-example.html
Except that:
1) It doesn't randomly painting the file;
2) All places where the a typedef, define, struct, struct member,
function or enum exists are replaced by a cross-reference to the
documentation (except if explicitly defined to not do that, via a
configuration file).
That, plus the nitpick mode at Sphinx, allows us to check what
parts of the uAPI file aren't documented.
> > - Along those lines, is parse-header the right name for this thing?
> > "Parsing" isn't necessarily the goal of somebody who uses this directive,
> > right? They want to extract documentation information. Can we come up
> > with a better name?
>
> Mauro, what is your suggestion and how would we go on in this topic?
Maybe we could call it as: "include-c-code-block" or something similar.
Regards,
Mauro
next prev parent reply other threads:[~2016-08-16 18:22 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-13 14:12 [PATCH 0/7] doc-rst: sphinx sub-folders & parseheaders directive Markus Heiser
2016-08-13 14:12 ` [PATCH 1/7] doc-rst: generic way to build only sphinx sub-folders Markus Heiser
2016-08-18 22:35 ` Jonathan Corbet
2016-08-19 11:37 ` Markus Heiser
2016-08-19 12:49 ` Jani Nikula
2016-08-19 15:52 ` Markus Heiser
2016-08-19 20:40 ` Mauro Carvalho Chehab
2016-08-19 20:43 ` Mauro Carvalho Chehab
2016-08-20 12:51 ` Mauro Carvalho Chehab
2016-08-21 12:02 ` Mauro Carvalho Chehab
2016-08-19 13:32 ` Mauro Carvalho Chehab
2016-08-13 14:12 ` [PATCH 2/7] doc-rst: add stand-alone conf.py to media folder Markus Heiser
2016-08-13 14:12 ` [PATCH 3/7] doc-rst: add media/conf_nitpick.py Markus Heiser
2016-08-13 14:12 ` [PATCH 4/7] doc-rst: add stand-alone conf.py to gpu folder Markus Heiser
2016-08-13 14:12 ` [PATCH 5/7] doc-rst: add docutils config file Markus Heiser
2016-08-13 14:12 ` [PATCH 6/7] doc-rst: parseheaders directive (inital) Markus Heiser
2016-08-13 14:12 ` [PATCH 7/7] doc-rst: migrated media build to parseheaders directive Markus Heiser
2016-08-14 18:09 ` [PATCH 0/7] doc-rst: sphinx sub-folders & " Jonathan Corbet
2016-08-15 8:21 ` Markus Heiser
2016-08-15 21:39 ` Jonathan Corbet
2016-08-16 18:22 ` Mauro Carvalho Chehab [this message]
2016-08-17 5:44 ` Markus Heiser
2016-08-17 6:26 ` Markus Heiser
2016-08-17 11:02 ` Daniel Vetter
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=20160816152243.17927afe@vento.lan \
--to=mchehab@infradead.org \
--cc=corbet@lwn.net \
--cc=jani.nikula@intel.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=markus.heiser@darmarit.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