# This file is marked with CC0 1.0 Universal
# and is dedicated to the public domain.

SVGS := $(wildcard g/*.svg)
SVGPDFS := $(patsubst g/%.svg,g/%.pdf, $(SVGS))

all: jami-2023.pdf jami-2023-with-notes.pdf jami-2023-only-notes.pdf

g/%.pdf: g/%.svg
	inkscape -D $< -o $@ --export-latex

jami-2023.pdf: jami-2023.tex $(SVGPDFS)
	latexmk -pdf jami-2023

jami-2023-%-notes.pdf: jami-2023-%-notes.tex jami-2023.tex
	latexmk -pdf $<

watch: jami-2023.pdf
	latexmk -pdf -pvc -view=none jami-2023

watch-%-notes: jami-2023-%-notes.tex jami-2023-%-notes.pdf jami-2023.tex
	latexmk -pdf -pvc -view=none $<

clean:
	rm -rf g/*.pdf
	rm -rf g/*.pdf_tex
	latexmk -C
