From ec868e4ee2bcebb9e4c03979d90e0ac0b79fe05a Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 30 Nov 2016 08:00:17 -0200 Subject: 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 Signed-off-by: Jonathan Corbet --- Documentation/media/.gitignore | 2 + Documentation/media/Makefile | 20 ++++++--- Documentation/media/uapi/v4l/pipeline.svg | 68 ------------------------------- 3 files changed, 16 insertions(+), 74 deletions(-) delete mode 100644 Documentation/media/uapi/v4l/pipeline.svg (limited to 'Documentation/media') diff --git a/Documentation/media/.gitignore b/Documentation/media/.gitignore index a1363379944a..08b21de3ef94 100644 --- a/Documentation/media/.gitignore +++ b/Documentation/media/.gitignore @@ -1 +1,3 @@ *.pdf +# Files generated from *.dot +uapi/v4l/pipeline.svg 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} diff --git a/Documentation/media/uapi/v4l/pipeline.svg b/Documentation/media/uapi/v4l/pipeline.svg deleted file mode 100644 index 70f4c1b23ca1..000000000000 --- a/Documentation/media/uapi/v4l/pipeline.svg +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - -board - - -scaler - -0 - -Host -Scaler - -1 - - -io - -0 - -V4L I/O - - -scaler:scaler_1->io:io_0 - - -HQ: 1280x720 -HS: 1280x720 - - -frontend - -0 - -Host -Frontend - -1 - - -frontend:frontend_1->scaler:scaler_0 - - -HQ: 2592x1968 -HS: 1296x984 - - -sensor - -Sensor - -0 - - -sensor:sensor_0->frontend:frontend_0 - - -HQ: 2592x1968 -HS: 1296x984 - - - -- cgit v1.2.3