Debian Codegraph @

apertium-spa-1.2.1/Makefile.am

raw
1 ###############################################################################
2 ## Makefile for apertium-spa
3 ###############################################################################
4
5 LANG1=spa
6 BASENAME=apertium-$(LANG1)
7
8 TARGETS_COMMON = \
9 $(LANG1).automorf.bin \
10 $(LANG1).automorf.att.gz \
11 $(LANG1).autogen.bin \
12 $(LANG1).autogen.att.gz \
13 $(LANG1).autopgen.bin \
14 $(LANG1).rlx.bin \
15 $(LANG1).lrx.bin
16
17 # Use this goal for creating .deps, otherwise make -j2 will give problems:
18 @ap_include@
19
20 ###############################################################################
21 ## Spanish transducer
22 ###############################################################################
23
24 .deps/$(BASENAME).$(LANG1).dix: $(BASENAME).$(LANG1).metadix .deps/.d
25 python3 convert-metadix-dix.py $< $@
26 apertium-validate-dictionary $@
27
28 $(LANG1).autogen.bin: .deps/$(BASENAME).$(LANG1).dix
29 apertium-validate-dictionary $<
30 lt-comp rl $< $@
31
32 $(LANG1).automorf.bin: .deps/$(BASENAME).$(LANG1).dix $(BASENAME).$(LANG1).acx
33 apertium-validate-dictionary $<
34 lt-comp lr .deps/$(BASENAME).$(LANG1).dix $@ $(BASENAME).$(LANG1).acx
35
36 $(LANG1).autogen.att.gz: $(LANG1).autogen.bin
37 lt-print $< | gzip -9 -c -n > $@
38
39 $(LANG1).automorf.att.gz: $(LANG1).automorf.bin
40 lt-print $< | gzip -9 -c -n > $@
41
42 $(LANG1).autopgen.bin: $(BASENAME).post-$(LANG1).dix
43 lt-comp lr $< $@
44
45 ###############################################################################
46 ## Morph disambiguation rules
47 ###############################################################################
48
49 $(LANG1).lrx.bin: $(BASENAME).$(LANG1).lrx
50 lrx-comp $< $@
51
52 ###############################################################################
53 ## Disambiguation rules
54 ###############################################################################
55
56 $(LANG1).rlx.bin: $(BASENAME).$(LANG1).rlx
57 cg-comp $< $@
58
59 ###############################################################################
60 ## Distribution
61 ###############################################################################
62 EXTRA_DIST=$(BASENAME).$(LANG1).metadix \
63 $(BASENAME).post-$(LANG1).dix \
64 $(BASENAME).$(LANG1).acx \
65 $(BASENAME).$(LANG1).rlx \
66 $(BASENAME).$(LANG1).lrx \
67 $(LANG1).prob \
68 modes.xml
69
70 ###############################################################################
71 ## Installation stuff
72 ###############################################################################
73 #
74 # apertium_spa_dir: This is where the compiled binaries go
75 # apertium_spa_srcdir: This is where the source files go
76
77 apertium_spadir=$(prefix)/share/apertium/$(BASENAME)/
78 apertium_spa_srcdir=$(prefix)/share/apertium/$(BASENAME)/
79
80 apertium_spa_DATA=$(TARGETS_COMMON) $(LANG1).prob $(BASENAME).$(LANG1).acx
81
82 pkgconfigdir = $(prefix)/share/pkgconfig
83 pkgconfig_DATA = $(BASENAME).pc
84
85 noinst_DATA=modes/$(LANG1)-morph.mode
86
87 install-data-local: install-modes
88 $(INSTALL_DATA) $(BASENAME).$(LANG1).metadix $(DESTDIR)$(apertium_spa_srcdir)
89 $(INSTALL_DATA) $(BASENAME).$(LANG1).rlx $(DESTDIR)$(apertium_spa_srcdir)
90
91 CLEANFILES = $(TARGETS_COMMON)
92 clean-local:
93 -rm -rf .deps modes
94
95
96 ###############################################################################
97 ## Test
98 ###############################################################################
99
100 test: all
101 echo "frase de prueba" | apertium -d . spa-tagger | tee .test-mt
102 @echo '^frase<n><f><sg>$$ ^de<pr>$$ ^prueba<n><f><sg>$$^.<sent>$$' > .test-ref
103 @diff .test-ref .test-mt
104 @rm .test-ref .test-mt
105 bash -x dev/test-grep.sh