]> gitweb.fperrin.net Git - gen-quickdic.git/blob - Makefile
GCIDE conversion
[gen-quickdic.git] / Makefile
1 all: OPTED.v006.quickdic XMLittre.v006.quickdic GCIDE.v006.quickdic
2
3 %.tab_separated: %_to_tab_separated
4         ./$*_to_tab_separated
5
6 %.v007.quickdic: %.tab_separated
7         echo $(dictlang)
8         [ ! -z $(dictlang) ]
9         cd ../DictionaryPC && ./run.sh --dictInfo=@$(CURDIR)/$*-dictinfo.txt --input1Charset=UTF8 --input1Format=tab_separated --input1Name=$* --lang1=$(dictlang) --lang1Stoplist=$(CURDIR)/$*-stoplist.txt --input1=$(CURDIR)/$< --dictOut=$(CURDIR)/$@  --print=$(CURDIR)/$@.txt
10
11 %.v006.quickdic: %.v007.quickdic
12         rm -f $@
13         cd ../DictionaryPC && ./convert_to_v6.sh $(CURDIR)/$< $(CURDIR)/$@
14
15 clean:
16         rm -f *.tab_separated *.chemnitz
17         rm -f *.quickdic *.quickdic.txt
18         rm -fr OPTED/
19
20 GCIDE.v007.quickdic: dictlang := EN
21 IT.v007.quickdic: dictlang := IT
22 OPTED.v007.quickdic: dictlang := EN
23 XMLittre.v007.quickdic: dictlang := FR
24
25 OPTED_SOURCEDIR = OPTED/v003
26
27 OPTED_FILES = $(shell bash -c 'for l in {a..z} new; do echo $(OPTED_SOURCEDIR)/wb1913_$$l.html; done')
28
29 optedv003.hqx:
30         echo Manually run that command to fetch the OPTED raw data
31         echo wget 'http://www.mso.anu.edu.au/~ralph/OPTED/optedv003.hqx'
32         false
33
34 $(OPTED_FILES): optedv003.hqx
35         hexbin -d optedv003.hqx
36         unar -f OPTED.sit.data
37         find OPTED -type f | xargs sed -i 's/\r/\n/g'
38         cd OPTED && patch -p1 < ../OPTED.patch
39
40 OPTED.tab_separated: $(OPTED_FILES) OPTED.patch
41
42 XMLittre.tab_separated: XMLittre-entree.xslt
43 XMLittre.tab_separated: ../xmlittre-data/
44
45 ./xmlittre-data/:
46         echo Manually run that command to fetch XMLittre data
47         echo cd $(CURDIR)/..
48         echo git clone 'https://bitbucket.org/Mytskine/xmlittre-data.git'
49         false