#--*- Makefile -*--

#*
# Check spelling of *.tex files using 'aspell'
#**

.PHONY: aspell

TXT_FILES      ?= $(wildcard *.txt)
WORDS          ?= ./žodžiai.lst
SPELL_LANGUAGE ?= lt_LT

aspell: ${TXT_FILES}
	for file in $^; do \
		aspell -x -p ${WORDS} -l ${SPELL_LANGUAGE} check $$file; \
	done

spell: ${TXT_FILES}
	for file in $^; do \
		aspell -x -p ${WORDS} -l ${SPELL_LANGUAGE} list < $$file; \
	done
