blob: 3a03bffe0af3b5f5433dc26a7198be255235b85d [file] [log] [blame]
Bram Moolenaar95529562005-08-25 21:21:38 +00001# Aap recipe for Spanish Vim spell files.
2
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
8
9REGIONS = ES MX
10ES_REGIONS = es_$*REGIONS
11
12SPELLDIR = ..
13FILES = es_$*(REGIONS).aff es_$*(REGIONS).dic
14
15ZIPFILE_ES = es_ES.zip
16ZIPFILE_MX = es_MX.zip
17ZIPFILES = $ZIPFILE_ES $ZIPFILE_MX
18
19READMES = README_es_$*(REGIONS).txt
20
21all: $SPELLDIR/es.latin1.spl $SPELLDIR/es.utf-8.spl ../README_es.txt
22
23$SPELLDIR/es.latin1.spl : $FILES
24 :sys env LANG=es_ES.ISO8859-1
25 $VIM -u NONE -e -c "mkspell! $SPELLDIR/es $ES_REGIONS" -c q
26
27$SPELLDIR/es.utf-8.spl : $FILES
28 :sys env LANG=es_ES.UTF-8
29 $VIM -u NONE -e -c "mkspell! $SPELLDIR/es $ES_REGIONS" -c q
30
31../README_es.txt: $READMES
32 :print es_ES >! $target
33 :cat README_es_ES.txt >> $target
34 :print =================================================== >>$target
35 :print es_MX >> $target
36 :cat README_es_MX.txt >> $target
37
38#
39# Fetching the files from the OpenOffice.org site.
40# The OLDSPELL file comes from elsewhere
41#
42OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
43:attr {fetch = $OODIR/%file%} $ZIPFILES
44
45# The files don't depend on the .zip file so that we can delete it.
46# Only download the zip file if the targets don't exist.
47es_ES.aff es_ES.dic: {buildcheck=}
48 :assertpkg unzip patch
49 :fetch $ZIPFILE_ES
50 :sys $UNZIP $ZIPFILE_ES
Bram Moolenaar57657d82006-04-21 22:12:41 +000051 :delete Changelog_es_ES.txt
Bram Moolenaarc01140a2006-03-24 22:21:52 +000052 :delete $ZIPFILE_ES
Bram Moolenaar95529562005-08-25 21:21:38 +000053 @if not os.path.exists('es_ES.orig.aff'):
54 :copy es_ES.aff es_ES.orig.aff
55 @if not os.path.exists('es_ES.orig.dic'):
56 :copy es_ES.dic es_ES.orig.dic
57 @if os.path.exists('es_ES.diff'):
58 :sys patch <es_ES.diff
59
60es_MX.aff es_MX.dic: {buildcheck=}
61 :assertpkg unzip patch
62 :fetch $ZIPFILE_MX
63 :print No copyright information for es_MX wordlist >! README_es_MX.txt
64 :sys $UNZIP $ZIPFILE_MX
Bram Moolenaarc01140a2006-03-24 22:21:52 +000065 :delete $ZIPFILE_MX
Bram Moolenaar95529562005-08-25 21:21:38 +000066 :sys $VIM -e -c "set ff=unix | wq" es_MX.dic
67 @if not os.path.exists('es_MX.orig.aff'):
68 :copy es_MX.aff es_MX.orig.aff
69 @if not os.path.exists('es_MX.orig.dic'):
70 :copy es_MX.dic es_MX.orig.dic
71 @if os.path.exists('es_MX.diff'):
72 :sys patch <es_MX.diff
73
74
75# Generate diff files, so that others can get the OpenOffice files and apply
76# the diffs to get the Vim versions.
77diff:
78 :assertpkg diff
79 :sys {force} diff -a -C 1 es_ES.orig.aff es_ES.aff >es_ES.diff
80 :sys {force} diff -a -C 1 es_ES.orig.dic es_ES.dic >>es_ES.diff
81 :sys {force} diff -a -C 1 es_MX.orig.aff es_MX.aff >es_MX.diff
82 :sys {force} diff -a -C 1 es_MX.orig.dic es_MX.dic >>es_MX.diff
83
84
85# Check for updated OpenOffice spell files. When there are changes the
86# ".new.aff" and ".new.dic" files are left behind for manual inspection.
87
88check:
89 :print TODO!!!!
90
91
92# vim: set sts=4 sw=4 :