comparison runtime/spell/de/main.aap @ 481:66080ac5dab7 v7.0130

updated for version 7.0130
author vimboss
date Mon, 15 Aug 2005 21:41:48 +0000
parents c4d200412ae9
children 6f8b578776ab
comparison
equal deleted inserted replaced
480:bf5ba8a0cdee 481:66080ac5dab7
1 # Aap recipe for German Vim spell files. 1 # Aap recipe for German Vim spell files.
2 #
3 # Since there is a big discussion about whether to use the old or the new
4 # spelling rules, both have been included.
5 # "de": all possible words allowed
6 # "de_de": old and new German spelling
7 # "de_19": old German spelling
8 # "de_20": new German spelling
9 # "de_AT": Austrian spelling
10 # "de_CH": Swiss spelling
2 11
3 # Use a freshly compiled Vim if it exists. 12 # Use a freshly compiled Vim if it exists.
4 @if os.path.exists('../../../src/vim'): 13 @if os.path.exists('../../../src/vim'):
5 VIM = ../../../src/vim 14 VIM = ../../../src/vim
6 @else: 15 @else:
7 :progsearch VIM vim 16 :progsearch VIM vim
8 17
9 SPELLDIR = .. 18 REGIONS = DE 19 20 AT CH
10 FILES = de_DE.aff de_DE.dic 19 DE_REGIONS = de_$*REGIONS
11 ZIPFILE = de_DE_comb.zip
12 20
13 all: $(SPELLDIR)/de.latin1.spl $(SPELLDIR)/de.utf-8.spl ../README_de.txt 21 SPELLDIR = ..
22 FILES = de_$*(REGIONS).aff de_$*(REGIONS).dic
14 23
15 $(SPELLDIR)/de.latin1.spl : $(VIM) $(FILES) 24 ZIPFILE_DE = de_DE_comb.zip
25 ZIPFILE_19 = de_DE.zip
26 ZIPFILE_20 = de_DE_neu.zip
27 ZIPFILE_AT = de_AT.zip
28 ZIPFILE_CH = de_CH.zip
29 ZIPFILES = $ZIPFILE_DE $ZIPFILE_19 $ZIPFILE_20 $ZIPFILE_AT $ZIPFILE_CH
30
31 READMES = README_de_$*(REGIONS).txt
32
33 all: $SPELLDIR/de.latin1.spl $SPELLDIR/de.utf-8.spl ../README_de.txt
34
35 $SPELLDIR/de.latin1.spl : $VIM $FILES
16 :sys env LANG=de_DE.ISO8859-1 36 :sys env LANG=de_DE.ISO8859-1
17 $(VIM) -u NONE -e -c "mkspell! $(SPELLDIR)/de de_DE" -c q 37 $VIM -u NONE -e -c "mkspell! $SPELLDIR/de $DE_REGIONS" -c q
18 38
19 $(SPELLDIR)/de.utf-8.spl : $(VIM) $(FILES) 39 $SPELLDIR/de.utf-8.spl : $VIM $FILES
20 :sys env LANG=de_DE.UTF-8 40 :sys env LANG=de_DE.UTF-8
21 $(VIM) -u NONE -e -c "mkspell! $(SPELLDIR)/de de_DE" -c q 41 $VIM -u NONE -e -c "mkspell! $SPELLDIR/de $DE_REGIONS" -c q
22 42
23 ../README_de.txt: README_de_DE_comb.txt 43 ../README_de.txt: $READMES
24 :copy $source $target 44 :print de_DE (combined) >! $target
45 :cat README_de_DE.txt >> $target
46 :print =================================================== >>$target
47 :print de_19 (old) >> $target
48 :cat README_de_19.txt >> $target
49 :print =================================================== >>$target
50 :print de_20 (new) >> $target
51 :cat README_de_20.txt >> $target
52 :print =================================================== >>$target
53 :print de_AT (Austria) >> $target
54 :cat README_de_AT.txt >> $target
55 :print =================================================== >>$target
56 :print de_CH (Swiss) >> $target
57 :cat README_de_CH.txt >> $target
25 58
26 # 59 #
27 # Fetching the files from OpenOffice.org. 60 # Fetching the files from OpenOffice.org.
28 # 61 #
29 OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries 62 OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
30 :attr {fetch = $(OODIR)/%file%} $(ZIPFILE) 63 :attr {fetch = $OODIR/%file%} $ZIPFILES
31 64
32 # The files don't depend on the .zip file so that we can delete it. 65 # The files don't depend on the .zip file so that we can delete it.
33 # Only download the zip file if the targets don't exist. 66 # Only download the zip file if the targets don't exist.
34 de_DE.aff de_DE.dic: {buildcheck=} 67 de_DE.aff de_DE.dic: {buildcheck=}
35 :assertpkg unzip patch 68 :assertpkg unzip patch
36 :fetch $(ZIPFILE) 69 :fetch $ZIPFILE_DE
37 :sys $(UNZIP) $(ZIPFILE) 70 :sys $UNZIP $ZIPFILE_DE
38 :delete $(ZIPFILE) 71 :delete $ZIPFILE_DE
39 :move de_DE_comb.aff de_DE.aff 72 :move de_DE_comb.aff de_DE.aff
40 :move de_DE_comb.dic de_DE.dic 73 :move de_DE_comb.dic de_DE.dic
74 :move README_de_DE_comb.txt README_de_DE.txt
41 @if not os.path.exists('de_DE.orig.aff'): 75 @if not os.path.exists('de_DE.orig.aff'):
42 :copy de_DE.aff de_DE.orig.aff 76 :copy de_DE.aff de_DE.orig.aff
43 @if not os.path.exists('de_DE.orig.dic'): 77 @if not os.path.exists('de_DE.orig.dic'):
44 :copy de_DE.dic de_DE.orig.dic 78 :copy de_DE.dic de_DE.orig.dic
45 @if os.path.exists('de_DE.diff'): 79 @if os.path.exists('de_DE.diff'):
46 :sys patch <de_DE.diff 80 :sys patch <de_DE.diff
81
82 de_19.aff de_19.dic: {buildcheck=}
83 :assertpkg unzip patch
84 :fetch $ZIPFILE_19
85 # Move the other files out of the way.
86 @if os.path.exists("de_DE.aff"):
87 :move de_DE.aff de_DE_comb.aff
88 :move de_DE.dic de_DE_comb.dic
89 :move README_de_DE.txt README_de_DE_comb.txt
90
91 :sys $UNZIP $ZIPFILE_19
92 :delete $ZIPFILE_19
93 :delete {f} de_AT.dic
94 :move de_DE.aff de_19.aff
95 :move de_DE.dic de_19.dic
96 :move README_de_DE.txt README_de_19.txt
97
98 @if os.path.exists("de_DE_comb.aff"):
99 :move de_DE_comb.aff de_DE.aff
100 :move de_DE_comb.dic de_DE.dic
101 :move README_de_DE_comb.txt README_de_DE.txt
102 @if not os.path.exists('de_19.orig.aff'):
103 :copy de_19.aff de_19.orig.aff
104 @if not os.path.exists('de_19.orig.dic'):
105 :copy de_19.dic de_19.orig.dic
106 @if os.path.exists('de_19.diff'):
107 :sys patch <de_19.diff
108
109 de_20.aff de_20.dic: {buildcheck=}
110 :assertpkg unzip patch
111 :fetch $ZIPFILE_20
112 :sys $UNZIP $ZIPFILE_20
113 :delete $ZIPFILE_20
114 :move de_DE_neu.aff de_20.aff
115 :move de_DE_neu.dic de_20.dic
116 :move README_de_DE_neu.txt README_de_20.txt
117 @if not os.path.exists('de_20.orig.aff'):
118 :copy de_20.aff de_20.orig.aff
119 @if not os.path.exists('de_20.orig.dic'):
120 :copy de_20.dic de_20.orig.dic
121 @if os.path.exists('de_20.diff'):
122 :sys patch <de_20.diff
123
124 # It appears de_AT.dic is only an additional file for another word list. We
125 # guess it's the old spelling one and concatenate them. Complication is that
126 # de_AT.dic is missing a newline at the end.
127 de_AT.aff de_AT.dic: {buildcheck=} de_19.dic
128 :assertpkg unzip patch
129 :fetch $ZIPFILE_AT
130 :sys $UNZIP $ZIPFILE_AT
131 :delete $ZIPFILE_AT
132 :print >>de_AT.dic
133 :cat de_19.dic >>de_AT.dic
134 @if not os.path.exists('de_AT.orig.aff'):
135 :copy de_AT.aff de_AT.orig.aff
136 @if not os.path.exists('de_AT.orig.dic'):
137 :copy de_AT.dic de_AT.orig.dic
138 @if os.path.exists('de_AT.diff'):
139 :sys patch <de_AT.diff
140
141 de_CH.aff de_CH.dic: {buildcheck=}
142 :assertpkg unzip patch
143 :fetch $ZIPFILE_CH
144 :sys $UNZIP $ZIPFILE_CH
145 :delete $ZIPFILE_CH
146 @if not os.path.exists('de_CH.orig.aff'):
147 :copy de_CH.aff de_CH.orig.aff
148 @if not os.path.exists('de_CH.orig.dic'):
149 :copy de_CH.dic de_CH.orig.dic
150 @if os.path.exists('de_CH.diff'):
151 :sys patch <de_CH.diff
47 152
48 153
49 # Generate diff files, so that others can get the OpenOffice files and apply 154 # Generate diff files, so that others can get the OpenOffice files and apply
50 # the diffs to get the Vim versions. 155 # the diffs to get the Vim versions.
51
52 diff: 156 diff:
53 :assertpkg diff 157 :assertpkg diff
54 :sys {force} diff -a -C 1 de_DE.orig.aff de_DE.aff >de_DE.diff 158 :sys {force} diff -a -C 1 de_DE.orig.aff de_DE.aff >de_DE.diff
55 :sys {force} diff -a -C 1 de_DE.orig.dic de_DE.dic >>de_DE.diff 159 :sys {force} diff -a -C 1 de_DE.orig.dic de_DE.dic >>de_DE.diff
160 :sys {force} diff -a -C 1 de_19.orig.aff de_19.aff >de_19.diff
161 :sys {force} diff -a -C 1 de_19.orig.dic de_19.dic >>de_19.diff
162 :sys {force} diff -a -C 1 de_20.orig.aff de_20.aff >de_20.diff
163 :sys {force} diff -a -C 1 de_20.orig.dic de_20.dic >>de_20.diff
164 :sys {force} diff -a -C 1 de_AT.orig.aff de_AT.aff >de_AT.diff
165 :sys {force} diff -a -C 1 de_AT.orig.dic de_AT.dic >>de_AT.diff
166 :sys {force} diff -a -C 1 de_CH.orig.aff de_CH.aff >de_CH.diff
167 :sys {force} diff -a -C 1 de_CH.orig.dic de_CH.dic >>de_CH.diff
56 168
57 169
58 # Check for updated OpenOffice spell files. When there are changes the 170 # Check for updated OpenOffice spell files. When there are changes the
59 # ".new.aff" and ".new.dic" files are left behind for manual inspection. 171 # ".new.aff" and ".new.dic" files are left behind for manual inspection.
60 172
61 check: 173 check:
174 :print TODO!!!!
62 :assertpkg unzip diff 175 :assertpkg unzip diff
63 :fetch $(ZIPFILE) 176 :fetch $ZIPFILE_DE
64 :mkdir tmp 177 :mkdir tmp
65 :cd tmp 178 :cd tmp
66 @try: 179 @try:
67 @import stat 180 @import stat
68 :sys $(UNZIP) ../$(ZIPFILE) 181 :sys $UNZIP ../$ZIPFILE_DE
69 :move de_DE_comb.aff de_DE.aff 182 :move de_DE_comb.aff de_DE.aff
70 :move de_DE_comb.dic de_DE.dic 183 :move de_DE_comb.dic de_DE.dic
71 :sys {force} diff ../de_DE.orig.aff de_DE.aff >d 184 :sys {force} diff ../de_DE.orig.aff de_DE.aff >d
72 @if os.stat('d')[stat.ST_SIZE] > 0: 185 @if os.stat('d')[stat.ST_SIZE] > 0:
73 :copy de_DE.aff ../de_DE.new.aff 186 :copy de_DE.aff ../de_DE.new.aff
75 @if os.stat('d')[stat.ST_SIZE] > 0: 188 @if os.stat('d')[stat.ST_SIZE] > 0:
76 :copy de_DE.dic ../de_DE.new.dic 189 :copy de_DE.dic ../de_DE.new.dic
77 @finally: 190 @finally:
78 :cd .. 191 :cd ..
79 :delete {r}{f}{q} tmp 192 :delete {r}{f}{q} tmp
80 :delete $(ZIPFILE) 193 :delete $ZIPFILE_DE
81 194
82 195
83 # vim: set sts=4 sw=4 : 196 # vim: set sts=4 sw=4 :