ADD: used correct commandline for inkscape (idea from Marcel)
This commit is contained in:
parent
dbd138f09d
commit
6d0e935337
15
Makefile
15
Makefile
@ -1,6 +1,6 @@
|
|||||||
# Makefile for generating pdf from latex files
|
# Makefile for generating pdf from latex files
|
||||||
# -dependency support
|
# -dependency support
|
||||||
# -pdf generation of svg files
|
# -pdf generation of svg files
|
||||||
# -pdf generation of dot files
|
# -pdf generation of dot files
|
||||||
#
|
#
|
||||||
# Author : Dominik Meyer <dmeyer@hsu-hh.de>
|
# Author : Dominik Meyer <dmeyer@hsu-hh.de>
|
||||||
@ -21,6 +21,16 @@ else
|
|||||||
LATEXMK=export TEXINPUTS=$(TEXINPUTS);latexmk -use-make -f $(DEPFLAGS) -pdflua $(subst .pdf,.tex,$@) 1>>$(subst .pdf,.log,$@) 2>>$(subst .pdf,.log,$@)
|
LATEXMK=export TEXINPUTS=$(TEXINPUTS);latexmk -use-make -f $(DEPFLAGS) -pdflua $(subst .pdf,.tex,$@) 1>>$(subst .pdf,.log,$@) 2>>$(subst .pdf,.log,$@)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# identify used inkscape version and set command
|
||||||
|
INKSCAPE_BASE=$(shell which inkscape)
|
||||||
|
INKSCAPE_VERSION=$(shell $(INKSCAPE_BASE) --version 2>/dev/null | cut -d " " -f 2 | cut -d . -f 1)
|
||||||
|
|
||||||
|
ifeq (INKSCAPE_VERSION, 0)
|
||||||
|
INKSCAPE = "echo \"$< --export-pdf=$@\" | DISPLAY= $(INKSCAPE_BASE) -D -y 0 --shell >/dev/null"
|
||||||
|
else
|
||||||
|
INKSCAPE = "$(INKSCAPE_BASE) --export-type=pdf -o $@ $<"
|
||||||
|
endif
|
||||||
|
|
||||||
.SECONDARY: .latexmkrc
|
.SECONDARY: .latexmkrc
|
||||||
.PHONY: clean watermark IEEE base
|
.PHONY: clean watermark IEEE base
|
||||||
|
|
||||||
@ -31,7 +41,8 @@ endif
|
|||||||
|
|
||||||
%.pdf: %.svg
|
%.pdf: %.svg
|
||||||
@echo "**** Generating $@ from svg file $< ****"
|
@echo "**** Generating $@ from svg file $< ****"
|
||||||
@echo "$< --export-pdf=$@" | DISPLAY= inkscape -D -y 0 --shell >/dev/null
|
@if [ "$(INKSCAPE_VERSION)" -eq "0" ]; then echo "$<" --export-pdf=$@ | DISPLAY= $(INKSCAPE_BASE) -D -y 0 --shell >/dev/null; fi
|
||||||
|
@if [ "$(INKSCAPE_VERSION)" -eq "1" ]; then $(INKSCAPE_BASE) --export-type=pdf -o $@ $<; fi
|
||||||
@touch $@.dep
|
@touch $@.dep
|
||||||
|
|
||||||
%.pdf: $(DEPDIR)/%.d
|
%.pdf: $(DEPDIR)/%.d
|
||||||
|
Loading…
Reference in New Issue
Block a user