1
0
forked from GitHub/gf-core

improved paths and Makefile in examples/app ; see README how to compile with just 'make -j'

This commit is contained in:
aarne
2014-05-06 21:42:49 +00:00
parent b6cbe2308b
commit b0504d2c4a
13 changed files with 41 additions and 67 deletions

View File

@@ -1,4 +1,4 @@
--# -path=.:src/chunk:src/translator:../examples/phrasebook/gfos
--# -path=.:../../lib/src/chunk:../../lib/src/translator:../examples/phrasebook/gfos
concrete AppBul of App =

View File

@@ -1,4 +1,4 @@
--# -path=.:src/chunk:src/translator:../examples/phrasebook/gfos
--# -path=.:../../lib/src/chunk:../../lib/src/translator:../examples/phrasebook/gfos
concrete AppChi of App =

View File

@@ -1,4 +1,4 @@
--# -path=.:src/chunk:src/translator:../examples/phrasebook/gfos
--# -path=.:../../lib/src/chunk:../../lib/src/translator:../examples/phrasebook/gfos
concrete AppDut of App =

View File

@@ -1,4 +1,4 @@
--# -path=.:src/chunk:src/translator:../examples/phrasebook/gfos
--# -path=.:../../lib/src/chunk:../../lib/src/translator:../examples/phrasebook/gfos
concrete AppEng of App =

View File

@@ -1,4 +1,4 @@
--# -path=.:src/chunk:src/finnish/stemmed:src/finnish:src/api:src/translator:../examples/phrasebook/gfos
--# -path=.:../../lib/src/chunk:../../lib/src/finnish/stemmed:../../lib/src/finnish:src/api:../../lib/src/translator:../examples/phrasebook/gfos
concrete AppFin of App =

View File

@@ -1,4 +1,4 @@
--# -path=.:src/chunk:src/translator:../examples/phrasebook/gfos
--# -path=.:../../lib/src/chunk:../../lib/src/translator:../examples/phrasebook/gfos
concrete AppFre of App =

View File

@@ -1,4 +1,4 @@
--# -path=.:src/chunk:src/translator:../examples/phrasebook/gfos
--# -path=.:../../lib/src/chunk:../../lib/src/translator:../examples/phrasebook/gfos:alltenses::../../lib/src/german
concrete AppGer of App =

View File

@@ -1,4 +1,4 @@
--# -path=.:src/chunk:src/translator:../examples/phrasebook/gfos
--# -path=.:../../lib/src/chunk:../../lib/src/translator:../examples/phrasebook/gfos
concrete AppHin of App =

View File

@@ -1,4 +1,4 @@
--# -path=.:src/chunk:src/translator:../examples/phrasebook/gfos
--# -path=.:../../lib/src/chunk:../../lib/src/translator:../examples/phrasebook/gfos
concrete AppIta of App =

View File

@@ -1,4 +1,5 @@
--# -path=.:src/chunk:src/translator:../examples/phrasebook/gfos
--# -path=.:../../lib/src/chunk:../../lib/src/translator:../examples/phrasebook/gfos
concrete AppSpa of App =

View File

@@ -1,4 +1,4 @@
--# -path=.:src/chunk:src/translator:../examples/phrasebook/gfos
--# -path=.:../../lib/src/chunk:../../lib/src/translator:../examples/phrasebook/gfos
concrete AppSwe of App =
TranslateSwe - [

View File

@@ -1,42 +1,25 @@
all: AppEng.pgf AppSwe.pgf AppBul.pgf AppIta.pgf AppSpa.pgf AppFre.pgf AppGer.pgf AppHin.pgf AppChi.pgf AppFin.pgf App10
all: Phrasebook App11.pgf
PROBSFILE=./app.probs
GFODIR=./gfos
.Phony: Phrasebook
Phrasebook:
cd ../phrasebook ; make forApp ; cd ../app
S=-s
GFMKT=mkdir -p $(GFODIR) && gf $S -make -literal=Symb -probs=$(PROBSFILE) -gfo-dir $(GFODIR)
APP=AppEng.pgf AppBul.pgf AppChi.pgf AppGer.pgf AppSwe.pgf AppHin.pgf AppFin.pgf AppFre.pgf AppIta.pgf AppSpa.pgf AppDut.pgf
# Dummy targets, just for convenience
App: AppEng AppBul AppChi AppGer AppSwe AppHin AppFin AppFre AppIta AppSpa App10
AppEng: AppEng.pgf
AppBul: AppBul.pgf
AppChi: AppChi.pgf
AppGer: AppGer.pgf
AppSwe: AppSwe.pgf
AppHin: AppHin.pgf
AppFin: AppFin.pgf
AppFre: AppFre.pgf
AppIta: AppIta.pgf
AppSpa: AppSpa.pgf
TRANSLATE10=AppEng.pgf AppBul.pgf AppChi.pgf AppGer.pgf AppSwe.pgf AppHin.pgf AppFin.pgf AppFre.pgf AppIta.pgf AppSpa.pgf
TRANSLATE11=$(TRANSLATE10) AppDut.pgf
# With dependencies:
App11.pgf: $(TRANSLATE11)
$(GFMKT) -name=App11 $(TRANSLATE11) +RTS -K200M
App11.pgf: $(APP)
$(GFMKT) -name=App11 $(APP) +RTS -K200M
# Without dependencies:
App11:
$(GFMKT) -name=App11 $(TRANSLATE11) +RTS -K200M
# Without dependencies:
App10:
$(GFMKT) -name=App10 $(TRANSLATE10) +RTS -K200M
# With dependencies:
App10.pgf: $(TRANSLATE10)
$(GFMKT) -name=App8 $(TRANSLATE10) +RTS -K200M
$(GFMKT) -name=App11 $(APP) +RTS -K200M
# App grammars for individual languages
AppEng.pgf:: ; $(GFMKT) -name=AppEng AppEng.gf
@@ -53,5 +36,4 @@ AppSwe.pgf:: ; $(GFMKT) -name=AppSwe AppSwe.gf
# language pairs to test
AppEngSwe: ; $(GFMKT) -name=AppEngSwe AppEng.pgf AppSwe.pgf
App10: ; $(GFMKT) -name=App10 AppEng.pgf AppSwe.pgf AppBul.pgf AppIta.pgf AppSpa.pgf AppFre.pgf AppGer.pgf AppHin.pgf AppChi.pgf AppFin.pgf +RTS -K200M

View File

@@ -1,43 +1,34 @@
Grammar for coloured translation app.
(c) Aarne Ranta 2014 under GPL
(c) Aarne Ranta 2014 under GPL. Last modified 6/5/2014.
1. Make sure you have the latest RGL compiled.
1. Make sure you have the latest RGL compiled and available. Test this for instance in GF shell by typing
2. Prepare Phrasebook for this: you need to have the gfo's in the subdir phrasebook/gfos/
import alltenses/LangEng.gfo
cd ../phrasebook
make
make Chi
make gfos
cd ../app
2. Check that you have the following file structure, which holds in the standard GF
repository (darcs or github):
3. Back in this directory, make sure you have GF_LIB_PATH pointing to a place under which you can find all of
GF/lib/src/translator -- the translator extensions of RGL
GF/lib/src/german -- German RGL sources, needed for DictGer (morphological Dict)
GF/lib/src/finnish -- Finnish RGL sources, needed for StemFin
GF/lib/src/finnish/stemmed -- StemFin, a special file for compact Finnish runtime
GF/lib/src/api -- Syntax sources
GF/lib/src/chunk -- Chunk sources
GF/examples/phrasebook -- Phrasebook sources
GF/examples/app -- App sources (this directory)
$(GF_LIB_PATH)/alltenses
$(GF_LIB_PATH)/prelude
$(GF_LIB_PATH)/src/translator
$(GF_LIB_PATH)/src/finnish
$(GF_LIB_PATH)/src/finnish/stemmed
$(GF_LIB_PATH)/src/api
$(GF_LIB_PATH)/src/chunk
$(GF_LIB_PATH)/../examples/phrasebook
$(GF_LIB_PATH)/../examples/app
3. Do 'make' and take a cup of coffee. If you have multiple cores, do 'make -j' and take an espresso.
This is what I have since I am compiling RGL with 'make' in lib/src. But the standard procedure builds RGL elsewhere and
you cannot reach the non-standard source files relative to GF_LIB_PATH. Fix this by symbolic links or other means.
4. Go to GF/src/ui/android and follow the README
4. Do 'make' and take a cup of coffee.
5. Go to GF/src/ui/android and follow the README
6. Before the final 'ant debug install', do the following:
5. Before the final 'ant debug install', do the following:
cd assets/
rm *
cp -p <Your-GF>/examples/app/App10.pgf .
gf -make -split-pgf App10.pgf +RTS -K200M
rm App10.pgf
cp -p <Your-GF>/examples/app/App11.pgf .
gf -make -split-pgf App11.pgf +RTS -K200M
rm App11.pgf
cd ..
ant debug install