Second series of ReST convert patches for media
Subsystems (3)
PATCH 54/54 doc-rst: linux_tv/Makefile: Honor quiet make O=dir
In reply to Mauro Carvalho ChehabFrom: Markus Heiser <[email protected]>
To honor the:
make O=dir [targets] Locate all output files in "dir"
* activate kernel-include directive
* export BUILDDIR=$(BUILDDIR)
* linux_tv: replace '.. include::' with '.. kernel-include:: $BUILDDIR/<foo.h.rst>'
--- Documentation/Makefile.sphinx | 4 ++-- Documentation/conf.py | 2 +- Documentation/linux_tv/media/dvb/audio_h.rst | 4 +++- Documentation/linux_tv/media/dvb/ca_h.rst | 2 +- Documentation/linux_tv/media/dvb/dmx_h.rst | 2 +- Documentation/linux_tv/media/dvb/frontend_h.rst | 2 +- Documentation/linux_tv/media/dvb/net_h.rst | 2 +- Documentation/linux_tv/media/dvb/video_h.rst | 2 +- Documentation/linux_tv/media/v4l/videodev.rst | 2 +- 9 files changed, 12 insertions(+), 10 deletions(-)
Documentation/Makefile.sphinx +2 -2
@@ -32,10 +32,10 @@ ALLSPHINXOPTS = -D version=$(KERNELVERSION) -D release=$(KERNELRELEASE) -d $(B I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . quiet_cmd_sphinx = SPHINX $@ - cmd_sphinx = $(SPHINXBUILD) -b $2 $(ALLSPHINXOPTS) $(BUILDDIR)/$2 + cmd_sphinx = BUILDDIR=$(BUILDDIR) $(SPHINXBUILD) -b $2 $(ALLSPHINXOPTS) $(BUILDDIR)/$2 htmldocs: - $(MAKE) BUILDDIR=$(objtree)/$(BUILDDIR) -f $(srctree)/Documentation/linux_tv/Makefile $@ + $(MAKE) BUILDDIR=$(BUILDDIR) -f $(srctree)/Documentation/linux_tv/Makefile $@ $(call cmd,sphinx,html) pdfdocs:
Documentation/conf.py +1 -1
@@ -28,7 +28,7 @@ sys.path.insert(0, os.path.abspath('sphinx')) # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = ['kernel-doc', 'rstFlatTable'] +extensions = ['kernel-doc', 'rstFlatTable', 'kernel_include'] # Gracefully handle missing rst2pdf. try:
Documentation/linux_tv/media/dvb/audio_h.rst +3 -1
@@ -6,4 +6,6 @@ DVB Audio Header File ********************* -.. include:: ../../../output/audio.h.rst +.. kernel-include:: $BUILDDIR/audio.h.rst + +.. kernel-include:: $BUILDDIR/../../../../etc/adduser.conf
Documentation/linux_tv/media/dvb/ca_h.rst +1 -1
@@ -6,4 +6,4 @@ DVB Conditional Access Header File ********************************** -.. include:: ../../../output/ca.h.rst +.. kernel-include:: $BUILDDIR/ca.h.rst
Documentation/linux_tv/media/dvb/dmx_h.rst +1 -1
@@ -6,4 +6,4 @@ DVB Demux Header File ********************* -.. include:: ../../../output/dmx.h.rst +.. kernel-include:: $BUILDDIR/dmx.h.rst
Documentation/linux_tv/media/dvb/frontend_h.rst +1 -1
@@ -6,4 +6,4 @@ DVB Frontend Header File ************************ -.. include:: ../../../output/frontend.h.rst +.. kernel-include:: $BUILDDIR/frontend.h.rst
Documentation/linux_tv/media/dvb/net_h.rst +1 -1
@@ -6,4 +6,4 @@ DVB Network Header File *********************** -.. include:: ../../../output/net.h.rst +.. kernel-include:: $BUILDDIR/net.h.rst
Documentation/linux_tv/media/dvb/video_h.rst +1 -1
@@ -6,4 +6,4 @@ DVB Video Header File ********************* -.. include:: ../../../output/video.h.rst +.. kernel-include:: $BUILDDIR/video.h.rst
Documentation/linux_tv/media/v4l/videodev.rst +1 -1
@@ -6,4 +6,4 @@ Video For Linux Two Header File ******************************* -.. include:: ../../../output/videodev2.h.rst +.. kernel-include:: $BUILDDIR/videodev2.h.rst
Signature · 1 line
2.7.4
Quoted 36 lines · Mauro Carvalho Chehab
That's the second series of patches related to DocBook to ReST conversion. With this patch series, we're ready to merge it upstream.
There are still one thing to do: there are some new updates at the DocBook pages on two topic branches (cec and vsp1). Those changes should also be converted, in order to be able to remove the DocBook pages.
Visually, I'm more happy with the new pages, as the produced layout is more fancy, IMHO, using a modern visual.
Also, editing ReST pages is a way simpler than editing the DocBooks. Also, reviewing documentation patches should be simpler, with is a good thing.
On the bad side, Sphinx doesn't support auto-numberating examples, figures or tables. We'll need some extension for that. For now, the only impact is on the examples, that were manually numerated. So, patches adding new examples will need to check and manually renumerate other examples.
I hope we'll have soon some Sphinx extension to support auto-numbering.
I'll soon change linux.org documentation page to show the Sphinx-generated documenation. I intend to keep the old one for a while, for people to be able to compare both. I'll post an email once I do this at both linux-media and linux-doc mailing lists.
I did a review on all pages, but, as I'm not a Vulcan, I'm pretty sure I missed some things. So, feel free to review the final document and send me patches with any needed fixes or improvements.
Quoted 8 lines
Finally, you'll see some warnings produced by generating the documentation.
There are actually two types of warnings there:
1) At least here where I sit, I'm getting those warnings:
Documentation/linux_tv/media/dvb/fe-diseqc-send-burst.rst:18: WARNING: Error when parsing function declaration:
Can we please put this in Documentation/media instead of linux_tv? That's a really bad name, and not logical at all since the drivers are all in drivers/media.
Someone looking for the drivers/media documentation won't be able to find it. I know I had to look in the actual patches to discover that it ended up in linux_tv!
Regards,
Hans