graphs := $(patsubst %.json,%.png,$(wildcard assets/*.json)) default: main.pdf main.pdf: $(graphs) $(shell find . -iname '*.tex') biblio.bib latexmk -pdf $(graphs): assets/%.png: assets/${subst png,json,%}.json vl2png -s 2 ${subst png,json,$@} $@ .PHONY: clean watch clean: latexmk -c rm -f assets/*.png watch: while true; do \ $(MAKE) $(WATCHMAKE); \ inotifywait -qre close_write .; \ done