2020-07-07 19:38:20 +02:00
|
|
|
TARGET=slides.pdf
|
|
|
|
|
|
|
|
SVGS=$(wildcard imgs/*.svg)
|
|
|
|
SVG_PDFTEXS = $(patsubst imgs/%,imgs/pdf_tex/%,$(SVGS:.svg=.pdf_tex))
|
|
|
|
SVG_PDF = $(patsubst imgs/%,imgs/pdf/%,$(SVGS:.svg=.pdf))
|
|
|
|
AUTOGEN_SVGS_LIST=mac
|
|
|
|
AUTOGEN_SVGS=$(addprefix imgs/_autogen/,$(AUTOGEN_SVGS_LIST))
|
|
|
|
|
|
|
|
all: $(SVG_PDFTEXS) $(SVG_PDF) $(AUTOGEN_SVGS) $(TARGET)
|
|
|
|
|
|
|
|
%.pdf: %.tex
|
|
|
|
latexmk -pdfxe $<
|
|
|
|
|
2020-07-07 22:17:20 +02:00
|
|
|
imgs/_autogen/%: imgs/%.svg imgs/split_layers.py
|
2020-07-07 19:38:20 +02:00
|
|
|
imgs/split_layers.py "$*.svg"
|
|
|
|
cd "$@" ; inkscape --export-type=pdf *.svg
|
|
|
|
|
|
|
|
imgs/pdf_tex/%.pdf_tex: imgs/%.svg
|
|
|
|
mkdir -p "imgs/pdf_tex"
|
|
|
|
inkscape "$<" -o "$(@:.pdf_tex=.pdf)" --export-latex 2>/dev/null
|
|
|
|
sed -i 's#\($(patsubst imgs/pdf_tex/%,%,$(@:.pdf_tex=.pdf))\)#imgs/pdf_tex/\1#g' $@
|
|
|
|
|
|
|
|
imgs/pdf/%.pdf: imgs/%.svg
|
|
|
|
mkdir -p "imgs/pdf"
|
|
|
|
inkscape "$<" -o "$@" 2>/dev/null
|
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
latexmk -C
|
|
|
|
rm -rf "imgs/pdf_tex" "imgs/pdf"
|
|
|
|
rm -rf imgs/_autogen
|
2020-07-07 22:17:20 +02:00
|
|
|
|
|
|
|
upload:
|
|
|
|
scp slides.pdf www.tobast:~/files/ietf108-v40v6.pdf
|