1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
|
LANG=C
LC_ALL=C
WORTE = worte.txt verben.txt adjektive.txt klein.txt \
geographie.txt vornamen.txt abkuerz.txt imperat.txt latein.txt \
informatik.txt infoabk.txt elektronik.txt orgabk.txt marken.txt \
worte2.txt zusammen.txt technik.txt compeng.txt \
alphabeta.txt roemisch.txt
ASPELL = /usr/bin/aspell --local-data-dir=. -l de-1901
ISPELL = /usr/bin/ispell
PREZIP = /usr/bin/prezip
DESTDIR =
dictdir = /usr/lib/aspell
datadir = /usr/lib/aspell
cwl_files = de-common-1901.cwl de_DE-only-1901.cwl de_CH-only-1901.cwl
data_files = de-1901.dat de-1901_phonet.dat de-1901_affix.dat
multi_files = de_DE-1901.multi de_CH-1901.multi de-1901.alias \
deutsch-alt.alias german-old.alias
deutsch.hash: all.words deutsch.aff
buildhash all.words deutsch.aff $@
all.words: $(WORTE)
sort -u $+ > $@
myspelldic: deutsch.hash
perl myspellfixprefix.pl < all.words |sort -u | perl uniqflag.pl > myspell.dic.tmp
wc -l myspell.dic.tmp |sed "s/ *\([0-9]*\) .*/\1/g" > myspell.dic
sed -f dic2iso <myspell.dic.tmp >> myspell.dic
rm myspell.dic.tmp
isowordlist: deutsch.hash
ispell -e -d ./deutsch <all.words |tr " " "\n" | sed -f dic2iso \
| sort -u > isowordlist
clean:
rm -f all.words all.words.cnt all.words.stat deutsch.hash hk*deutsch.tar.gz *.tmp myspell.dic isowordlist all.stat
rm -f szlig noszlig *.wl *.cwl de-1901_affix.dat
sort:
for i in *.txt;do sort -u -o $$i $$i;done
dist: clean sort
tar cvf - * | gzip -9 > hk2-deutsch.tar.gz
#
# aspell stuff:
#
aspell: $(cwl_files) de-1901_affix.dat
de-1901_affix.dat: myspell.aff
cp $< $@
szlig: isowordlist
grep -a $< > $@
noszlig: isowordlist
grep -av $< > $@
de-common-1901.wl: noszlig de-1901_phonet.dat de-1901_affix.dat
$(ASPELL) munch-list < $< | sort -u > $@
de_DE-only-1901.wl: szlig de-1901_phonet.dat de-1901_affix.dat
$(ASPELL) munch-list < $< | sort -u > $@
de_CH-only-1901.wl: szlig de-1901_phonet.dat de-1901_affix.dat
sed 's//ss/g' < $< | $(ASPELL) munch-list | sort -u > $@
%.cwl: %.wl
$(PREZIP) < $< > $@
aspell-install: aspell
mkdir -p ${DESTDIR}${dictdir}/
cp ${multi_files} ${DESTDIR}${dictdir}/
cd ${DESTDIR}${dictdir}/ && chmod 644 ${multi_files}
mkdir -p ${DESTDIR}${datadir}/
cp ${data_files} ${DESTDIR}${datadir}/
cd ${DESTDIR}${datadir}/ && chmod 644 ${data_files}
.PHONY: aspell clean aspell-install
|