File: Makefile

package info (click to toggle)
dsdo 1.6.36-5
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,584 kB
  • ctags: 129
  • sloc: makefile: 180; perl: 77
file content (50 lines) | stat: -rw-r--r-- 2,522 bytes parent folder | download | duplicates (5)
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
LANG=da_DK.ISO8859-1

sprog=dansk
sprog_en=Danish
sprog_en_lower_case=danish
language_code=da
country_code=DK

lang=da
version=1.6.36

installdir=`ispell -vv | grep LIBDIR | cut -d'"' -f2`

all: maskbits $(sprog).hash

maskbits:
	@test "`ispell -vv | grep MASKBITS`" != ""              || ( echo Ispell should be compiled with MASKBITS set to at least 64. ; exit -2 )
	@test `ispell -vv | grep MASKBITS | cut -d= -f2` -ge 64 || ( echo Ispell should be compiled with MASKBITS set to at least 64. ; exit -3 )

$(sprog)-fake.hash: maskbits $(sprog).aff
	echo 'QQQQQQQQ' > $(sprog)-fake
	buildhash -s $(sprog)-fake $(sprog).aff $(sprog)-fake.hash

words-$(language_code): ../words-$(language_code)
	egrep -v '[/.: +]' ../words-$(language_code) | sort -u > words-$(language_code)

words-$(language_code).munched: maskbits words-$(language_code) $(sprog).aff
	munchlist -l $(sprog).aff -v < words-$(language_code) > words-$(language_code).munched

words-$(language_code)-in_ispell_list: maskbits $(sprog)-fake.hash words-$(language_code).munched
	ispell -e -d ./$(sprog)-fake < words-$(language_code).munched | tr ' ' '\n' | sort -u > words-$(language_code)-in_ispell_list

words-$(language_code)-missing_in_ispell_list: words-$(language_code) words-$(language_code)-in_ispell_list
	diff words-$(language_code) words-$(language_code)-in_ispell_list | grep '^< ' | cut -c3- | egrep -v '[/ .]' > words-$(language_code)-missing_in_ispell_list

words-$(language_code).complete: words-$(language_code)-missing_in_ispell_list words-$(language_code).munched
	sort -u words-$(language_code)-missing_in_ispell_list words-$(language_code).munched > words-$(language_code).complete

$(sprog).hash: maskbits words-$(language_code).complete $(sprog).aff
	buildhash words-$(language_code).complete $(sprog).aff $(sprog).hash

install: maskbits $(sprog).hash $(sprog).aff
	install -o root -g root -m 0644 $(sprog).hash $(installdir)
	install -o root -g root -m 0644 $(sprog).aff  $(installdir)
	ln -fs $(installdir)/$(sprog).hash $(installdir)/$(language_code)_$(country_code).hash
	ln -fs $(installdir)/$(sprog).aff  $(installdir)/$(language_code)_$(country_code).aff

clean:
	rm -f words-$(language_code).complete.stat $(sprog).hash words-$(language_code).complete.cnt *~ $(sprog)-fake $(sprog)-fake.cnt $(sprog)-fake.stat $(sprog)-fake.hash words-$(language_code) words-$(language_code)-in_ispell_list words-$(language_code)-missing_in_ispell_list words-$(language_code).complete words-$(language_code).munched words-$(language_code).stat