mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 03:53:32 +01:00
svg.mk: Fix inkscape command line API change on --export-png
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
cd047ac7c7
commit
6846acbdf7
1 changed files with 8 additions and 1 deletions
|
|
@ -1,6 +1,13 @@
|
|||
SVG_GENERATE_FORMATS ?= png svg
|
||||
SVG ?= $(filter-out copied-%,$(wildcard *.svg))
|
||||
COPIED_SVG = $(addprefix copied-,$(notdir $(SVG)))
|
||||
INKSCAPE_VERSION = $(shell inkscape -V 2>&1 | sed '/Inkscape/ !d; s/Inkscape *\([0-9.]\+\) .*/\1/')
|
||||
INKSCAPE_VERSION_MAJOR = $(word 1,$(subst ., ,$(INKSCAPE_VERSION)))
|
||||
ifeq ($(INKSCAPE_VERSION_MAJOR),1)
|
||||
INKSCAPE_EXPORT_PNG = --export-filename
|
||||
else
|
||||
INKSCAPE_EXPORT_PNG = --export-png
|
||||
endif
|
||||
|
||||
GENERATED_ICON_WIDTHS += 16 32 48 64 72 96 128 144 168 192
|
||||
GENERATED_WIDTHS ?= $(GENERATED_ICON_WIDTHS) $(GENERATED_EXTRA_WIDTHS)
|
||||
|
|
@ -38,7 +45,7 @@ clean.images:
|
|||
|
||||
%.png: $(COPIED_SVG)
|
||||
inkscape -w $(shell echo $* | sed 's/.*-//') \
|
||||
--export-png=$@ copied-$(shell echo $* | sed 's/-[0-9]\+$$//').svg
|
||||
$(INKSCAPE_EXPORT_PNG)=$@ copied-$(shell echo $* | sed 's/-[0-9]\+$$//').svg
|
||||
|
||||
%.pdf: copied-%.svg
|
||||
inkscape --export-pdf=$@ $<
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue