Commit | Line | Data |
---|---|---|
1ae64395 MCC |
1 | # Generate the *.h.rst files from uAPI headers |
2 | ||
573720f0 MCC |
3 | PARSER = $(srctree)/Documentation/sphinx/parse-headers.pl |
4 | UAPI = $(srctree)/include/uapi/linux | |
60c2820d | 5 | SRC_DIR=$(srctree)/Documentation/media |
573720f0 MCC |
6 | |
7 | FILES = audio.h.rst ca.h.rst dmx.h.rst frontend.h.rst net.h.rst video.h.rst \ | |
9f97b306 | 8 | videodev2.h.rst |
1ae64395 | 9 | |
573720f0 MCC |
10 | TARGETS := $(addprefix $(BUILDDIR)/, $(FILES)) |
11 | ||
580e96c7 MH |
12 | htmldocs: $(BUILDDIR) ${TARGETS} |
13 | ||
14 | $(BUILDDIR): | |
15 | $(Q)mkdir -p $@ | |
1ae64395 | 16 | |
573720f0 MCC |
17 | # Rule to convert a .h file to inline RST documentation |
18 | ||
19 | gen_rst = \ | |
20 | echo ${PARSER} $< $@ $(SRC_DIR)/$(notdir $@).exceptions; \ | |
21 | ${PARSER} $< $@ $(SRC_DIR)/$(notdir $@).exceptions | |
22 | ||
23 | quiet_gen_rst = echo ' PARSE $(patsubst $(srctree)/%,%,$<)'; \ | |
24 | ${PARSER} $< $@ $(SRC_DIR)/$(notdir $@).exceptions | |
25 | ||
26 | silent_gen_rst = ${gen_rst} | |
27 | ||
28 | $(BUILDDIR)/audio.h.rst: ${UAPI}/dvb/audio.h ${PARSER} $(SRC_DIR)/audio.h.rst.exceptions | |
29 | @$($(quiet)gen_rst) | |
1ae64395 | 30 | |
573720f0 MCC |
31 | $(BUILDDIR)/ca.h.rst: ${UAPI}/dvb/ca.h ${PARSER} $(SRC_DIR)/ca.h.rst.exceptions |
32 | @$($(quiet)gen_rst) | |
34fb8030 | 33 | |
573720f0 MCC |
34 | $(BUILDDIR)/dmx.h.rst: ${UAPI}/dvb/dmx.h ${PARSER} $(SRC_DIR)/dmx.h.rst.exceptions |
35 | @$($(quiet)gen_rst) | |
ada66bc1 | 36 | |
573720f0 MCC |
37 | $(BUILDDIR)/frontend.h.rst: ${UAPI}/dvb/frontend.h ${PARSER} $(SRC_DIR)/frontend.h.rst.exceptions |
38 | @$($(quiet)gen_rst) | |
8a6199c6 | 39 | |
573720f0 MCC |
40 | $(BUILDDIR)/net.h.rst: ${UAPI}/dvb/net.h ${PARSER} $(SRC_DIR)/net.h.rst.exceptions |
41 | @$($(quiet)gen_rst) | |
0c02966b | 42 | |
573720f0 MCC |
43 | $(BUILDDIR)/video.h.rst: ${UAPI}/dvb/video.h ${PARSER} $(SRC_DIR)/video.h.rst.exceptions |
44 | @$($(quiet)gen_rst) | |
447654d6 | 45 | |
580e96c7 | 46 | $(BUILDDIR)/videodev2.h.rst: ${UAPI}/videodev2.h ${PARSER} $(SRC_DIR)/videodev2.h.rst.exceptions |
573720f0 | 47 | @$($(quiet)gen_rst) |
9f97b306 | 48 | |
0c02966b MCC |
49 | cleandocs: |
50 | -rm ${TARGETS} |