SRC=$(wildcard *.py)

.PHONY: all clean check check-pylint check-format check-mypy
all: build/index.html

build/index.html: templates/$(wildcard index.*) generate-gallery.py turbowarp-packager-settings.json
	./generate-gallery.py

clean:
	rm -rf build/

check: check-pylint check-format check-mypy

check-pylint:
	pylint --rcfile=.pylint.rc -j 0 $(SRC) || ./tools/check-pylint $$?

check-format:
	yapf -d $(SRC)

check-mypy:
	mypy $(SRC)

format:
	yapf -i $(SRC)
