mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-25 02:38:55 -06:00
improved paths and Makefile in examples/app ; see README how to compile with just 'make -j'
This commit is contained in:
@@ -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 =
|
concrete AppBul of App =
|
||||||
|
|
||||||
|
|||||||
@@ -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 =
|
concrete AppChi of App =
|
||||||
|
|
||||||
|
|||||||
@@ -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 =
|
concrete AppDut of App =
|
||||||
|
|
||||||
|
|||||||
@@ -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 =
|
concrete AppEng of App =
|
||||||
|
|
||||||
|
|||||||
@@ -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 =
|
concrete AppFin of App =
|
||||||
|
|
||||||
|
|||||||
@@ -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 =
|
concrete AppFre of App =
|
||||||
|
|
||||||
|
|||||||
@@ -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 =
|
concrete AppGer of App =
|
||||||
|
|
||||||
|
|||||||
@@ -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 =
|
concrete AppHin of App =
|
||||||
|
|
||||||
|
|||||||
@@ -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 =
|
concrete AppIta of App =
|
||||||
|
|
||||||
|
|||||||
@@ -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 =
|
concrete AppSpa of App =
|
||||||
|
|
||||||
|
|||||||
@@ -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 =
|
concrete AppSwe of App =
|
||||||
TranslateSwe - [
|
TranslateSwe - [
|
||||||
|
|||||||
@@ -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
|
PROBSFILE=./app.probs
|
||||||
GFODIR=./gfos
|
GFODIR=./gfos
|
||||||
|
|
||||||
|
.Phony: Phrasebook
|
||||||
|
|
||||||
|
Phrasebook:
|
||||||
|
cd ../phrasebook ; make forApp ; cd ../app
|
||||||
|
|
||||||
S=-s
|
S=-s
|
||||||
GFMKT=mkdir -p $(GFODIR) && gf $S -make -literal=Symb -probs=$(PROBSFILE) -gfo-dir $(GFODIR)
|
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:
|
# With dependencies:
|
||||||
App11.pgf: $(TRANSLATE11)
|
App11.pgf: $(APP)
|
||||||
$(GFMKT) -name=App11 $(TRANSLATE11) +RTS -K200M
|
$(GFMKT) -name=App11 $(APP) +RTS -K200M
|
||||||
|
|
||||||
# Without dependencies:
|
# Without dependencies:
|
||||||
App11:
|
App11:
|
||||||
$(GFMKT) -name=App11 $(TRANSLATE11) +RTS -K200M
|
$(GFMKT) -name=App11 $(APP) +RTS -K200M
|
||||||
|
|
||||||
# Without dependencies:
|
|
||||||
App10:
|
|
||||||
$(GFMKT) -name=App10 $(TRANSLATE10) +RTS -K200M
|
|
||||||
|
|
||||||
# With dependencies:
|
|
||||||
App10.pgf: $(TRANSLATE10)
|
|
||||||
$(GFMKT) -name=App8 $(TRANSLATE10) +RTS -K200M
|
|
||||||
|
|
||||||
# App grammars for individual languages
|
# App grammars for individual languages
|
||||||
AppEng.pgf:: ; $(GFMKT) -name=AppEng AppEng.gf
|
AppEng.pgf:: ; $(GFMKT) -name=AppEng AppEng.gf
|
||||||
@@ -53,5 +36,4 @@ AppSwe.pgf:: ; $(GFMKT) -name=AppSwe AppSwe.gf
|
|||||||
|
|
||||||
# language pairs to test
|
# language pairs to test
|
||||||
AppEngSwe: ; $(GFMKT) -name=AppEngSwe AppEng.pgf AppSwe.pgf
|
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
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,43 +1,34 @@
|
|||||||
Grammar for coloured translation app.
|
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
|
2. Check that you have the following file structure, which holds in the standard GF
|
||||||
make
|
repository (darcs or github):
|
||||||
make Chi
|
|
||||||
make gfos
|
|
||||||
cd ../app
|
|
||||||
|
|
||||||
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
|
3. Do 'make' and take a cup of coffee. If you have multiple cores, do 'make -j' and take an espresso.
|
||||||
$(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
|
|
||||||
|
|
||||||
This is what I have since I am compiling RGL with 'make' in lib/src. But the standard procedure builds RGL elsewhere and
|
4. Go to GF/src/ui/android and follow the README
|
||||||
you cannot reach the non-standard source files relative to GF_LIB_PATH. Fix this by symbolic links or other means.
|
|
||||||
|
|
||||||
4. Do 'make' and take a cup of coffee.
|
5. Before the final 'ant debug install', do the following:
|
||||||
|
|
||||||
5. Go to GF/src/ui/android and follow the README
|
|
||||||
|
|
||||||
6. Before the final 'ant debug install', do the following:
|
|
||||||
|
|
||||||
cd assets/
|
cd assets/
|
||||||
rm *
|
rm *
|
||||||
cp -p <Your-GF>/examples/app/App10.pgf .
|
cp -p <Your-GF>/examples/app/App11.pgf .
|
||||||
gf -make -split-pgf App10.pgf +RTS -K200M
|
gf -make -split-pgf App11.pgf +RTS -K200M
|
||||||
rm App10.pgf
|
rm App11.pgf
|
||||||
cd ..
|
cd ..
|
||||||
ant debug install
|
ant debug install
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user