summaryrefslogtreecommitdiff
path: root/pic_svg.mk
blob: eb3348a30f5c7ee85b1ea880ae1ed5857565f5bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# -*- make -*-

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) $(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