blob: 8302786fe45db0e24349365450ba2d8aed7537b3 (
plain)
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
|
$NetBSD: patch-aa,v 1.1.1.1 2002/11/19 15:53:26 jschauma Exp $
--- Makefile.orig Tue Nov 19 10:43:06 2002
+++ Makefile Tue Nov 19 10:47:30 2002
@@ -1,40 +1,48 @@
# Makefile for Russian ispell dictionary
-LIB=/usr/lib/ispell
+INSTALLDIR= ${PREFIX}/lib
+BUILDHASH= ${PREFIX}/bin/buildhash
+SORTKOI8= ./sortkoi8
-DICT = base.koi abbrev.koi computer.koi for_name.koi geography.koi \
+ENC?= koi
+DICT= base.koi abbrev.koi computer.koi for_name.koi geography.koi \
science.koi # rare.koi
-ifdef YO
-PATT=y
-else
-PATT=e
-YO2E=| tr '\243\263' '\305\345'
-endif
-
-koi iso alt win mac: russian.aff.koi russian.dict.koi
- sed -e "s/^\#$(PATT)//;s/^\#$@/wordchars/" $< | \
- ./trans koi $@ > russian.aff
- cat russian.dict.koi | ./trans koi $@ > russian.dict
- rm russian.dict.koi
- buildhash ./russian.dict ./russian.aff ./russian.hash
+# The following 'if' tries speedup the make process
+.ifdef ${ENC} == "koi"
+TRANSKOI= # null
+.else
+TRANSKOI= | ./trans koi ${ENC}
+.endif
+
+.ifdef YO
+PATT= y
+.else
+PATT= e
+YO2E= | ${TR} '\243\263' '\305\345'
+.endif
+
+all: russian.hash
install:
- cp russian.hash russian.aff $(LIB)
+ ${BSD_INSTALL_DATA} russian.hash ${INSTALLDIR}
+ ${BSD_INSTALL_DATA} russian.aff ${INSTALLDIR}
+
+russian.hash: russian.aff russian.dict
+ ${BUILDHASH} russian.dict russian.aff $@
-russian.dict.koi: $(DICT)
- cat $^ $(YO2E) | ./sortkoi8 | uniq > $@
+russian.aff: russian.aff.koi
+ ${SED} -e "s/^\#${PATT}//;s/^\#${ENC}/wordchars/" $> \
+ ${TRANSKOI} > $@
+
+russian.dict: ${DICT}
+ ${CAT} $> ${YO2E} | ${SORTKOI8} | ${UNIQ} \
+ ${TRANSKOI} > $@
check_dict: $(DICT)
for i in `cat $(DICT) | sed 's,/.*$$,,' | sort | uniq -d`; do \
grep "^$$i/\|^$$i$$" $(DICT); \
done > .temp
-
-sort_dict: $(DICT)
- for i in $(DICT); do \
- cat $$i | ./sortkoi8 > $$i.temp; \
- mv -f $$i.temp $$i; \
- done
clean:
rm -f russian.dict* russian.hash russian.aff .temp
|