Skip to contentSkip to conversation

Second series of ReST convert patches for media

PATCH In review Mauro Carvalho Chehab 2 participants 56 messages Jul 8, 2016 Page 2 of 2

Subsystems (3)
lore
Share & tools
lore
#54 lore raw

PATCH 54/54 doc-rst: linux_tv/Makefile: Honor quiet make O=dir

In reply to Mauro Carvalho Chehab

From: 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
index 6a093e4397b4..5aa2161fc3df 100644
@@ -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
index f35748b4bc26..224240b5bc50 100644
@@ -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
index d87be5e2b022..0ea0b41b20ae 100644
@@ -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
index 407f840ae2ee..f513592ef529 100644
@@ -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
index 65ee8f095972..4fd1704a0833 100644
@@ -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
index 97735b241f3c..15fca04d1c32 100644
@@ -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
index 5a5a797882f2..7bcf5ba9d1eb 100644
@@ -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
index 9d649a7e0f8b..3f39b0c4879c 100644
@@ -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
index 82bac4a0b760..b9ee4672d639 100644
@@ -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
#55 lore raw
In reply to Mauro Carvalho Chehab
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