2020-07-07 19:38:20 +02:00
|
|
|
TARGET=slides.pdf
|
|
|
|
|
2020-07-21 21:06:32 +02:00
|
|
|
QRENCODE=qrencode -t svg --background=ffffff00
|
|
|
|
|
2020-07-07 19:38:20 +02:00
|
|
|
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))
|
|
|
|
|
2020-07-21 21:06:32 +02:00
|
|
|
QR_NAMES=qr_slide.pdf qr_draft.pdf
|
|
|
|
QR_IMGS=$(addprefix imgs/pdf/,$(QR_NAMES))
|
|
|
|
|
|
|
|
all: $(SVG_PDFTEXS) $(SVG_PDF) $(AUTOGEN_SVGS) $(QR_IMGS) $(TARGET)
|
2020-07-07 19:38:20 +02:00
|
|
|
|
|
|
|
%.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
|
|
|
|
|
2020-07-21 21:06:32 +02:00
|
|
|
imgs/pdf/qr_slide.pdf:
|
|
|
|
$(QRENCODE) -o - "https://tobast.fr/files/ietf108-v40v6.pdf" \
|
|
|
|
| inkscape --pipe -o "$@" 2>/dev/null
|
|
|
|
|
|
|
|
imgs/pdf/qr_draft.pdf:
|
|
|
|
$(QRENCODE) -o - "https://datatracker.ietf.org/doc/draft-bastian-babel-v4ov6/" \
|
|
|
|
| inkscape --pipe -o "$@" 2>/dev/null
|
|
|
|
|
2020-07-07 19:38:20 +02:00
|
|
|
.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
|