Debian Codegraph @

apertium-dan-0.6.1/Makefile.am

raw
1 ###############################################################################
2 ## Makefile for apertium-dan
3 ###############################################################################
4
5 LANG1=dan
6 BASENAME=apertium-$(LANG1)
7
8 TARGETS_COMMON = $(LANG1).automorf.bin \
9 $(LANG1).autogen.bin $(LANG1).autopgen.bin \
10 $(LANG1).automorf.att.gz $(LANG1).autogen.att.gz \
11 $(LANG1).rlx.bin
12
13 # Use this goal for creating .deps, otherwise make -j2 will give problems:
14 @ap_include@
15
16 ###############################################################################
17 ## Danish transducer
18 ###############################################################################
19
20 $(LANG1).autogen.bin: $(BASENAME).$(LANG1).dix .deps/.d
21 apertium-validate-dictionary $<
22 lt-comp rl $< $@ $(BASENAME).$(LANG1).acx
23
24 $(LANG1).automorf.bin: $(BASENAME).$(LANG1).dix
25 apertium-validate-dictionary $<
26 test ! -f ./test-scandivoc || ./test-scandivoc
27 lt-comp lr $< $@ $(BASENAME).$(LANG1).acx
28
29 $(LANG1).autogen.att.gz: $(LANG1).autogen.bin
30 lt-print $< | gzip -9 -c -n > $@
31
32 $(LANG1).automorf.att.gz: $(LANG1).automorf.bin
33 lt-print $< | gzip -9 -c -n > $@
34
35 $(LANG1).autopgen.bin: $(BASENAME).post-$(LANG1).dix
36 lt-comp lr $< $@
37
38 ###############################################################################
39 ## Disambiguation rules
40 ###############################################################################
41
42 $(LANG1).rlx.bin: $(BASENAME).$(LANG1).rlx
43 cg-comp $< $@
44
45 ###############################################################################
46 ## Distribution
47 ###############################################################################
48 EXTRA_DIST=$(BASENAME).$(LANG1).dix \
49 $(BASENAME).$(LANG1).acx \
50 $(BASENAME).$(LANG1).rlx \
51 $(BASENAME).post-$(LANG1).dix \
52 $(LANG1).prob \
53 modes.xml
54
55 ###############################################################################
56 ## Installation stuff
57 ###############################################################################
58 #
59 # apertium_dan_dir: This is where the compiled binaries go
60 # apertium_dan_srcdir: This is where the source files go
61
62 apertium_dandir=$(prefix)/share/apertium/$(BASENAME)/
63 apertium_dan_srcdir=$(prefix)/share/apertium/$(BASENAME)/
64
65 apertium_dan_DATA=$(TARGETS_COMMON) $(LANG1).prob
66
67 pkgconfigdir = $(prefix)/share/pkgconfig
68 pkgconfig_DATA = $(BASENAME).pc
69
70 # Modes are not installed since they're all just "debug modes". All
71 # modes are created by this goal.
72 modes/$(LANG1)-morph.mode: modes.xml
73 apertium-validate-modes modes.xml
74 apertium-gen-modes modes.xml
75
76 noinst_DATA=modes/$(LANG1)-morph.mode
77
78 install-data-local: install-modes
79 test -d $(DESTDIR)$(apertium_dan_srcdir) || mkdir -p $(DESTDIR)$(apertium_dan_srcdir)
80 $(INSTALL_DATA) $(BASENAME).$(LANG1).dix $(DESTDIR)$(apertium_dan_srcdir)
81 $(INSTALL_DATA) $(BASENAME).$(LANG1).rlx $(DESTDIR)$(apertium_dan_srcdir)
82 $(INSTALL_DATA) $(BASENAME).post-$(LANG1).dix $(DESTDIR)$(apertium_dan_srcdir)
83
84 CLEANFILES = $(TARGETS_COMMON)
85 clean-local:
86 -rm -rf .deps modes
87
88 ###############################################################################
89 ## Test
90 ###############################################################################
91
92 test: all
93 echo "kage" | apertium -d . dan-morph | tee .test-mt
94 @echo "^kage/kage<vblex><inf><actv>/kage<n><ut><sg><ind>/kage<n><ut><sg><ind>$$^./.<sent>$$" > .test-ref
95 @diff .test-ref .test-mt
96 @rm .test-ref .test-mt
97
98 check: test