| 1 |
############################################################################### |
| 2 |
## Makefile for apertium-cat |
| 3 |
############################################################################### |
| 4 |
|
| 5 |
LANG1=cat |
| 6 |
BASENAME=apertium-$(LANG1) |
| 7 |
|
| 8 |
VAR1=#deixar en blanc |
| 9 |
VAR2=_valencia_gva |
| 10 |
VAR3=_valencia_uni |
| 11 |
|
| 12 |
TARGETS_COMMON = \ |
| 13 |
$(LANG1)$(VAR1).automorf.bin \ |
| 14 |
$(LANG1)$(VAR1).automorf.att.gz \ |
| 15 |
$(LANG1)$(VAR1).autogen.bin \ |
| 16 |
$(LANG1)$(VAR2).autogen.bin \ |
| 17 |
$(LANG1)$(VAR3).autogen.bin \ |
| 18 |
$(LANG1)$(VAR1).autogen.att.gz \ |
| 19 |
$(LANG1)$(VAR1).autopgen.bin \ |
| 20 |
$(LANG1)$(VAR2).autopgen.bin \ |
| 21 |
$(LANG1)$(VAR3).autopgen.bin \ |
| 22 |
$(LANG1)$(VAR1).autopgen-diacritics-vells.bin \ |
| 23 |
$(LANG1)$(VAR1).autopgen-diacritics-nous.bin \ |
| 24 |
$(LANG1)$(VAR1).rlx.bin |
| 25 |
|
| 26 |
# Use this goal for creating .deps, otherwise make -j2 will give problems: |
| 27 |
@ap_include@ |
| 28 |
|
| 29 |
############################################################################### |
| 30 |
## Catalan transducer |
| 31 |
############################################################################### |
| 32 |
|
| 33 |
$(LANG1)$(VAR1).automorf.bin: $(BASENAME).$(LANG1).dix $(BASENAME).$(LANG1).acx |
| 34 |
apertium-validate-dictionary $< |
| 35 |
lt-comp lr $(BASENAME).$(LANG1).dix $@ $(BASENAME).$(LANG1).acx |
| 36 |
|
| 37 |
.deps/$(BASENAME).$(LANG1).cat.dix: $(BASENAME).$(LANG1).dix .deps/.d |
| 38 |
apertium-validate-dictionary $< |
| 39 |
apertium-genvdix cat $< >$@ |
| 40 |
|
| 41 |
.deps/$(BASENAME).$(LANG1).val_gva.dix: $(BASENAME).$(LANG1).dix .deps/.d |
| 42 |
apertium-validate-dictionary $< |
| 43 |
apertium-genvdix val_gva $< >$@ |
| 44 |
|
| 45 |
.deps/$(BASENAME).$(LANG1).val_uni.dix: $(BASENAME).$(LANG1).dix .deps/.d |
| 46 |
apertium-validate-dictionary $< |
| 47 |
apertium-genvdix val_uni $< >$@ |
| 48 |
|
| 49 |
|
| 50 |
$(LANG1)$(VAR1).autogen.bin: .deps/$(BASENAME).$(LANG1).cat.dix |
| 51 |
apertium-validate-dictionary $< |
| 52 |
lt-comp -v cat rl $< $@ $(BASENAME).$(LANG1).acx |
| 53 |
|
| 54 |
$(LANG1)$(VAR2).autogen.bin: .deps/$(BASENAME).$(LANG1).val_gva.dix |
| 55 |
apertium-validate-dictionary $< |
| 56 |
lt-comp -v val_gva rl $< $@ $(BASENAME).$(LANG1).acx |
| 57 |
|
| 58 |
$(LANG1)$(VAR3).autogen.bin: .deps/$(BASENAME).$(LANG1).val_uni.dix |
| 59 |
apertium-validate-dictionary $< |
| 60 |
lt-comp -v val_uni rl $< $@ $(BASENAME).$(LANG1).acx |
| 61 |
|
| 62 |
$(LANG1)$(VAR1).autogen.att.gz: $(LANG1).autogen.bin |
| 63 |
lt-print $< | gzip -9 -c -n > $@ |
| 64 |
|
| 65 |
$(LANG1)$(VAR1).automorf.att.gz: $(LANG1).automorf.bin |
| 66 |
lt-print $< | gzip -9 -c -n > $@ |
| 67 |
|
| 68 |
$(LANG1)$(VAR1).autopgen.bin: $(BASENAME).post-$(LANG1).dix |
| 69 |
lt-comp -a cat lr $< $@ |
| 70 |
|
| 71 |
$(LANG1)$(VAR2).autopgen.bin: $(BASENAME).post-$(LANG1).dix |
| 72 |
lt-comp -a val_gva lr $< $@ |
| 73 |
|
| 74 |
$(LANG1)$(VAR3).autopgen.bin: $(BASENAME).post-$(LANG1).dix |
| 75 |
lt-comp -a val_uni lr $< $@ |
| 76 |
|
| 77 |
$(LANG1)$(VAR1).autopgen-diacritics-vells.bin: $(BASENAME).post-diacritics-vells.dix |
| 78 |
lt-comp -a cat lr $< $@ |
| 79 |
|
| 80 |
$(LANG1)$(VAR1).autopgen-diacritics-nous.bin: $(BASENAME).post-diacritics-nous.dix |
| 81 |
lt-comp -a cat lr $< $@ |
| 82 |
|
| 83 |
############################################################################### |
| 84 |
## Disambiguation rules |
| 85 |
############################################################################### |
| 86 |
|
| 87 |
$(LANG1).rlx.bin: $(BASENAME).$(LANG1).rlx |
| 88 |
cg-comp $< $@ |
| 89 |
|
| 90 |
############################################################################### |
| 91 |
## Distribution |
| 92 |
############################################################################### |
| 93 |
EXTRA_DIST=$(BASENAME).$(LANG1).dix \ |
| 94 |
$(BASENAME).$(LANG1).acx \ |
| 95 |
$(BASENAME).$(LANG1).rlx \ |
| 96 |
$(BASENAME).post-$(LANG1).dix \ |
| 97 |
$(BASENAME).post-diacritics-vells.dix \ |
| 98 |
$(BASENAME).post-diacritics-nous.dix \ |
| 99 |
$(LANG1).prob \ |
| 100 |
modes.xml |
| 101 |
|
| 102 |
############################################################################### |
| 103 |
## Installation stuff |
| 104 |
############################################################################### |
| 105 |
# |
| 106 |
# apertium_cat_dir: This is where the compiled binaries go |
| 107 |
# apertium_cat_srcdir: This is where the source files go |
| 108 |
|
| 109 |
apertium_catdir=$(prefix)/share/apertium/$(BASENAME)/ |
| 110 |
apertium_cat_srcdir=$(prefix)/share/apertium/$(BASENAME)/ |
| 111 |
|
| 112 |
apertium_cat_DATA=$(TARGETS_COMMON) $(LANG1).prob |
| 113 |
|
| 114 |
pkgconfigdir = $(prefix)/share/pkgconfig |
| 115 |
pkgconfig_DATA = $(BASENAME).pc |
| 116 |
|
| 117 |
# Modes are not installed since they're all just "debug modes". All |
| 118 |
# modes are created by this goal. |
| 119 |
modes/$(LANG1)-morph.mode: modes.xml |
| 120 |
apertium-validate-modes modes.xml |
| 121 |
apertium-gen-modes modes.xml |
| 122 |
|
| 123 |
noinst_DATA=modes/$(LANG1)-morph.mode |
| 124 |
|
| 125 |
install-data-local: install-modes |
| 126 |
test -d $(DESTDIR)$(apertium_cat_srcdir) || mkdir -p $(DESTDIR)$(apertium_cat_srcdir) |
| 127 |
$(INSTALL_DATA) $(BASENAME).$(LANG1).dix $(DESTDIR)$(apertium_cat_srcdir) |
| 128 |
$(INSTALL_DATA) $(BASENAME).$(LANG1).rlx $(DESTDIR)$(apertium_cat_srcdir) |
| 129 |
$(INSTALL_DATA) $(BASENAME).post-$(LANG1).dix $(DESTDIR)$(apertium_cat_srcdir) |
| 130 |
$(INSTALL_DATA) $(BASENAME).post-diacritics-vells.dix $(DESTDIR)$(apertium_cat_srcdir) |
| 131 |
$(INSTALL_DATA) $(BASENAME).post-diacritics-nous.dix $(DESTDIR)$(apertium_cat_srcdir) |
| 132 |
|
| 133 |
CLEANFILES = $(TARGETS_COMMON) |
| 134 |
clean-local: |
| 135 |
-rm -rf .deps modes |
| 136 |
|
| 137 |
############################################################################### |
| 138 |
## Test |
| 139 |
############################################################################### |
| 140 |
|
| 141 |
test: all |
| 142 |
echo "TODO test sentence" | apertium -d . cat-morph | tee .test-mt |
| 143 |
@echo "TODO test analysis results" > .test-ref |
| 144 |
@diff .test-ref .test-mt |
| 145 |
@rm .test-ref .test-mt |
| 146 |
|