File: Makefile

package info (click to toggle)
hkgerman 1%3A2-28
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 1,500 kB
  • ctags: 15
  • sloc: makefile: 155; sh: 70; perl: 42; sed: 22
file content (83 lines) | stat: -rw-r--r-- 2,236 bytes parent folder | download | duplicates (3)
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

ASPELL = /usr/bin/aspell --local-data-dir=. -l de-alt
ISPELL = /usr/bin/ispell
PREZIP = /usr/bin/prezip
DESTDIR =

dictdir = /usr/lib/aspell
datadir = /usr/lib/aspell

cwl_files = de-alt-common.cwl de-alt-DE.cwl de-alt-CH.cwl
data_files = de-alt.dat de-alt_phonet.dat de-alt_affix.dat
multi_files = de-alt.multi de_CH-alt.multi\
        deutsch-alt.alias german-old.alias

deutsch.hash: all.words deutsch.aff
	buildhash all.words deutsch.aff $@
 
all.words: $(WORTE)
	#sort -u $+ > $@
	sort -u *.txt > $@

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
	rm -f szlig noszlig *.wl *.cwl de-alt_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-alt_affix.dat

de-alt_affix.dat: myspell.aff
	cp $< $@

szlig: isowordlist
	grep  $< > $@

noszlig: isowordlist
	grep -v  $< > $@

de-alt-common.wl: noszlig de-alt_phonet.dat de-alt_affix.dat
	$(ASPELL) munch-list < $< | grep -v '^\(XXX\|>>>\)' | sort -u > $@

de-alt-DE.wl: szlig de-alt_phonet.dat de-alt_affix.dat
	$(ASPELL) munch-list < $< | grep -v '^\(XXX\|>>>\)' | sort -u > $@

de-alt-CH.wl: szlig de-alt_phonet.dat de-alt_affix.dat
	sed 's//ss/g' < $< | $(ASPELL) munch-list | grep -v '^\(XXX\|>>>\)' \
		| 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