summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2017-05-29 10:11:20 -0400
committerEugeniy E. Mikhailov <evgmik@gmail.com>2017-05-29 10:11:20 -0400
commit4cf65aba2e476a827948df85dc84c0fec834358b (patch)
tree204b76167f42f4857e5ca1b81b01e5a2ce2932b2
parent83fbbd3a887b0bc6b55ac8e446415560799aa8f7 (diff)
downloadmakefile_templates-4cf65aba2e476a827948df85dc84c0fec834358b.tar.gz
makefile_templates-4cf65aba2e476a827948df85dc84c0fec834358b.zip
svg now can produce png too
-rw-r--r--pic_svg.mk17
1 files changed, 14 insertions, 3 deletions
diff --git a/pic_svg.mk b/pic_svg.mk
index f14d37d..eb3348a 100644
--- a/pic_svg.mk
+++ b/pic_svg.mk
@@ -1,23 +1,34 @@
# -*- make -*-
-CLEAN_TARGETS += clean_pdf_svg_targets
-REAL_CLEAN_TARGETS += real_clean_pdf_svg_targets
+CLEAN_TARGETS += clean_pdf_svg_targets clean_png_svg_targets
+REAL_CLEAN_TARGETS += real_clean_pdf_svg_targets real_clean_png_svg_targets
destination_dirs += $(pics_destdir)
svg_sources = $(wildcard *.svg)
pdf_svg = $(svg_sources:%.svg=$(pics_destdir)/%.pdf)
+png_svg = $(svg_sources:%.svg=$(pics_destdir)/%.png)
-copy_pdf_compatible_files: $(pdf_svg)
+copy_pdf_compatible_files: $(pdf_svg) $(png_svg)
$(pdf_svg): $(pics_destdir)/%.pdf : %.svg | $(pics_destdir)
inkscape --export-pdf=$@ $<
+$(png_svg): $(pics_destdir)/%.png : %.svg | $(pics_destdir)
+ inkscape --export-png=$@ $<
+
clean_pdf_svg_targets:
+clean_png_svg_targets:
+
real_clean_pdf_svg_targets:
ifneq ($(strip $(pdf_svg)),)
rm -f $(pdf_svg)
endif
+real_clean_png_svg_targets:
+ifneq ($(strip $(pdf_svg)),)
+ rm -f $(png_svg)
+endif
+