include ../encodings.inc

LC_ALL	= LC_ALL=uk_UA.$(ASPELL_ENC)
sort	= $(LC_ALL) sort
spcr	= tr ' ' '\n'

CLEANFILES	= *.lst *.srt *.diff *.dups *.nodups
DISTCLEANFILES	= *.old


all: 	regtest-aspell


regtest:
	make -C ..
	cat ../uk_words.lst | $(LC_ALL) aspell expand -l uk --local-data-dir=../ > all_aspell.lst
	cat all_aspell.lst | $(spcr) | $(sort) > all_aspell.srt
	cat all_aspell.srt | uniq > all_aspell.srt.nodups
	cat all_aspell.srt | uniq -d -c > all_aspell.srt.dups
	-diff all_aspell.srt.nodups.old all_aspell.srt.nodups > all_aspell.srt.nodups.diff
	-diff all_aspell.srt.dups.old all_aspell.srt.dups > all_aspell.srt.dups.diff


regtestroll:
	mv -f all_aspell.srt.nodups all_aspell.srt.nodups.old
	mv -f all_aspell.srt.dups all_aspell.srt.dups.old

clean:
	rm -f $(CLEANFILES)


distclean:
	rm -f $(CLEANFILES) $(DISTCLEANFILES)


.PHONY: all regtest regtestroll clean clean_all
