| 
									
										
										
										
											2005-07-27 21:13:01 +00:00
										 |  |  | # Aap recipe for German Vim spell files. | 
					
						
							| 
									
										
										
										
											2005-08-15 21:41:48 +00:00
										 |  |  | # | 
					
						
							|  |  |  | # Since there is a big discussion about whether to use the old or the new | 
					
						
							|  |  |  | # spelling rules, both have been included. | 
					
						
							|  |  |  | #    "de": all possible words allowed | 
					
						
							|  |  |  | # "de_de": old and new German spelling | 
					
						
							|  |  |  | # "de_19": old German spelling | 
					
						
							|  |  |  | # "de_20": new German spelling | 
					
						
							|  |  |  | # "de_AT": Austrian spelling | 
					
						
							|  |  |  | # "de_CH": Swiss spelling | 
					
						
							| 
									
										
										
										
											2005-07-03 21:39:27 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | # Use a freshly compiled Vim if it exists. | 
					
						
							|  |  |  | @if os.path.exists('../../../src/vim'): | 
					
						
							|  |  |  |     VIM = ../../../src/vim | 
					
						
							|  |  |  | @else: | 
					
						
							| 
									
										
										
										
											2005-08-01 07:19:10 +00:00
										 |  |  |     :progsearch VIM vim | 
					
						
							| 
									
										
										
										
											2005-07-03 21:39:27 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2005-08-15 21:41:48 +00:00
										 |  |  | REGIONS = DE 19 20 AT CH | 
					
						
							|  |  |  | DE_REGIONS = de_$*REGIONS | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | SPELLDIR   = .. | 
					
						
							|  |  |  | FILES      = de_$*(REGIONS).aff de_$*(REGIONS).dic | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ZIPFILE_DE = de_DE_comb.zip | 
					
						
							| 
									
										
										
										
											2005-08-25 21:27:31 +00:00
										 |  |  | ZIPFILE_19 = de_OLDSPELL.zip | 
					
						
							| 
									
										
										
										
											2005-08-15 21:41:48 +00:00
										 |  |  | ZIPFILE_20 = de_DE_neu.zip | 
					
						
							| 
									
										
										
										
											2005-08-25 21:27:31 +00:00
										 |  |  | ZIPFILE_AT = de_DE.zip | 
					
						
							| 
									
										
										
										
											2005-08-15 21:41:48 +00:00
										 |  |  | ZIPFILE_CH = de_CH.zip | 
					
						
							|  |  |  | ZIPFILES   = $ZIPFILE_DE $ZIPFILE_19 $ZIPFILE_20 $ZIPFILE_AT $ZIPFILE_CH | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | READMES    = README_de_$*(REGIONS).txt | 
					
						
							| 
									
										
										
										
											2005-07-03 21:39:27 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2005-08-15 21:41:48 +00:00
										 |  |  | all: $SPELLDIR/de.latin1.spl $SPELLDIR/de.utf-8.spl ../README_de.txt | 
					
						
							| 
									
										
										
										
											2005-07-03 21:39:27 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2005-08-16 23:01:50 +00:00
										 |  |  | $SPELLDIR/de.latin1.spl : $FILES | 
					
						
							| 
									
										
										
										
											2005-07-03 21:39:27 +00:00
										 |  |  |         :sys env LANG=de_DE.ISO8859-1 | 
					
						
							| 
									
										
										
										
											2005-08-15 21:41:48 +00:00
										 |  |  | 		$VIM -u NONE -e -c "mkspell! $SPELLDIR/de $DE_REGIONS" -c q | 
					
						
							| 
									
										
										
										
											2005-07-03 21:39:27 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2005-08-16 23:01:50 +00:00
										 |  |  | $SPELLDIR/de.utf-8.spl : $FILES | 
					
						
							| 
									
										
										
										
											2005-07-03 21:39:27 +00:00
										 |  |  |         :sys env LANG=de_DE.UTF-8 | 
					
						
							| 
									
										
										
										
											2005-08-15 21:41:48 +00:00
										 |  |  | 		$VIM -u NONE -e -c "mkspell! $SPELLDIR/de $DE_REGIONS" -c q | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ../README_de.txt: $READMES | 
					
						
							|  |  |  |         :print de_DE (combined) >! $target | 
					
						
							|  |  |  |         :cat README_de_DE.txt   >> $target | 
					
						
							|  |  |  |         :print =================================================== >>$target | 
					
						
							|  |  |  |         :print de_19 (old)      >> $target | 
					
						
							|  |  |  |         :cat README_de_19.txt   >> $target | 
					
						
							|  |  |  |         :print =================================================== >>$target | 
					
						
							|  |  |  |         :print de_20 (new)      >> $target | 
					
						
							|  |  |  |         :cat README_de_20.txt   >> $target | 
					
						
							|  |  |  |         :print =================================================== >>$target | 
					
						
							|  |  |  |         :print de_AT (Austria)  >> $target | 
					
						
							|  |  |  |         :cat README_de_AT.txt   >> $target | 
					
						
							|  |  |  |         :print =================================================== >>$target | 
					
						
							|  |  |  |         :print de_CH (Swiss)    >> $target | 
					
						
							|  |  |  |         :cat README_de_CH.txt   >> $target | 
					
						
							| 
									
										
										
										
											2005-07-03 21:39:27 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | # | 
					
						
							| 
									
										
										
										
											2005-08-25 21:27:31 +00:00
										 |  |  | # Fetching the files from the OpenOffice.org site. | 
					
						
							|  |  |  | # The OLDSPELL file comes from elsewhere | 
					
						
							| 
									
										
										
										
											2005-07-03 21:39:27 +00:00
										 |  |  | # | 
					
						
							|  |  |  | OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries | 
					
						
							| 
									
										
										
										
											2005-08-25 21:27:31 +00:00
										 |  |  | DEDIR = http://www.j3e.de/myspell | 
					
						
							| 
									
										
										
										
											2005-08-15 21:41:48 +00:00
										 |  |  | :attr {fetch = $OODIR/%file%} $ZIPFILES | 
					
						
							| 
									
										
										
										
											2005-08-25 21:27:31 +00:00
										 |  |  | :attr {fetch = $DEDIR/%file%} $ZIPFILE_19 | 
					
						
							| 
									
										
										
										
											2005-07-03 21:39:27 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | # The files don't depend on the .zip file so that we can delete it. | 
					
						
							|  |  |  | # Only download the zip file if the targets don't exist. | 
					
						
							|  |  |  | de_DE.aff de_DE.dic: {buildcheck=} | 
					
						
							|  |  |  |         :assertpkg unzip patch | 
					
						
							| 
									
										
										
										
											2005-08-15 21:41:48 +00:00
										 |  |  |         :fetch $ZIPFILE_DE | 
					
						
							|  |  |  |         :sys $UNZIP $ZIPFILE_DE | 
					
						
							|  |  |  |         :delete $ZIPFILE_DE | 
					
						
							| 
									
										
										
										
											2005-07-03 21:39:27 +00:00
										 |  |  |         :move de_DE_comb.aff de_DE.aff | 
					
						
							|  |  |  |         :move de_DE_comb.dic de_DE.dic | 
					
						
							| 
									
										
										
										
											2005-08-15 21:41:48 +00:00
										 |  |  |         :move README_de_DE_comb.txt README_de_DE.txt | 
					
						
							| 
									
										
										
										
											2005-07-03 21:39:27 +00:00
										 |  |  |         @if not os.path.exists('de_DE.orig.aff'): | 
					
						
							| 
									
										
										
										
											2005-08-15 21:41:48 +00:00
										 |  |  |             :copy de_DE.aff de_DE.orig.aff | 
					
						
							| 
									
										
										
										
											2005-07-03 21:39:27 +00:00
										 |  |  |         @if not os.path.exists('de_DE.orig.dic'): | 
					
						
							| 
									
										
										
										
											2005-08-15 21:41:48 +00:00
										 |  |  |             :copy de_DE.dic de_DE.orig.dic | 
					
						
							| 
									
										
										
										
											2005-08-01 07:19:10 +00:00
										 |  |  |         @if os.path.exists('de_DE.diff'): | 
					
						
							|  |  |  |             :sys patch <de_DE.diff | 
					
						
							| 
									
										
										
										
											2005-07-03 21:39:27 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2005-08-15 21:41:48 +00:00
										 |  |  | de_19.aff de_19.dic: {buildcheck=} | 
					
						
							|  |  |  |         :assertpkg unzip patch | 
					
						
							|  |  |  |         :fetch $ZIPFILE_19 | 
					
						
							|  |  |  |         :sys $UNZIP $ZIPFILE_19 | 
					
						
							|  |  |  |         :delete $ZIPFILE_19 | 
					
						
							| 
									
										
										
										
											2005-08-25 21:27:31 +00:00
										 |  |  |         :move de_OLDSPELL.aff de_19.aff | 
					
						
							|  |  |  |         :move de_OLDSPELL.dic de_19.dic | 
					
						
							|  |  |  |         # there is no README file | 
					
						
							|  |  |  |         :print There is no README file for the old spelling >!README_de_19.txt | 
					
						
							| 
									
										
										
										
											2005-08-15 21:41:48 +00:00
										 |  |  |         @if not os.path.exists('de_19.orig.aff'): | 
					
						
							|  |  |  |             :copy de_19.aff de_19.orig.aff | 
					
						
							|  |  |  |         @if not os.path.exists('de_19.orig.dic'): | 
					
						
							|  |  |  |             :copy de_19.dic de_19.orig.dic | 
					
						
							|  |  |  |         @if os.path.exists('de_19.diff'): | 
					
						
							|  |  |  |             :sys patch <de_19.diff | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | de_20.aff de_20.dic: {buildcheck=} | 
					
						
							|  |  |  |         :assertpkg unzip patch | 
					
						
							|  |  |  |         :fetch $ZIPFILE_20 | 
					
						
							|  |  |  |         :sys $UNZIP $ZIPFILE_20 | 
					
						
							|  |  |  |         :delete $ZIPFILE_20 | 
					
						
							|  |  |  |         :move de_DE_neu.aff de_20.aff | 
					
						
							|  |  |  |         :move de_DE_neu.dic de_20.dic | 
					
						
							|  |  |  |         :move README_de_DE_neu.txt README_de_20.txt | 
					
						
							|  |  |  |         @if not os.path.exists('de_20.orig.aff'): | 
					
						
							|  |  |  |             :copy de_20.aff de_20.orig.aff | 
					
						
							|  |  |  |         @if not os.path.exists('de_20.orig.dic'): | 
					
						
							|  |  |  |             :copy de_20.dic de_20.orig.dic | 
					
						
							|  |  |  |         @if os.path.exists('de_20.diff'): | 
					
						
							|  |  |  |             :sys patch <de_20.diff | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2005-08-25 21:27:31 +00:00
										 |  |  | # The de_AT.dic is included in de_DE.zip.  We rename the files and concatenate | 
					
						
							|  |  |  | # them.  Complication is that de_AT.dic is missing a newline at the end. | 
					
						
							|  |  |  | # And the de_DE.dic file is used for something else. | 
					
						
							|  |  |  | de_AT.aff de_AT.dic: {buildcheck=} | 
					
						
							| 
									
										
										
										
											2005-08-15 21:41:48 +00:00
										 |  |  |         :assertpkg unzip patch | 
					
						
							| 
									
										
										
										
											2005-08-25 21:27:31 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         # Move de_DE files out of the way. | 
					
						
							|  |  |  |         @if os.path.exists('de_DE.aff'): | 
					
						
							|  |  |  |             :move de_DE.aff de_DE.temp.aff | 
					
						
							|  |  |  |         @if os.path.exists('de_DE.dic'): | 
					
						
							|  |  |  |             :move de_DE.dic de_DE.temp.dic | 
					
						
							|  |  |  |         @if os.path.exists('README_de_DE.txt'): | 
					
						
							|  |  |  |             :move README_de_DE.txt README_de_DE.temp.txt | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2005-08-15 21:41:48 +00:00
										 |  |  |         :fetch $ZIPFILE_AT | 
					
						
							|  |  |  |         :sys $UNZIP $ZIPFILE_AT | 
					
						
							|  |  |  |         :delete $ZIPFILE_AT | 
					
						
							| 
									
										
										
										
											2005-08-25 21:27:31 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2005-08-15 21:41:48 +00:00
										 |  |  |         :print >>de_AT.dic | 
					
						
							| 
									
										
										
										
											2005-11-26 23:48:46 +00:00
										 |  |  |         # delete the first line, the word count | 
					
						
							| 
									
										
										
										
											2010-05-14 23:24:24 +02:00
										 |  |  |         :sys $VIM -u NONE de_DE.dic -e -c 1delete -c wq | 
					
						
							| 
									
										
										
										
											2005-08-25 21:27:31 +00:00
										 |  |  |         :cat de_DE.dic >>de_AT.dic | 
					
						
							|  |  |  |         :delete de_DE.dic | 
					
						
							|  |  |  |         :move de_DE.aff de_AT.aff | 
					
						
							|  |  |  |         :move README_de_DE.txt README_de_AT.txt | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         @if os.path.exists('de_DE.temp.aff'): | 
					
						
							|  |  |  |             :move de_DE.temp.aff de_DE.aff | 
					
						
							|  |  |  |         @if os.path.exists('de_DE.temp.dic'): | 
					
						
							|  |  |  |             :move de_DE.temp.dic de_DE.dic | 
					
						
							|  |  |  |         @if os.path.exists('README_de_DE.temp.txt'): | 
					
						
							|  |  |  |             :move README_de_DE.temp.txt README_de_DE.txt | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2005-08-15 21:41:48 +00:00
										 |  |  |         @if not os.path.exists('de_AT.orig.aff'): | 
					
						
							|  |  |  |             :copy de_AT.aff de_AT.orig.aff | 
					
						
							|  |  |  |         @if not os.path.exists('de_AT.orig.dic'): | 
					
						
							|  |  |  |             :copy de_AT.dic de_AT.orig.dic | 
					
						
							|  |  |  |         @if os.path.exists('de_AT.diff'): | 
					
						
							|  |  |  |             :sys patch <de_AT.diff | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | de_CH.aff de_CH.dic: {buildcheck=} | 
					
						
							|  |  |  |         :assertpkg unzip patch | 
					
						
							|  |  |  |         :fetch $ZIPFILE_CH | 
					
						
							|  |  |  |         :sys $UNZIP $ZIPFILE_CH | 
					
						
							|  |  |  |         :delete $ZIPFILE_CH | 
					
						
							|  |  |  |         @if not os.path.exists('de_CH.orig.aff'): | 
					
						
							|  |  |  |             :copy de_CH.aff de_CH.orig.aff | 
					
						
							|  |  |  |         @if not os.path.exists('de_CH.orig.dic'): | 
					
						
							|  |  |  |             :copy de_CH.dic de_CH.orig.dic | 
					
						
							|  |  |  |         @if os.path.exists('de_CH.diff'): | 
					
						
							|  |  |  |             :sys patch <de_CH.diff | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2005-07-03 21:39:27 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | # Generate diff files, so that others can get the OpenOffice files and apply | 
					
						
							|  |  |  | # the diffs to get the Vim versions. | 
					
						
							|  |  |  | diff: | 
					
						
							|  |  |  |         :assertpkg diff | 
					
						
							|  |  |  |         :sys {force} diff -a -C 1 de_DE.orig.aff de_DE.aff >de_DE.diff | 
					
						
							|  |  |  |         :sys {force} diff -a -C 1 de_DE.orig.dic de_DE.dic >>de_DE.diff | 
					
						
							| 
									
										
										
										
											2005-08-15 21:41:48 +00:00
										 |  |  |         :sys {force} diff -a -C 1 de_19.orig.aff de_19.aff >de_19.diff | 
					
						
							|  |  |  |         :sys {force} diff -a -C 1 de_19.orig.dic de_19.dic >>de_19.diff | 
					
						
							|  |  |  |         :sys {force} diff -a -C 1 de_20.orig.aff de_20.aff >de_20.diff | 
					
						
							|  |  |  |         :sys {force} diff -a -C 1 de_20.orig.dic de_20.dic >>de_20.diff | 
					
						
							|  |  |  |         :sys {force} diff -a -C 1 de_AT.orig.aff de_AT.aff >de_AT.diff | 
					
						
							|  |  |  |         :sys {force} diff -a -C 1 de_AT.orig.dic de_AT.dic >>de_AT.diff | 
					
						
							|  |  |  |         :sys {force} diff -a -C 1 de_CH.orig.aff de_CH.aff >de_CH.diff | 
					
						
							|  |  |  |         :sys {force} diff -a -C 1 de_CH.orig.dic de_CH.dic >>de_CH.diff | 
					
						
							| 
									
										
										
										
											2005-07-03 21:39:27 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Check for updated OpenOffice spell files.  When there are changes the | 
					
						
							|  |  |  | # ".new.aff" and ".new.dic" files are left behind for manual inspection. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | check: | 
					
						
							| 
									
										
										
										
											2005-11-26 23:48:46 +00:00
										 |  |  |         :assertpkg unzip patch | 
					
						
							|  |  |  |         :fetch $ZIPFILES | 
					
						
							|  |  |  |         :mkdir tmp | 
					
						
							|  |  |  |         :cd tmp | 
					
						
							|  |  |  |         @try: | 
					
						
							|  |  |  |             # Do the _AT one first, it overwrites the _DE files. | 
					
						
							|  |  |  |             :sys $UNZIP ../$ZIPFILE_AT | 
					
						
							|  |  |  |             :print >>de_AT.dic | 
					
						
							|  |  |  |             # delete the first line, the word count | 
					
						
							| 
									
										
										
										
											2010-05-14 23:24:24 +02:00
										 |  |  |             :sys ../$VIM -u NONE de_DE.dic -e -c 1delete -c wq | 
					
						
							| 
									
										
										
										
											2005-11-26 23:48:46 +00:00
										 |  |  |             :cat de_DE.dic >>de_AT.dic | 
					
						
							|  |  |  |             :delete de_DE.dic | 
					
						
							|  |  |  |             :move de_DE.aff de_AT.aff | 
					
						
							|  |  |  |             :move README_de_DE.txt README_de_AT.txt | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             :sys $UNZIP ../$ZIPFILE_DE | 
					
						
							|  |  |  |             :move de_DE_comb.aff de_DE.aff | 
					
						
							|  |  |  |             :move de_DE_comb.dic de_DE.dic | 
					
						
							|  |  |  |             :move README_de_DE_comb.txt README_de_DE.txt | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             :sys $UNZIP ../$ZIPFILE_19 | 
					
						
							|  |  |  |             :move de_OLDSPELL.aff de_19.aff | 
					
						
							|  |  |  |             :move de_OLDSPELL.dic de_19.dic | 
					
						
							|  |  |  |             # there is no README file | 
					
						
							|  |  |  |             :print There is no README file for the old spelling >!README_de_19.txt | 
					
						
							|  |  |  |             :sys $UNZIP ../$ZIPFILE_20 | 
					
						
							|  |  |  |             :move de_DE_neu.aff de_20.aff | 
					
						
							|  |  |  |             :move de_DE_neu.dic de_20.dic | 
					
						
							|  |  |  |             :move README_de_DE_neu.txt README_de_20.txt | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             :sys $UNZIP ../$ZIPFILE_CH | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             @import stat | 
					
						
							|  |  |  |             @for nm in ['de_DE', 'de_19', 'de_20', 'de_AT', 'de_CH']: | 
					
						
							|  |  |  |                 @for ext in ['aff', 'dic']: | 
					
						
							|  |  |  |                     :sys {force} diff ../$(nm).orig.$ext $(nm).$ext >d | 
					
						
							|  |  |  |                     @if os.stat('d')[stat.ST_SIZE] > 0: | 
					
						
							|  |  |  |                         :copy $(nm).$ext ../$(nm).new.$ext | 
					
						
							|  |  |  |                 :sys {force} diff ../README_$(nm).txt README_$(nm).txt >d | 
					
						
							|  |  |  |                 @if os.stat('d')[stat.ST_SIZE] > 0: | 
					
						
							|  |  |  |                     :copy README_$(nm).txt ../README_$(nm).new.txt | 
					
						
							|  |  |  |         @finally: | 
					
						
							|  |  |  |             :cd .. | 
					
						
							|  |  |  |             :delete {r}{f}{q} tmp | 
					
						
							|  |  |  |             :delete $ZIPFILES | 
					
						
							| 
									
										
										
										
											2005-07-03 21:39:27 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # vim: set sts=4 sw=4 : |