Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

docs-rst: media/Makefile: reorganize the rules

Better organize the media/Makefile, in order to better
split what's related to image conversion from the ones
related to parse-headers.pl.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>

authored by

Mauro Carvalho Chehab and committed by
Jonathan Corbet
bf5bfe85 ec868e4e

+24 -21
+24 -21
Documentation/media/Makefile
··· 1 - # Generate the *.h.rst files from uAPI headers 1 + # Rules to convert DOT and SVG to Sphinx images 2 2 3 - PARSER = $(srctree)/Documentation/sphinx/parse-headers.pl 4 - UAPI = $(srctree)/include/uapi/linux 5 - KAPI = $(srctree)/include/linux 6 3 SRC_DIR=$(srctree)/Documentation/media 7 - 8 - FILES = audio.h.rst ca.h.rst dmx.h.rst frontend.h.rst net.h.rst video.h.rst \ 9 - videodev2.h.rst media.h.rst cec.h.rst lirc.h.rst 10 - 11 - TARGETS := $(addprefix $(BUILDDIR)/, $(FILES)) 12 4 13 5 DOTS = \ 14 6 uapi/v4l/pipeline.dot \ ··· 44 52 %.svg: %.dot 45 53 @$(call cmd,gendot,$<,$@) 46 54 47 - .PHONY: all html epub xml latex 55 + # Rules to convert a .h file to inline RST documentation 48 56 49 - all: $(IMGDOT) $(BUILDDIR) ${TARGETS} 50 - html: all 51 - epub: all 52 - xml: all 53 - latex: $(IMGPDF) all 57 + PARSER = $(srctree)/Documentation/sphinx/parse-headers.pl 58 + UAPI = $(srctree)/include/uapi/linux 59 + KAPI = $(srctree)/include/linux 54 60 55 - clean: 56 - -rm -f $(DOTTGT) $(IMGTGT) $(patsubst %,$(SRC_DIR)/%,${TARGETS}) 2>/dev/null 61 + FILES = audio.h.rst ca.h.rst dmx.h.rst frontend.h.rst net.h.rst video.h.rst \ 62 + videodev2.h.rst media.h.rst cec.h.rst lirc.h.rst 57 63 58 - $(BUILDDIR): 59 - $(Q)mkdir -p $@ 60 - 61 - # Rule to convert a .h file to inline RST documentation 64 + TARGETS := $(addprefix $(BUILDDIR)/, $(FILES)) 62 65 63 66 gen_rst = \ 64 67 echo ${PARSER} $< $@ $(SRC_DIR)/$(notdir $@).exceptions; \ ··· 93 106 94 107 $(BUILDDIR)/lirc.h.rst: ${UAPI}/lirc.h ${PARSER} $(SRC_DIR)/lirc.h.rst.exceptions 95 108 @$($(quiet)gen_rst) 109 + 110 + # Media build rules 111 + 112 + .PHONY: all html epub xml latex 113 + 114 + all: $(IMGDOT) $(BUILDDIR) ${TARGETS} 115 + html: all 116 + epub: all 117 + xml: all 118 + latex: $(IMGPDF) all 119 + 120 + clean: 121 + -rm -f $(DOTTGT) $(IMGTGT) $(patsubst %,$(SRC_DIR)/%,${TARGETS}) 2>/dev/null 122 + 123 + $(BUILDDIR): 124 + $(Q)mkdir -p $@