Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932241AbcKTQK4 (ORCPT ); Sun, 20 Nov 2016 11:10:56 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:41615 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753209AbcKTQIv (ORCPT ); Sun, 20 Nov 2016 11:08:51 -0500 From: Mauro Carvalho Chehab To: Linux Doc Mailing List , "Jonathan Corbet" Cc: Mauro Carvalho Chehab , Mauro Carvalho Chehab , Linux Kernel Mailing List , ksummit-discuss@lists.linuxfoundation.org, Mauro Carvalho Chehab Subject: [PATCH 7/9] docs-rst: media: build SVG from graphviz files Date: Sun, 20 Nov 2016 14:08:38 -0200 Message-Id: X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 7669 Lines: 148 Instead of keeping both SVG and graphviz files, dynamically build SVG from its graphviz sources. Signed-off-by: Mauro Carvalho Chehab --- Documentation/media/Makefile | 20 ++++++--- Documentation/media/uapi/v4l/pipeline.svg | 68 ------------------------------- 2 files changed, 14 insertions(+), 74 deletions(-) delete mode 100644 Documentation/media/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 - - - -- 2.7.4