Moving oc-ca
[apertium.git] / trunk / apertium-oc-ca / Makefile.am
blob4f8366e9d8f97f16426cc9564fa3ed54ed82df8a
1 VERSION=1.0.2
2 LANG1=oc
3 LANG2=ca
4 LANG1b=oc@aran
5 LANG2b=ca@aran
6 PREFIX1=$(LANG1)-$(LANG2)
7 PREFIX1b=$(LANG1b)-$(LANG2)
8 PREFIX2=$(LANG2)-$(LANG1)
9 PREFIX2b=$(LANG2)-$(LANG1b)
10 INSTALL_MODES=oc-ca.mode ca-oc.mode oc_aran-ca.mode ca-oc_aran.mode
12 BASENAME=apertium-$(PREFIX1)
14 TARGETS_COMMON = $(PREFIX1).automorf.bin $(PREFIX1b).automorf.bin \
15                  $(PREFIX2).automorf.bin $(PREFIX2b).automorf.bin \
16                  $(PREFIX1).autobil.bin $(PREFIX1b).autobil.bin \
17                  $(PREFIX2).autobil.bin $(PREFIX2b).autobil.bin \
18                  $(PREFIX1).autogen.bin $(PREFIX1b).autogen.bin \
19                  $(PREFIX2).autogen.bin $(PREFIX2b).autogen.bin \
20                  $(PREFIX1).autopgen.bin $(PREFIX1b).autopgen.bin \
21                  $(PREFIX2).autopgen.bin $(PREFIX2b).autopgen.bin modes
22      
23 TARGETS = $(TARGETS_COMMON) $(PREFIX1).t1x.bin $(PREFIX1).t2x.bin $(PREFIX1).t3x.bin \
24           $(PREFIX1b).t1x.bin $(PREFIX1b).t2x.bin $(PREFIX1b).t3x.bin \
25           $(PREFIX2).t1x.bin $(PREFIX2).t2x.bin $(PREFIX2).t3x.bin \
26           $(PREFIX2b).t1x.bin $(PREFIX2b).t2x.bin $(PREFIX2b).t3x.bin \
27           $(PREFIX1).t1x $(PREFIX1).t2x $(PREFIX1).t3x \
28           $(PREFIX1b).t1x $(PREFIX1b).t2x $(PREFIX1b).t3x \
29           $(PREFIX2).t1x $(PREFIX2).t2x $(PREFIX2).t3x \
30           $(PREFIX2b).t1x $(PREFIX2b).t2x $(PREFIX2b).t3x
32 .deps/$(LANG1).metadix: $(BASENAME).$(LANG1).metadix
33         xsltproc --stringparam alt $(LANG1) alt.xsl $(BASENAME).$(LANG1).metadix >$@
35 .deps/$(LANG1).dix: .deps/$(LANG1).metadix
36         xsltproc buscaPar.xsl .deps/$(LANG1).metadix | uniq >$$$$tmp1 && \
37         xsltproc $$$$tmp1 .deps/$(LANG1).metadix > $@ && rm $$$$tmp1
39 .deps/$(LANG1b).metadix: $(BASENAME).$(LANG1).metadix
40         xsltproc --stringparam alt $(LANG1b) alt.xsl $(BASENAME).$(LANG1).metadix >$@
42 .deps/$(LANG1b).dix: .deps/$(LANG1b).metadix
43         xsltproc buscaPar.xsl .deps/$(LANG1b).metadix | uniq >$$$$tmp1 && \
44         xsltproc $$$$tmp1 .deps/$(LANG1b).metadix > $@ && rm $$$$tmp1
46 .deps/$(LANG2).dix: $(BASENAME).$(LANG2).dix
47         xsltproc --stringparam alt $(LANG1) alt.xsl $(BASENAME).$(LANG2).dix >$@
49 .deps/$(LANG2b).dix: $(BASENAME).$(LANG2).dix
50         xsltproc --stringparam alt $(LANG1b) alt.xsl $(BASENAME).$(LANG2).dix >$@
52 .deps/$(PREFIX1).dix: $(BASENAME).$(PREFIX1).dix
53         xsltproc --stringparam alt $(LANG1) alt.xsl $(BASENAME).$(PREFIX1).dix >$@
55 .deps/$(PREFIX1b).dix: $(BASENAME).$(PREFIX1).dix
56         xsltproc --stringparam alt $(LANG1b) alt.xsl $(BASENAME).$(PREFIX1).dix >$@
58 .deps/$(PREFIX1).post.dix: $(BASENAME).post-$(LANG2).dix
59         xsltproc --stringparam alt $(LANG1) alt.xsl $(BASENAME).post-$(LANG2).dix >$@
61 .deps/$(PREFIX1b).post.dix: $(BASENAME).post-$(LANG2).dix
62         xsltproc --stringparam alt $(LANG1b) alt.xsl $(BASENAME).post-$(LANG2).dix >$@
64 .deps/$(LANG1).post.dix: $(BASENAME).post-$(LANG1).dix
65         xsltproc --stringparam alt $(LANG1) alt.xsl $(BASENAME).post-$(LANG1).dix >$@
67 .deps/$(LANG1b).post.dix: $(BASENAME).post-$(LANG1).dix
68         xsltproc --stringparam alt $(LANG1b) alt.xsl $(BASENAME).post-$(LANG1).dix >$@
70 .deps/$(LANG2).post.dix: $(BASENAME).post-$(LANG2).dix
71         xsltproc --stringparam alt $(LANG1) alt.xsl $(BASENAME).post-$(LANG2).dix >$@
73 .deps/$(LANG2b).post.dix: $(BASENAME).post-$(LANG2).dix
74         xsltproc --stringparam alt $(LANG1b) alt.xsl $(BASENAME).post-$(LANG2).dix >$@
75                              
76 $(PREFIX1).automorf.bin: .deps/$(LANG1).dix
77         apertium-validate-dictionary .deps/$(LANG1).dix
78         lt-comp lr .deps/$(LANG1).dix $@
80 $(PREFIX1b).automorf.bin: .deps/$(LANG1b).dix
81         apertium-validate-dictionary .deps/$(LANG1b).dix
82         lt-comp lr .deps/$(LANG1b).dix $@
84 $(PREFIX2).automorf.bin: .deps/$(LANG2).dix
85         apertium-validate-dictionary .deps/$(LANG2).dix
86         lt-comp lr .deps/$(LANG2).dix $@
88 $(PREFIX2b).automorf.bin: .deps/$(LANG2b).dix
89         apertium-validate-dictionary .deps/$(LANG2b).dix
90         lt-comp lr .deps/$(LANG2b).dix $@
92 $(PREFIX1).autobil.bin: .deps/$(PREFIX1).dix
93         apertium-validate-dictionary .deps/$(PREFIX1).dix
94         lt-comp lr .deps/$(PREFIX1).dix $@
96 $(PREFIX1b).autobil.bin: .deps/$(PREFIX1b).dix
97         apertium-validate-dictionary .deps/$(PREFIX1b).dix
98         lt-comp lr .deps/$(PREFIX1b).dix $@
100 $(PREFIX2).autobil.bin: .deps/$(PREFIX1).dix
101         apertium-validate-dictionary .deps/$(PREFIX1).dix
102         lt-comp rl .deps/$(PREFIX1).dix $@
104 $(PREFIX2b).autobil.bin: .deps/$(PREFIX1b).dix
105         apertium-validate-dictionary .deps/$(PREFIX1b).dix
106         lt-comp rl .deps/$(PREFIX1b).dix $@
108 $(PREFIX1).autogen.bin: .deps/$(LANG2).dix
109         apertium-validate-dictionary .deps/$(LANG2).dix
110         lt-comp rl .deps/$(LANG2).dix $@
112 $(PREFIX1b).autogen.bin: .deps/$(LANG2b).dix
113         apertium-validate-dictionary .deps/$(LANG2b).dix
114         lt-comp rl .deps/$(LANG2b).dix $@
116 $(PREFIX2).autogen.bin: .deps/$(LANG1).dix
117         apertium-validate-dictionary .deps/$(LANG1).dix
118         lt-comp rl .deps/$(LANG1).dix $@
120 $(PREFIX2b).autogen.bin: .deps/$(LANG1b).dix
121         apertium-validate-dictionary .deps/$(LANG1b).dix
122         lt-comp rl .deps/$(LANG1b).dix $@
124 $(PREFIX1).autopgen.bin: .deps/$(LANG2).post.dix
125         apertium-validate-dictionary .deps/$(LANG2).post.dix
126         lt-comp lr .deps/$(LANG2).post.dix $@
128 $(PREFIX1b).autopgen.bin: .deps/$(LANG2b).post.dix
129         apertium-validate-dictionary .deps/$(LANG2b).post.dix
130         lt-comp lr .deps/$(LANG2b).post.dix $@
132 $(PREFIX2).autopgen.bin: .deps/$(LANG1).post.dix
133         apertium-validate-dictionary .deps/$(LANG1).post.dix
134         lt-comp lr .deps/$(LANG1).post.dix $@
136 $(PREFIX2b).autopgen.bin: .deps/$(LANG1b).post.dix
137         apertium-validate-dictionary .deps/$(LANG1b).post.dix
138         lt-comp lr .deps/$(LANG1b).post.dix $@
139         
140 $(PREFIX1).t1x: $(BASENAME).$(PREFIX1).t1x
141         xsltproc --stringparam alt $(LANG1) alt.xsl $(BASENAME).$(PREFIX1).t1x > $@
142         apertium-validate-transfer $@
144 $(PREFIX1b).t1x: $(BASENAME).$(PREFIX1).t1x
145         xsltproc --stringparam alt $(LANG1b) alt.xsl $(BASENAME).$(PREFIX1).t1x > $@
146         apertium-validate-transfer $@
148 $(PREFIX2).t1x: $(BASENAME).$(PREFIX2).t1x
149         xsltproc --stringparam alt $(LANG1) alt.xsl $(BASENAME).$(PREFIX2).t1x > $@
150         apertium-validate-transfer $@
152 $(PREFIX2b).t1x: $(BASENAME).$(PREFIX2).t1x
153         xsltproc --stringparam alt $(LANG1b) alt.xsl $(BASENAME).$(PREFIX2).t1x > $@
154         apertium-validate-transfer $@
156 $(PREFIX1).t2x: $(BASENAME).$(PREFIX1).t2x
157         xsltproc --stringparam alt $(LANG1) alt.xsl $(BASENAME).$(PREFIX1).t2x > $@
158         apertium-validate-interchunk $@
160 $(PREFIX1b).t2x: $(BASENAME).$(PREFIX1).t2x
161         xsltproc --stringparam alt $(LANG1b) alt.xsl $(BASENAME).$(PREFIX1).t2x > $@
162         apertium-validate-interchunk $@
164 $(PREFIX2).t2x: $(BASENAME).$(PREFIX2).t2x
165         xsltproc --stringparam alt $(LANG1) alt.xsl $(BASENAME).$(PREFIX2).t2x > $@
166         apertium-validate-interchunk $@
168 $(PREFIX2b).t2x: $(BASENAME).$(PREFIX2).t2x
169         xsltproc --stringparam alt $(LANG1b) alt.xsl $(BASENAME).$(PREFIX2).t2x > $@
170         apertium-validate-interchunk $@
171         
172 $(PREFIX1).t3x: $(BASENAME).$(PREFIX1).t3x
173         xsltproc --stringparam alt $(LANG1) alt.xsl $(BASENAME).$(PREFIX1).t3x > $@
174         apertium-validate-postchunk $@
176 $(PREFIX1b).t3x: $(BASENAME).$(PREFIX1).t3x
177         xsltproc --stringparam alt $(LANG1b) alt.xsl $(BASENAME).$(PREFIX1).t3x > $@
178         apertium-validate-postchunk $@
180 $(PREFIX2).t3x: $(BASENAME).$(PREFIX2).t3x
181         xsltproc --stringparam alt $(LANG1) alt.xsl $(BASENAME).$(PREFIX2).t3x > $@
182         apertium-validate-postchunk $@
184 $(PREFIX2b).t3x: $(BASENAME).$(PREFIX2).t3x
185         xsltproc --stringparam alt $(LANG1b) alt.xsl $(BASENAME).$(PREFIX2).t3x > $@
186         apertium-validate-postchunk $@
188 $(PREFIX1).t1x.bin: $(PREFIX1).t1x
189         apertium-preprocess-transfer $(PREFIX1).t1x $@
191 $(PREFIX1b).t1x.bin: $(PREFIX1b).t1x
192         apertium-preprocess-transfer $(PREFIX1b).t1x $@
194 $(PREFIX2).t1x.bin: $(PREFIX2).t1x
195         apertium-preprocess-transfer $(PREFIX2).t1x $@
197 $(PREFIX2b).t1x.bin: $(PREFIX2b).t1x
198         apertium-preprocess-transfer $(PREFIX2b).t1x $@
200 $(PREFIX1).t2x.bin: $(PREFIX1).t2x
201         apertium-preprocess-transfer $(PREFIX1).t2x $@
203 $(PREFIX1b).t2x.bin: $(PREFIX1b).t2x
204         apertium-preprocess-transfer $(PREFIX1b).t2x $@
206 $(PREFIX2).t2x.bin: $(PREFIX2).t2x
207         apertium-preprocess-transfer $(PREFIX2).t2x $@
209 $(PREFIX2b).t2x.bin: $(PREFIX2b).t2x
210         apertium-preprocess-transfer $(PREFIX2b).t2x $@
212 $(PREFIX1).t3x.bin: $(PREFIX1).t3x
213         apertium-preprocess-transfer $(PREFIX1).t3x $@
215 $(PREFIX1b).t3x.bin: $(PREFIX1b).t3x
216         apertium-preprocess-transfer $(PREFIX1b).t3x $@
218 $(PREFIX2).t3x.bin: $(PREFIX2).t3x
219         apertium-preprocess-transfer $(PREFIX2).t3x $@
221 $(PREFIX2b).t3x.bin: $(PREFIX2b).t3x
222         apertium-preprocess-transfer $(PREFIX2b).t3x $@
224 EXTRA_DIST=$(BASENAME).$(PREFIX1).dix \
225            $(BASENAME).post-$(LANG1).dix $(BASENAME).post-$(LANG2).dix \
226            $(BASENAME).$(LANG2).dix $(BASENAME).$(LANG1).tsx \
227            $(BASENAME).$(LANG2).tsx $(PREFIX1).prob $(PREFIX2).prob \
228            $(PREFIX1b).prob $(PREFIX2b).prob \
229            buscaPar.xsl principal.xsl $(BASENAME).$(LANG1).metadix modes.xml \
230            $(PREFIX1)-supervised.make $(PREFIX1)-unsupervised.make \
231            $(PREFIX2)-supervised.make $(PREFIX2)-unsupervised.make \
232            $(LANG1)-tagger-data/README $(LANG2)-tagger-data/README 
233                                   
234 modes: modes.xml Makefile.am
235         apertium-gen-modes modes.xml
236         @cp *.mode modes
237         
238 $(INSTALL_MODES): modes.xml Makefile.am
239         apertium-gen-modes modes.xml
240         @cp *.mode modes
242 apertium_oc_cadir=$(prefix)/share/apertium/apertium-$(PREFIX1)/
243 apertium_oc_camodesdir=$(prefix)/share/apertium/modes/
244                    
245 apertium_oc_ca_DATA=$(PREFIX1).automorf.bin $(PREFIX2).automorf.bin \
246                     $(PREFIX1).autobil.bin $(PREFIX2).autobil.bin \
247                     $(PREFIX1).autogen.bin $(PREFIX2).autogen.bin \
248                     $(PREFIX1).autopgen.bin $(PREFIX2).autopgen.bin \
249                     $(PREFIX1b).automorf.bin $(PREFIX2b).automorf.bin \
250                     $(PREFIX1b).autobil.bin $(PREFIX2b).autobil.bin \
251                     $(PREFIX1b).autogen.bin $(PREFIX2b).autogen.bin \
252                     $(PREFIX1b).autopgen.bin $(PREFIX2b).autopgen.bin \
253                     $(PREFIX1).prob $(PREFIX2).prob $(PREFIX1b).prob $(PREFIX2b).prob \
254                     $(PREFIX1).t1x.bin $(PREFIX1).t2x.bin $(PREFIX1).t3x.bin \
255                     $(PREFIX1b).t1x.bin $(PREFIX1b).t2x.bin $(PREFIX1b).t3x.bin \
256                     $(PREFIX2).t1x.bin $(PREFIX2).t2x.bin $(PREFIX2).t3x.bin \
257                     $(PREFIX2b).t1x.bin $(PREFIX2b).t2x.bin $(PREFIX2b).t3x.bin \
258                     $(PREFIX1).t1x $(PREFIX1).t2x $(PREFIX1).t3x \
259                     $(PREFIX1b).t1x $(PREFIX1b).t2x $(PREFIX1b).t3x \
260                     $(PREFIX2).t1x $(PREFIX2).t2x $(PREFIX2).t3x \
261                     $(PREFIX2b).t1x $(PREFIX2b).t2x $(PREFIX2b).t3x \
262                     $(INSTALL_MODES) 
264 install-data-local:
265         apertium-gen-modes modes.xml apertium-$(PREFIX1)
266         $(INSTALL_DATA) oc-ca.mode $(apertium_oc_camodesdir)
267         $(INSTALL_DATA) ca-oc.mode $(apertium_oc_camodesdir)
268         $(INSTALL_DATA) oc_aran-ca.mode $(apertium_oc_camodesdir)
269         $(INSTALL_DATA) ca-oc_aran.mode $(apertium_oc_camodesdir)
270         
271 CLEANFILES = -r $(TARGETS)