]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blame - Documentation/media/Makefile
docs: Avoid warning on cleandocs
[mirror_ubuntu-artful-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 \
17 uapi/v4l/subdev-image-processing-full.svg \
18 uapi/v4l/subdev-image-processing-scaling-multi-source.svg \
19 uapi/v4l/subdev-image-processing-crop.svg \
20
21IMGTGT := $(patsubst %.png,%.pdf,$(patsubst %.svg,%.pdf,$(IMAGES)))
22IMGPDF := $(patsubst %,$(SRC_DIR)/%,$(IMGTGT))
23
24cmd = $(echo-cmd) $(cmd_$(1))
25
26quiet_cmd_genpdf = GENPDF $2
27 cmd_genpdf = convert $2 $3
28
29%.pdf: %.svg
30 @$(call cmd,genpdf,$<,$@)
31
32.PHONY: all html epub xml latex
33
609afe6b 34all: $(BUILDDIR) ${TARGETS}
15a04d4e
MCC
35html: all
36epub: all
37xml: all
38latex: $(IMGPDF) all
39
40clean:
c54b6b37 41 -rm -f $(IMGTGT) 2>/dev/null
580e96c7
MH
42
43$(BUILDDIR):
44 $(Q)mkdir -p $@
1ae64395 45
573720f0
MCC
46# Rule to convert a .h file to inline RST documentation
47
48gen_rst = \
49 echo ${PARSER} $< $@ $(SRC_DIR)/$(notdir $@).exceptions; \
50 ${PARSER} $< $@ $(SRC_DIR)/$(notdir $@).exceptions
51
52quiet_gen_rst = echo ' PARSE $(patsubst $(srctree)/%,%,$<)'; \
53 ${PARSER} $< $@ $(SRC_DIR)/$(notdir $@).exceptions
54
55silent_gen_rst = ${gen_rst}
56
57$(BUILDDIR)/audio.h.rst: ${UAPI}/dvb/audio.h ${PARSER} $(SRC_DIR)/audio.h.rst.exceptions
58 @$($(quiet)gen_rst)
1ae64395 59
573720f0
MCC
60$(BUILDDIR)/ca.h.rst: ${UAPI}/dvb/ca.h ${PARSER} $(SRC_DIR)/ca.h.rst.exceptions
61 @$($(quiet)gen_rst)
34fb8030 62
573720f0
MCC
63$(BUILDDIR)/dmx.h.rst: ${UAPI}/dvb/dmx.h ${PARSER} $(SRC_DIR)/dmx.h.rst.exceptions
64 @$($(quiet)gen_rst)
ada66bc1 65
573720f0
MCC
66$(BUILDDIR)/frontend.h.rst: ${UAPI}/dvb/frontend.h ${PARSER} $(SRC_DIR)/frontend.h.rst.exceptions
67 @$($(quiet)gen_rst)
8a6199c6 68
573720f0
MCC
69$(BUILDDIR)/net.h.rst: ${UAPI}/dvb/net.h ${PARSER} $(SRC_DIR)/net.h.rst.exceptions
70 @$($(quiet)gen_rst)
0c02966b 71
573720f0
MCC
72$(BUILDDIR)/video.h.rst: ${UAPI}/dvb/video.h ${PARSER} $(SRC_DIR)/video.h.rst.exceptions
73 @$($(quiet)gen_rst)
447654d6 74
580e96c7 75$(BUILDDIR)/videodev2.h.rst: ${UAPI}/videodev2.h ${PARSER} $(SRC_DIR)/videodev2.h.rst.exceptions
573720f0 76 @$($(quiet)gen_rst)
9f97b306 77
d2c68150
MCC
78$(BUILDDIR)/media.h.rst: ${UAPI}/media.h ${PARSER} $(SRC_DIR)/media.h.rst.exceptions
79 @$($(quiet)gen_rst)
80
96f69e0e
MCC
81$(BUILDDIR)/cec.h.rst: ${KAPI}/cec.h ${PARSER} $(SRC_DIR)/cec.h.rst.exceptions
82 @$($(quiet)gen_rst)
83
68cd5e0b
MCC
84$(BUILDDIR)/lirc.h.rst: ${UAPI}/lirc.h ${PARSER} $(SRC_DIR)/lirc.h.rst.exceptions
85 @$($(quiet)gen_rst)
86
0c02966b 87cleandocs:
c54b6b37 88 -rm -f ${TARGETS}