#--*- Makefile -*--
#*
# Check spelling of *.tex files using 'aspell', output the list of the
# misspelled words:
#**

TEXT_PARTS     ?= $(wildcard text-parts/*.txt)
WORDS          ?= ./words.lst
SPELL_LANGUAGE ?= en_GB

.PHONY: spell

spell:
	for i in ${TEX_FILES} ${TEXT_PARTS}; do \
		echo "===" $$i; \
		aspell -p ${WORDS} -l ${SPELL_LANGUAGE} list < $$i | sort -u; \
	done
