Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8fa1bb50 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab Committed by Jonathan Corbet
Browse files

docs-rst: Don't use explicit Makefile rules to build SVG and DOT files



Now that we have an extension to handle images, use it.

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
parent db6ccf23
Loading
Loading
Loading
Loading
+1 −46
Original line number Diff line number Diff line
# Rules to convert DOT and SVG to Sphinx images

SRC_DIR=$(srctree)/Documentation/media

DOTS = \
	uapi/v4l/pipeline.dot \

IMAGES = \
	typical_media_device.svg \
	uapi/dvb/dvbstb.svg \
	uapi/v4l/bayer.svg \
	uapi/v4l/constraints.svg \
	uapi/v4l/crop.svg \
	uapi/v4l/fieldseq_bt.svg \
	uapi/v4l/fieldseq_tb.svg \
	uapi/v4l/nv12mt.svg \
	uapi/v4l/nv12mt_example.svg \
	uapi/v4l/pipeline.svg \
	uapi/v4l/selection.svg \
	uapi/v4l/subdev-image-processing-full.svg \
	uapi/v4l/subdev-image-processing-scaling-multi-source.svg \
	uapi/v4l/subdev-image-processing-crop.svg \
	uapi/v4l/vbi_525.svg \
	uapi/v4l/vbi_625.svg \
	uapi/v4l/vbi_hsync.svg \

DOTTGT := $(patsubst %.dot,%.svg,$(DOTS))
IMGDOT := $(patsubst %,$(SRC_DIR)/%,$(DOTTGT))

IMGTGT := $(patsubst %.svg,%.pdf,$(IMAGES))
IMGPDF := $(patsubst %,$(SRC_DIR)/%,$(IMGTGT))

cmd = $(echo-cmd) $(cmd_$(1))

quiet_cmd_genpdf = GENPDF  $2
      cmd_genpdf = convert $2 $3

quiet_cmd_gendot = DOT     $2
      cmd_gendot = dot -Tsvg $2 > $3 || { rm -f $3; exit 1; }

%.pdf: %.svg
	@$(call cmd,genpdf,$<,$@)

%.svg: %.dot
	@$(call cmd,gendot,$<,$@)

# Rules to convert a .h file to inline RST documentation

SRC_DIR=$(srctree)/Documentation/media
PARSER = $(srctree)/Documentation/sphinx/parse-headers.pl
UAPI = $(srctree)/include/uapi/linux
KAPI = $(srctree)/include/linux
+3 −3
Original line number Diff line number Diff line
@@ -13,8 +13,8 @@ A typical media device hardware is shown at :ref:`typical_media_device`.

.. _typical_media_device:

.. figure::  typical_media_device.*
    :alt:    typical_media_device.pdf / typical_media_device.svg
.. kernel-figure:: typical_media_device.svg
    :alt:   typical_media_device.svg
    :align: center

    Typical Media Device
+3 −3
Original line number Diff line number Diff line
@@ -55,8 +55,8 @@ Overview

.. _stb_components:

.. figure::  dvbstb.*
    :alt:    dvbstb.pdf / dvbstb.svg
.. kernel-figure:: dvbstb.svg
    :alt:   dvbstb.svg
    :align: center

    Components of a DVB card/STB
+2 −2
Original line number Diff line number Diff line
@@ -53,8 +53,8 @@ Cropping Structures

.. _crop-scale:

.. figure::  crop.*
    :alt:    crop.pdf / crop.svg
.. kernel-figure:: crop.svg
    :alt:    crop.svg
    :align:  center

    Image Cropping, Insertion and Scaling
+9 −13
Original line number Diff line number Diff line
@@ -221,8 +221,8 @@ and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does

.. _vbi-hsync:

.. figure::  vbi_hsync.*
    :alt:    vbi_hsync.pdf / vbi_hsync.svg
.. kernel-figure:: vbi_hsync.svg
    :alt:   vbi_hsync.svg
    :align: center

    **Figure 4.1. Line synchronization**
@@ -230,24 +230,20 @@ and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does

.. _vbi-525:

.. figure::  vbi_525.*
    :alt:    vbi_525.pdf / vbi_525.svg
.. kernel-figure:: vbi_525.svg
    :alt:   vbi_525.svg
    :align: center

    **Figure 4.2. ITU-R 525 line numbering (M/NTSC and M/PAL)**



.. _vbi-625:

.. figure::  vbi_625.*
    :alt:    vbi_625.pdf / vbi_625.svg
.. kernel-figure:: vbi_625.svg
    :alt:   vbi_625.svg
    :align: center

    **Figure 4.3. ITU-R 625 line numbering**



Remember the VBI image format depends on the selected video standard,
therefore the application must choose a new standard or query the
current standard first. Attempts to read or write data ahead of format
Loading