Debian Codegraph @

apertium-swe-0.8.1/Makefile.am

raw
1 ###############################################################################
2 ## Makefile for apertium-swe
3 ###############################################################################
4
5 LANG1=swe
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 ## Swedish 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_swe_dir: This is where the compiled binaries go
60 # apertium_swe_srcdir: This is where the source files go
61
62 apertium_swedir=$(prefix)/share/apertium/$(BASENAME)/
63 apertium_swe_srcdir=$(prefix)/share/apertium/$(BASENAME)/
64
65 apertium_swe_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_swe_srcdir) || mkdir -p $(DESTDIR)$(apertium_swe_srcdir)
80 $(INSTALL_DATA) $(BASENAME).$(LANG1).dix $(DESTDIR)$(apertium_swe_srcdir)
81 $(INSTALL_DATA) $(BASENAME).$(LANG1).rlx $(DESTDIR)$(apertium_swe_srcdir)
82 $(INSTALL_DATA) $(BASENAME).post-$(LANG1).dix $(DESTDIR)$(apertium_swe_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 'Pippi var ett mycket märkvärdigt barn' | apertium -d . swe-morph | tee .test-mt
94 @echo '^Pippi/Pippi<np><ant><f>/Pippi<np><ant><f>/pippi<n><ut><sg><ind>/pippi<n><ut><sg><ind>$$ ^var/vara¹<vblex><past><actv>/var<adv>/var<n><nt><sg><ind>/var<adj><pst><un><pl><def>/var<adj><pst><un><pl><ind>/var<adj><pst><fn><sg><def>/var<adj><pst><m><sg><def>/var<adj><pst><nt><sg><ind>/var<adj><pst><ut><sg><ind>/var<n><nt><sg><ind>/var<prn><def><ut><sg><nom>$$ ^ett/en<det><qnt><nt><sg>/en<det><ind><nt><sg>$$ ^mycket/mycket<adv><pst>/mycken<adj><sint><pst><nt><sg><ind>/mycken<prn><pst><ind><nt><sg><nom>$$ ^märkvärdigt/märkvärdig<adj><sint><pst><nt><sg><ind>$$ ^barn/barn<n><nt><sg><ind>/barn<n><nt><pl><ind>/barn<n><nt><sg><ind>/barn<n><nt><pl><ind>$$^./.<sent>$$' > .test-ref
95 @diff .test-ref .test-mt
96 @rm .test-ref .test-mt
97
98 check: test