#--*- Makefile -*--

TEXT_PARTS ?= $(wildcard text-parts/*.tex)

SPELL_LANGUAGE ?= en_GB

.PHONY: aspell spell

aspell:
	for i in ${TEX_FILES} ${LTX_FILES} ${TEXT_PARTS}; do \
		aspell -t -x -p ./words.lst -l ${SPELL_LANGUAGE} check $$i; \
	done

spell:
	for i in ${TEX_FILES} ${LTX_FILES} ${TEXT_PARTS}; do \
		echo "===" $$i; \
		aspell -t -p ./words.lst -l ${SPELL_LANGUAGE} list < $$i | sort -u; \
	done
