diff options
author | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-11-30 08:00:17 -0200 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2016-11-30 17:07:54 -0700 |
commit | ec868e4ee2bcebb9e4c03979d90e0ac0b79fe05a (patch) | |
tree | b70a2433a8380e780a9b856b356a6845ee5edfd6 /Documentation/media/Makefile | |
parent | ffbdad94d07f89391563d59f1789deb6c9ab4876 (diff) | |
download | linux-ec868e4ee2bcebb9e4c03979d90e0ac0b79fe05a.tar.gz |
docs-rst: media: build SVG from graphviz files
Instead of keeping both SVG and graphviz files, dynamically
build SVG from its graphviz sources.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'Documentation/media/Makefile')
-rw-r--r-- | Documentation/media/Makefile | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/Documentation/media/Makefile b/Documentation/media/Makefile index 998e8dd49352..547b4105f826 100644 --- a/Documentation/media/Makefile +++ b/Documentation/media/Makefile @@ -10,6 +10,9 @@ FILES = audio.h.rst ca.h.rst dmx.h.rst frontend.h.rst net.h.rst video.h.rst \ TARGETS := $(addprefix $(BUILDDIR)/, $(FILES)) +DOTS = \ + uapi/v4l/pipeline.dot \ + IMAGES = \ typical_media_device.svg \ uapi/dvb/dvbstb.svg \ @@ -29,8 +32,10 @@ IMAGES = \ uapi/v4l/vbi_625.svg \ uapi/v4l/vbi_hsync.svg \ +DOTTGT := $(patsubst %.dot,%.svg,$(DOTS)) +IMGDOT := $(patsubst %,$(SRC_DIR)/%,$(DOTTGT)) -IMGTGT := $(patsubst %.png,%.pdf,$(patsubst %.svg,%.pdf,$(IMAGES))) +IMGTGT := $(patsubst %.svg,%.pdf,$(IMAGES)) IMGPDF := $(patsubst %,$(SRC_DIR)/%,$(IMGTGT)) cmd = $(echo-cmd) $(cmd_$(1)) @@ -38,19 +43,25 @@ 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 + %.pdf: %.svg @$(call cmd,genpdf,$<,$@) +%.svg: %.dot + @$(call cmd,gendot,$<,$@) + .PHONY: all html epub xml latex -all: $(BUILDDIR) ${TARGETS} +all: $(IMGDOT) $(BUILDDIR) ${TARGETS} html: all epub: all xml: all latex: $(IMGPDF) all clean: - -rm -f $(IMGTGT) 2>/dev/null + -rm -f $(DOTTGT) $(IMGTGT) $(patsubst %,$(SRC_DIR)/%,${TARGETS}) 2>/dev/null $(BUILDDIR): $(Q)mkdir -p $@ @@ -95,6 +106,3 @@ $(BUILDDIR)/cec.h.rst: ${KAPI}/cec.h ${PARSER} $(SRC_DIR)/cec.h.rst.exceptions $(BUILDDIR)/lirc.h.rst: ${UAPI}/lirc.h ${PARSER} $(SRC_DIR)/lirc.h.rst.exceptions @$($(quiet)gen_rst) - -cleandocs: - -rm -f ${TARGETS} |