vim72-20100325-kaoriya-w64j.zip
[MacVim/KaoriYa.git] / runtime / spell / yi / main.aap
blob8a98ce050dab85ece7ca8fd5d8abad360d3ef17a
1 # Aap recipe for Yiddish Vim spell files.
3 # Use a freshly compiled Vim if it exists.
4 @if os.path.exists('../../../src/vim'):
5     VIM = ../../../src/vim
6 @else:
7     :progsearch VIM vim
9 SPELLDIR    = ..
10 FILES       = yi.dic yi.aff
11 WORDFILE    = wordlist.utf8.txt
12 FILES_TR    = yi_tr.dic yi_tr.aff
13 WORDFILE_TR = wordlist.txt
15 all: $SPELLDIR/yi.utf-8.spl $SPELLDIR/yi-tr.utf-8.spl \
16         $SPELLDIR/yi.latin1.spl ../README_yi.txt
18 $SPELLDIR/yi.utf-8.spl : $FILES
19     :sys $VIM -u NONE -e -c "set enc=utf-8"
20             -c "mkspell! $SPELLDIR/yi yi" -c q
22 $SPELLDIR/yi-tr.utf-8.spl : $FILES_TR
23     :sys $VIM -u NONE -e -c "set enc=utf-8"
24             -c "mkspell! $SPELLDIR/yi-tr yi_tr" -c q
26 $SPELLDIR/yi.latin1.spl : $FILES_TR
27     :sys $VIM -u NONE -e -c "set enc=latin1"
28             -c "mkspell! $SPELLDIR/yi yi_tr" -c q
30 ../README_yi.txt : README.txt
31     :copy $source $target
34 # Fetch the word list when needed.
36 URLDIR = http://www.cs.uky.edu/~raphael/yiddish
37 :attr {fetch = $URLDIR/%file%} $WORDFILE $WORDFILE_TR
39 # We use the word list as a .dic file, so that we can use an affix file to
40 # define a few extra things.
41 $FILES: {buildcheck=}
42         :assertpkg patch
43         :fetch $WORDFILE
44         :copy $WORDFILE yi.dic
45         :touch {force} yi.aff
46         @if os.path.exists('yi.diff'):
47             :sys patch < yi.diff
49 $FILES_TR: {buildcheck=}
50         :assertpkg patch
51         :fetch $WORDFILE_TR
52         :copy $WORDFILE_TR yi_tr.dic
53         :touch {force} yi_tr.aff
54         @if os.path.exists('yi_tr.diff'):
55             :sys patch < yi_tr.diff
57 diff {virtual}:
58     :assertpkg diff
59     # Using a context of two lines to work around a bug in FreeBSD patch.
60     :sys {force} diff -a -C 2 $WORDFILE yi.dic > yi.diff
61     :sys {force} diff -a -N -C 1 /dev/null yi.aff >> yi.diff
62     :sys {force} diff -a -C 2 $WORDFILE_TR yi_tr.dic > yi_tr.diff
63     :sys {force} diff -a -N -C 1 /dev/null yi_tr.aff >> yi_tr.diff
65 # vim: set sts=4 sw=4 :