File: Makefile

package info (click to toggle)
igerman98 20030222-7
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,304 kB
  • ctags: 17
  • sloc: perl: 276; makefile: 259; sed: 31
file content (235 lines) | stat: -rw-r--r-- 6,569 bytes parent folder | download
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
WORTE = \
	adjektive-a.txt \
	anglizismen-a.txt \
	verben-a.txt \
	klein-a.txt \
	worte-a.txt \
	\
	adjektive-n.txt \
	anglizismen-n.txt \
	klein-n.txt \
	verben-n.txt \
	worte-n.txt \
	\
	abkuerzungen.txt \
	abkuerz2.txt \
	adjektive.txt \
	alphabeta.txt \
	anglizismen.txt \
	compeng.txt \
	elektronik.txt \
	geografie.txt \
	infoabk.txt \
	informatik.txt \
	klein.txt \
	latein.txt \
	marken.txt \
	mathematik.txt \
	namen.txt \
	orgabk.txt \
	roemisch.txt \
	seltenes.txt \
	technik.txt \
	verben.txt \
	vornamen.txt \
	worte.txt \
	worte2.txt \
	zahlen.txt \
	zusammen.txt \
	vornamen2.txt \
	namen2.txt \
	medizin.txt \
	geografie2.txt
# not used:   austriazismen.txt
#             helvetismen.txt (automatically used by "make swiss.hash")
#             fixwords.txt (used below)
#             abkuerzpunkt.txt (special treatment below)

ISPELLIBDIR = $$(ispell -vv |grep "LIBDIR" |sed "s/.*\=//" |tr -d \")
DESTDIR =
MAKE = make
BUILDHASH = buildhash
ISPELL = ispell
SQ = sq
UNSQ = unsq
#   if for some reason you don't have Ispell's unsq use my Perl sq/unsq
#  and put it into a directory known by your PATH variable!
#UNSQ = unsq.pl

ASPELL = aspell
vpath %.txt ./dicts
.SUFFIXES: .txt

# to let `sort' behave right: setting LC_ALL ist not enough, because
# UTF-8 locales won't get overwritten by that, we also need to reset LANG!
LANG = C
LC_ALL = C
LC_COLLATE = C





###
## Ispell stuff:
###

german.hash: german.aff all.words .copyright
	$(BUILDHASH) all.words ./german.aff $@

all.words.raw: unpack $(addprefix dicts/,$(WORTE))
	cd dicts; sed "s/qq//g;s/\.//" abkuerzpunkt.txt $(WORTE) |sort -u |../bin/uniqflag.pl > ../$@.tmp
	mv $@.tmp $@

all.words: all.words.raw german.aff
	munchlist -l ./german.aff all.words.raw > $@

install: german.hash
	mkdir -p $(DESTDIR)$(ISPELLIBDIR)
	cp german.aff german.hash $(DESTDIR)$(ISPELLIBDIR)

## Swiss Ispell stuff:

swiss.aff:
	sed "/swiss-del/d" german.aff |sed "/swiss-convert/s/sS/SS/g" |sed '/\#swiss-only/s/^\#//' |sed '/stringchar/!s/sS//g' > swiss.aff

all.words.swiss.raw: unpack $(addprefix dicts/,$(WORTE))
	cd dicts; sed "s/qq//g;s/sS/ss/g;s/\.//g" $(WORTE) helvetismen.txt abkuerzpunkt.txt |sort -u > ../$@

all.words.swiss: all.words.swiss.raw swiss.aff
	munchlist -l ./swiss.aff all.words.swiss.raw > $@

swiss.hash: swiss.aff all.words.swiss .copyright
	$(BUILDHASH) all.words.swiss ./swiss.aff swiss.hash

swiss-install: swiss.hash
	mkdir -p $(DESTDIR)$(ISPELLIBDIR)
	cp swiss.aff swiss.hash $(DESTDIR)$(ISPELLIBDIR)


###
## Aspell stuff:
###

help.hash: german.aff all.words2 .copyright
	$(BUILDHASH) all.words2 ./german.aff $@

all.words2: unpack
	cd dicts; sed s/qq//g $(WORTE) |sort -u > ../$@

aspell: help.hash
	#cat all.words2 dicts/abkuerzpunkt.txt |$(ISPELL) -e -d./help |sed -f ./bin/dic2iso |sort -u |$(ASPELL) --lang=german create master ./german
	sed "s/\.//g" all.words2 dicts/abkuerzpunkt.txt |$(ISPELL) -e -d./help |sed -f ./bin/dic2iso |sort -u |$(ASPELL) --lang=german create master ./german

swiss-aspell: swiss
	cat all.words.swiss |$(ISPELL) -e -d./swiss |sed -f ./bin/dic2iso |sort -u |$(ASPELL) --lang=swiss create master ./swiss




###
## myspell stuff:
###

myspelldic: all.words
#	cd dicts; sed "s/qq//g" abkuerzpunkt.txt $(WORTE) |sort -u |../bin/myspellfixprefix.pl |sort -u |../bin/uniqflag.pl > ../all.words.myspell
	cat all.words dicts/abkuerzpunkt.txt |sort -u |./bin/myspellfixprefix.pl |sort -u  > all.words.myspell
	wc -l all.words.myspell |sed "s/ *\([0-9]*\) .*/\1/g" >myspell/de_DE.dic
	./bin/dic2iso <all.words.myspell >>myspell/de_DE.dic
	sed "s/qq//g" dicts/austriazismen.txt |sort -u |./bin/myspellfixprefix.pl |sort -u |./bin/uniqflag.pl > all.words.myspell.aust
	wc -l all.words.myspell.aust |sed "s/ *\([0-9]*\) .*/\1/g" >myspell/de_AT.dic
	./bin/dic2iso <all.words.myspell.aust >>myspell/de_AT.dic

swiss-myspelldic: all.words.swiss
	cat all.words.swiss dicts/abkuerzpunkt.txt dicts/helvetismen.txt |sort -u |./bin/myspellfixprefix.pl |sort -u |./bin/uniqflag.pl > all.words.myspell.swiss
	wc -l all.words.myspell.swiss |sed "s/ *\([0-9]*\) .*/\1/g" >myspell/de_CH.dic
	./bin/dic2iso <all.words.myspell.swiss >>myspell/de_CH.dic




###
## ligature stuff:
###


liglist.aff:
	sed '/\#qqq/s/^\#//g;/\#nnn/d' german.aff > liglist.aff

all.words.liglist.raw: unpack $(addprefix dicts/,$(WORTE))
	cd dicts ; sed "s/\.//" *.txt |sort -u > ../$@

all.words.liglist: all.words.liglist.raw liglist.aff
	munchlist -l ./liglist.aff all.words.liglist.raw > $@

liglist.hash: liglist.aff all.words.liglist
	$(BUILDHASH) all.words.liglist ./liglist.aff $@

liglist: liglist.hash .copyright
	cat ligature/oldspell.liglist all.words.liglist    \
	| $(ISPELL) -e -d./liglist                         \
	| tr \  '\n'                                       \
	| grep qq                                          \
	| sort -u                                          \
	| sed 's/fqqf/f\|f/g;s/fqql/f\|l/g;s/fqqi/f\|i/g'  \
	| grep \|                                          \
	| sed s/qq//g                                      \
	| sed -f ./bin/dic2iso                             \
	| tr A-Z a-z                                       \
	| sort -u                                          \
	> liglist

rmligs: liglist
	cat ligature/rmligs.skel liglist > rmligs
	chmod 755 rmligs






###
## misc stuff:
###


.copyright:
#	@echo 
#	@cat Documentation/Copyright
#	@sleep 0

isowordlist: german.hash
	cat all.words |$(ISPELL) -e -d./german |tr \  '\n' |sed -f ./bin/dic2iso |sort -u > isowordlist

swiss-isowordlist: swiss.hash
	cat all.words.swiss |$(ISPELL) -e -d./swiss |tr \  '\n' |sed -f ./bin/dic2iso |sort -u > swiss-isowordlist

clean:
	rm -f all.words* *.hash swiss.aff igerman98*.tar.bz2 *isowordlist german swiss unpack sort liglist.aff liglist.hash liglist rmligs myspell/*.dic *.tmp
	rm -f unpack-stamp

sort:
	@if grep [] dicts/*.txt ;then echo "!!! wrong characters in dictionay files !!!";exit 1;fi
	cd dicts; find . -name "*.txt" |while read i; do sort -u -o $$i $$i; done

pack: sort
	rm -f unpack
	cd dicts; find . -name "*.txt" |while read i; do $(SQ) < $$i > $$i.sq && rm $$i; done

unpack: unpack-stamp
unpack-stamp:
	cd dicts; find . -name "*.sq" |while read i; do $(UNSQ) < $$i > `basename $$i .sq`; done
	touch unpack-stamp

dist: sort pack clean
	date +%Y%m%d > VERSION
	md5sum `find . -name "*" -xtype f` |gpg --clearsign > .MD5sums
	mv .MD5sums MD5sums
	ls > .files
	echo igerman98-`cat VERSION` > .name
	mkdir `cat .name`
	mv `cat .files` `cat .name`
	tar cv * | bzip2 > `cat .name`.tar.bz2
	mv `cat .name`/* .
	rmdir `cat .name`