forked from apertium/apertium-ell-eng
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.am
145 lines (110 loc) · 5.27 KB
/
Makefile.am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
VERSION=0.1.0
LANG1=ell
LANG2=eng
PREFIX1=$(LANG1)-$(LANG2)
PREFIX2=$(LANG2)-$(LANG1)
BASENAME=apertium-$(PREFIX1)
TARGETS_COMMON = $(PREFIX1).automorf.bin $(PREFIX1).autobil.bin $(PREFIX1).autogen.bin \
$(PREFIX1).autopgen.bin $(PREFIX2).automorf.bin $(PREFIX2).autobil.bin \
$(PREFIX2).autogen.bin $(PREFIX2).autopgen.bin \
$(PREFIX1).autolex.bin $(PREFIX1).rlx.bin \
$(PREFIX2).autolex.bin $(PREFIX2).rlx.bin \
$(PREFIX1).t1x.bin $(PREFIX1).t2x.bin $(PREFIX1).t3x.bin \
$(PREFIX2).t1x.bin $(PREFIX2).t2x.bin $(PREFIX2).t3x.bin \
$(PREFIX1).prob $(PREFIX2).prob
#$(PREFIX2).prob
$(PREFIX1).automorf.bin: $(AP_SRC1)/apertium-$(LANG1).$(LANG1).dix $(AP_SRC1)/apertium-$(LANG1).$(LANG1).acx
apertium-validate-acx $(AP_SRC1)/apertium-$(LANG1).$(LANG1).acx
apertium-validate-dictionary $<
lt-comp lr $< $@ $(AP_SRC1)/apertium-$(LANG1).$(LANG1).acx
$(PREFIX1).autobil.bin: $(BASENAME).$(PREFIX1).dix
apertium-validate-dictionary $(BASENAME).$(PREFIX1).dix
lt-comp lr $(BASENAME).$(PREFIX1).dix $@
#$(PREFIX1).autogen.bin: $(AP_SRC2)/apertium-$(LANG2).$(LANG2).dix
$(PREFIX1).autogen.bin: apertium-$(PREFIX1).$(LANG2).dix
apertium-validate-dictionary $<
lt-comp rl $< $@
#$(PREFIX1).autopgen.bin: $(AP_SRC2)/apertium-$(LANG2).post-$(LANG2).dix
$(PREFIX1).autopgen.bin: apertium-$(PREFIX1).post-$(LANG2).dix
apertium-validate-dictionary $<
lt-comp lr $< $@
#$(PREFIX2).automorf.bin: $(AP_SRC2)/apertium-$(LANG2).$(LANG2).dix $(AP_SRC2)/apertium-$(LANG2).$(LANG2).acx
$(PREFIX2).automorf.bin: apertium-$(PREFIX1).$(LANG2).dix apertium-$(PREFIX1).$(LANG2).acx
apertium-validate-acx apertium-$(PREFIX1).$(LANG2).acx
apertium-validate-dictionary $<
lt-comp lr $< $@ apertium-$(PREFIX1).$(LANG2).acx
$(PREFIX2).autobil.bin: $(BASENAME).$(PREFIX1).dix
apertium-validate-dictionary $<
lt-comp rl $< $@
$(PREFIX2).autogen.bin: $(AP_SRC1)/apertium-$(LANG1).$(LANG1).dix
apertium-validate-dictionary $<
lt-comp rl $< $@
$(PREFIX2).autopgen.bin: $(AP_SRC1)/apertium-$(LANG1).post-$(LANG1).dix
apertium-validate-dictionary $<
lt-comp lr $< $@
$(PREFIX1).t1x.bin: $(BASENAME).$(PREFIX1).t1x
apertium-validate-transfer $(BASENAME).$(PREFIX1).t1x
apertium-preprocess-transfer $(BASENAME).$(PREFIX1).t1x $@
$(PREFIX1).t2x.bin: $(BASENAME).$(PREFIX1).t2x
apertium-validate-interchunk $(BASENAME).$(PREFIX1).t2x
apertium-preprocess-transfer $(BASENAME).$(PREFIX1).t2x $@
$(PREFIX1).t3x.bin: $(BASENAME).$(PREFIX1).t3x
apertium-validate-postchunk $(BASENAME).$(PREFIX1).t3x
apertium-preprocess-transfer $(BASENAME).$(PREFIX1).t3x $@
$(PREFIX2).t1x.bin: $(BASENAME).$(PREFIX2).t1x
apertium-validate-transfer $(BASENAME).$(PREFIX2).t1x
apertium-preprocess-transfer $(BASENAME).$(PREFIX2).t1x $@
$(PREFIX2).t2x.bin: $(BASENAME).$(PREFIX2).t2x
apertium-validate-interchunk $(BASENAME).$(PREFIX2).t2x
apertium-preprocess-transfer $(BASENAME).$(PREFIX2).t2x $@
$(PREFIX2).t3x.bin: $(BASENAME).$(PREFIX2).t3x
apertium-validate-postchunk $(BASENAME).$(PREFIX2).t3x
apertium-preprocess-transfer $(BASENAME).$(PREFIX2).t3x $@
$(PREFIX1).rlx.bin: $(AP_SRC1)/apertium-$(LANG1).$(LANG1).rlx
cg-comp $< $@
#$(PREFIX2).rlx.bin: $(AP_SRC2)/apertium-$(LANG2).$(LANG2).rlx
$(PREFIX2).rlx.bin: apertium-$(PREFIX1).$(PREFIX2).rlx
cg-comp $< $@
$(PREFIX1).autolex.bin: $(BASENAME).$(PREFIX1).lrx
lrx-comp $(BASENAME).$(PREFIX1).lrx $@
$(PREFIX2).autolex.bin: $(BASENAME).$(PREFIX2).lrx
lrx-comp $(BASENAME).$(PREFIX2).lrx $@
$(PREFIX1).prob: $(AP_SRC1)/$(LANG1).prob
cp $< $@
$(PREFIX2).prob:
###############################################################################
## Translation modes
###############################################################################
# All modes are created by this one goal
modes/$(PREFIX1).mode: modes.xml
apertium-validate-modes modes.xml
apertium-gen-modes modes.xml
cp *.mode modes/
EXTRA_DIST=$(BASENAME).$(PREFIX1).dix \
$(BASENAME).$(PREFIX1).lrx \
$(BASENAME).$(PREFIX2).lrx \
$(BASENAME).$(PREFIX1).t1x $(BASENAME).$(PREFIX1).t2x \
$(BASENAME).$(PREFIX1).t3x $(BASENAME).$(PREFIX2).t1x \
$(BASENAME).$(PREFIX2).t2x $(BASENAME).$(PREFIX2).t3x \
modes.xml
apertium_ell_eng_DATA=$(TARGETS_COMMON) modes.xml
apertium_modesdir=$(prefix)/share/apertium/modes/
apertium_ell_engdir=$(prefix)/share/apertium/apertium-$(PREFIX1)/
# All modes are created by the same goal, listing several will just give problems with make -j2
noinst_DATA=modes/$(PREFIX1).mode
install-data-local:
mv modes modes.bak
$(prefix)/bin/apertium-gen-modes modes.xml $(BASENAME)
rm -rf modes
mv modes.bak modes
test -d $(DESTDIR)$(apertium_modesdir) || mkdir $(DESTDIR)$(apertium_modesdir)
modes=`xmllint --xpath '//mode[@install="yes"]/@name' modes.xml | sed 's/ *name="\([^"]*\)"/\1.mode /g'`; \
$(INSTALL_DATA) $$modes $(DESTDIR)$(apertium_modesdir); \
rm $$modes
$(INSTALL_DATA) $(BASENAME).$(PREFIX1).t1x $(DESTDIR)$(apertium_ell_engdir)
$(INSTALL_DATA) $(BASENAME).$(PREFIX1).t2x $(DESTDIR)$(apertium_ell_engdir)
$(INSTALL_DATA) $(BASENAME).$(PREFIX1).t3x $(DESTDIR)$(apertium_ell_engdir)
$(INSTALL_DATA) $(BASENAME).$(PREFIX2).t1x $(DESTDIR)$(apertium_ell_engdir)
$(INSTALL_DATA) $(BASENAME).$(PREFIX2).t2x $(DESTDIR)$(apertium_ell_engdir)
$(INSTALL_DATA) $(BASENAME).$(PREFIX2).t3x $(DESTDIR)$(apertium_ell_engdir)
CLEANFILES = -rf $(TARGETS_COMMON) modes