summaryrefslogtreecommitdiff
path: root/Documentation/media/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/media/Makefile')
-rw-r--r--Documentation/media/Makefile29
1 files changed, 28 insertions, 1 deletions
diff --git a/Documentation/media/Makefile b/Documentation/media/Makefile
index a7fb35291f6c..297b85c37ab9 100644
--- a/Documentation/media/Makefile
+++ b/Documentation/media/Makefile
@@ -10,8 +10,35 @@ FILES = audio.h.rst ca.h.rst dmx.h.rst frontend.h.rst net.h.rst video.h.rst \
TARGETS := $(addprefix $(BUILDDIR)/, $(FILES))
-.PHONY: all
+IMAGES = \
+ typical_media_device.svg \
+ uapi/dvb/dvbstb.svg \
+ uapi/v4l/constraints.svg \
+ uapi/v4l/subdev-image-processing-full.svg \
+ uapi/v4l/subdev-image-processing-scaling-multi-source.svg \
+ uapi/v4l/subdev-image-processing-crop.svg \
+
+IMGTGT := $(patsubst %.png,%.pdf,$(patsubst %.svg,%.pdf,$(IMAGES)))
+IMGPDF := $(patsubst %,$(SRC_DIR)/%,$(IMGTGT))
+
+cmd = $(echo-cmd) $(cmd_$(1))
+
+quiet_cmd_genpdf = GENPDF $2
+ cmd_genpdf = convert $2 $3
+
+%.pdf: %.svg
+ @$(call cmd,genpdf,$<,$@)
+
+.PHONY: all html epub xml latex
+
all: $(BUILDDIR) ${TARGETS}
+html: all
+epub: all
+xml: all
+latex: $(IMGPDF) all
+
+clean:
+ -rm $(IMGTGT) 2>/dev/null
$(BUILDDIR):
$(Q)mkdir -p $@