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