]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blame - Documentation/media/Makefile
docs-rst: convert pipeline to SVG format
[mirror_ubuntu-zesty-kernel.git] / Documentation / media / Makefile
CommitLineData
1ae64395
MCC
1# Generate the *.h.rst files from uAPI headers
2
573720f0
MCC
3PARSER = $(srctree)/Documentation/sphinx/parse-headers.pl
4UAPI = $(srctree)/include/uapi/linux
96f69e0e 5KAPI = $(srctree)/include/linux
60c2820d 6SRC_DIR=$(srctree)/Documentation/media
573720f0
MCC
7
8FILES = audio.h.rst ca.h.rst dmx.h.rst frontend.h.rst net.h.rst video.h.rst \
68cd5e0b 9 videodev2.h.rst media.h.rst cec.h.rst lirc.h.rst
1ae64395 10
573720f0
MCC
11TARGETS := $(addprefix $(BUILDDIR)/, $(FILES))
12
15a04d4e
MCC
13IMAGES = \
14 typical_media_device.svg \
15 uapi/dvb/dvbstb.svg \
16 uapi/v4l/constraints.svg \
76cf11aa
MCC
17 uapi/v4l/crop.svg \
18 uapi/v4l/fieldseq_bt.svg \
19 uapi/v4l/fieldseq_tb.svg \
2bd658de
MCC
20 uapi/v4l/nv12mt.svg \
21 uapi/v4l/nv12mt_example.svg \
394709da 22 uapi/v4l/pipeline.svg \
15a04d4e
MCC
23 uapi/v4l/subdev-image-processing-full.svg \
24 uapi/v4l/subdev-image-processing-scaling-multi-source.svg \
25 uapi/v4l/subdev-image-processing-crop.svg \
76cf11aa
MCC
26 uapi/v4l/vbi_525.svg \
27 uapi/v4l/vbi_625.svg \
28 uapi/v4l/vbi_hsync.svg \
29
15a04d4e
MCC
30
31IMGTGT := $(patsubst %.png,%.pdf,$(patsubst %.svg,%.pdf,$(IMAGES)))
32IMGPDF := $(patsubst %,$(SRC_DIR)/%,$(IMGTGT))
33
34cmd = $(echo-cmd) $(cmd_$(1))
35
36quiet_cmd_genpdf = GENPDF $2
37 cmd_genpdf = convert $2 $3
38
39%.pdf: %.svg
40 @$(call cmd,genpdf,$<,$@)
41
42.PHONY: all html epub xml latex
43
609afe6b 44all: $(BUILDDIR) ${TARGETS}
15a04d4e
MCC
45html: all
46epub: all
47xml: all
48latex: $(IMGPDF) all
49
50clean:
c54b6b37 51 -rm -f $(IMGTGT) 2>/dev/null
580e96c7
MH
52
53$(BUILDDIR):
54 $(Q)mkdir -p $@
1ae64395 55
573720f0
MCC
56# Rule to convert a .h file to inline RST documentation
57
58gen_rst = \
59 echo ${PARSER} $< $@ $(SRC_DIR)/$(notdir $@).exceptions; \
60 ${PARSER} $< $@ $(SRC_DIR)/$(notdir $@).exceptions
61
62quiet_gen_rst = echo ' PARSE $(patsubst $(srctree)/%,%,$<)'; \
63 ${PARSER} $< $@ $(SRC_DIR)/$(notdir $@).exceptions
64
65silent_gen_rst = ${gen_rst}
66
67$(BUILDDIR)/audio.h.rst: ${UAPI}/dvb/audio.h ${PARSER} $(SRC_DIR)/audio.h.rst.exceptions
68 @$($(quiet)gen_rst)
1ae64395 69
573720f0
MCC
70$(BUILDDIR)/ca.h.rst: ${UAPI}/dvb/ca.h ${PARSER} $(SRC_DIR)/ca.h.rst.exceptions
71 @$($(quiet)gen_rst)
34fb8030 72
573720f0
MCC
73$(BUILDDIR)/dmx.h.rst: ${UAPI}/dvb/dmx.h ${PARSER} $(SRC_DIR)/dmx.h.rst.exceptions
74 @$($(quiet)gen_rst)
ada66bc1 75
573720f0
MCC
76$(BUILDDIR)/frontend.h.rst: ${UAPI}/dvb/frontend.h ${PARSER} $(SRC_DIR)/frontend.h.rst.exceptions
77 @$($(quiet)gen_rst)
8a6199c6 78
573720f0
MCC
79$(BUILDDIR)/net.h.rst: ${UAPI}/dvb/net.h ${PARSER} $(SRC_DIR)/net.h.rst.exceptions
80 @$($(quiet)gen_rst)
0c02966b 81
573720f0
MCC
82$(BUILDDIR)/video.h.rst: ${UAPI}/dvb/video.h ${PARSER} $(SRC_DIR)/video.h.rst.exceptions
83 @$($(quiet)gen_rst)
447654d6 84
580e96c7 85$(BUILDDIR)/videodev2.h.rst: ${UAPI}/videodev2.h ${PARSER} $(SRC_DIR)/videodev2.h.rst.exceptions
573720f0 86 @$($(quiet)gen_rst)
9f97b306 87
d2c68150
MCC
88$(BUILDDIR)/media.h.rst: ${UAPI}/media.h ${PARSER} $(SRC_DIR)/media.h.rst.exceptions
89 @$($(quiet)gen_rst)
90
96f69e0e
MCC
91$(BUILDDIR)/cec.h.rst: ${KAPI}/cec.h ${PARSER} $(SRC_DIR)/cec.h.rst.exceptions
92 @$($(quiet)gen_rst)
93
68cd5e0b
MCC
94$(BUILDDIR)/lirc.h.rst: ${UAPI}/lirc.h ${PARSER} $(SRC_DIR)/lirc.h.rst.exceptions
95 @$($(quiet)gen_rst)
96
0c02966b 97cleandocs:
c54b6b37 98 -rm -f ${TARGETS}