2020-04-20 10:02:08 +03:00
|
|
|
LATEXMK=latexmk
|
|
|
|
|
|
|
|
PYGMENTIZE=../../syntax_highlighting/pygments/pygments/env/bin/pygmentize
|
|
|
|
|
2020-04-20 19:47:31 +03:00
|
|
|
CATALA_LANG?=fr
|
|
|
|
|
2020-04-21 13:25:52 +03:00
|
|
|
CATALA=dune exec ../../src/catala.exe -- --debug --language=$(CATALA_LANG)
|
2020-04-20 20:37:16 +03:00
|
|
|
|
2020-04-23 15:10:38 +03:00
|
|
|
LEGIFRANCE_CATALA=dune exec ../../src/legifrance_catala.exe --
|
2020-04-22 13:50:33 +03:00
|
|
|
|
2020-04-22 12:51:17 +03:00
|
|
|
CATALA_EXE=../../_build/default/src/catala.exe
|
2020-04-22 13:50:33 +03:00
|
|
|
LEGIFRANCE_CATALA_EXE=../../_build/default/src/legifrance_catala.exe
|
|
|
|
|
|
|
|
CLIENT_ID?=$(shell cat ../../legifrance_oauth_id.txt)
|
|
|
|
CLIENT_SECRET?=$(shell cat ../../legifrance_oauth_secret.txt)
|
2020-04-20 20:37:16 +03:00
|
|
|
|
|
|
|
%.tex: %.catala $(CATALA_EXE)
|
|
|
|
$(CATALA) Makefile $<
|
2020-04-20 10:05:40 +03:00
|
|
|
$(CATALA) \
|
2020-04-20 10:02:08 +03:00
|
|
|
--wrap_latex \
|
2020-04-20 10:05:40 +03:00
|
|
|
--pygmentize=$(PYGMENTIZE) \
|
2020-04-20 10:02:08 +03:00
|
|
|
LaTeX \
|
|
|
|
$<
|
|
|
|
|
2020-04-22 13:50:33 +03:00
|
|
|
%.expired: %.catala $(CATALA_EXE) $(LEGIFRANCE_CATALA_EXE)
|
|
|
|
$(LEGIFRANCE_CATALA) $< $(CLIENT_ID) $(CLIENT_SECRET)
|
|
|
|
|
2020-04-20 10:02:08 +03:00
|
|
|
%.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:
|