LATEX ?= pdflatex
SOURCE = ternary-parikh.tex
PDF = build/ternary-parikh.pdf

.PHONY: all check clean
all: $(PDF)

$(PDF): $(SOURCE)
	mkdir -p build
	$(LATEX) -no-shell-escape -interaction=nonstopmode -halt-on-error -output-directory=build $(SOURCE)
	$(LATEX) -no-shell-escape -interaction=nonstopmode -halt-on-error -output-directory=build $(SOURCE)
	$(LATEX) -no-shell-escape -interaction=nonstopmode -halt-on-error -output-directory=build $(SOURCE)

check:
	python3 ../checks/check_article_examples.py

clean:
	rm -f build/ternary-parikh.aux build/ternary-parikh.log build/ternary-parikh.out
