catala/examples/Makefile.common

29 lines
609 B
Makefile
Raw Normal View History

LATEXMK=latexmk
PYGMENTIZE=../../syntax_highlighting/pygments/pygments/env/bin/pygmentize
2020-04-20 19:47:31 +03:00
CATALA_LANG?=fr
CATALA=dune exec ../../src/catala.exe -- --debug --language=$(CATALA_LANG)
2020-04-20 20:37:16 +03:00
CATALA_EXE=../../_build/default/src/main.exe
%.tex: %.catala $(CATALA_EXE)
$(CATALA) Makefile $<
2020-04-20 10:05:40 +03:00
$(CATALA) \
--wrap_latex \
2020-04-20 10:05:40 +03:00
--pygmentize=$(PYGMENTIZE) \
LaTeX \
$<
%.pdf: %.tex
cd $(@D) && $(LATEXMK) -g -pdf -halt-on-error -shell-escape $(%F)
clean:
$(LATEXMK) -f -C $(SRC:.catala=.tex)
rm -rf $(SRC:.catala=.tex) $(SRC:.catala=.d) _minted-$(SRC:.catala=)
include $(wildcard $(SRC:.catala=.d))
2020-04-20 20:37:16 +03:00
.SECONDARY: