summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authoraarne <aarne@chalmers.se>2014-05-06 21:42:49 +0000
committeraarne <aarne@chalmers.se>2014-05-06 21:42:49 +0000
commit27fc5e5b04b0e828c11fe7081f9edf311e46581a (patch)
tree076c4a8d57274fb12cd3c3762172621c08bf2429 /examples
parent41d7f2dfafb5e94e89a0fe259ee203d014b5eabd (diff)
improved paths and Makefile in examples/app ; see README how to compile with just 'make -j'
Diffstat (limited to 'examples')
-rw-r--r--examples/app/AppBul.gf2
-rw-r--r--examples/app/AppChi.gf2
-rw-r--r--examples/app/AppDut.gf2
-rw-r--r--examples/app/AppEng.gf2
-rw-r--r--examples/app/AppFin.gf2
-rw-r--r--examples/app/AppFre.gf2
-rw-r--r--examples/app/AppGer.gf2
-rw-r--r--examples/app/AppHin.gf2
-rw-r--r--examples/app/AppIta.gf2
-rw-r--r--examples/app/AppSpa.gf3
-rw-r--r--examples/app/AppSwe.gf2
-rw-r--r--examples/app/Makefile38
-rw-r--r--examples/app/README47
13 files changed, 41 insertions, 67 deletions
diff --git a/examples/app/AppBul.gf b/examples/app/AppBul.gf
index 943f405cc..8b29b3dcc 100644
--- a/examples/app/AppBul.gf
+++ b/examples/app/AppBul.gf
@@ -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 =
diff --git a/examples/app/AppChi.gf b/examples/app/AppChi.gf
index 0870366c9..01dd5cb3a 100644
--- a/examples/app/AppChi.gf
+++ b/examples/app/AppChi.gf
@@ -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 =
diff --git a/examples/app/AppDut.gf b/examples/app/AppDut.gf
index e353a42a4..e40d608b7 100644
--- a/examples/app/AppDut.gf
+++ b/examples/app/AppDut.gf
@@ -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 =
diff --git a/examples/app/AppEng.gf b/examples/app/AppEng.gf
index 06d0b81a8..bdec84569 100644
--- a/examples/app/AppEng.gf
+++ b/examples/app/AppEng.gf
@@ -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 =
diff --git a/examples/app/AppFin.gf b/examples/app/AppFin.gf
index 6e3fcd167..0abfd973e 100644
--- a/examples/app/AppFin.gf
+++ b/examples/app/AppFin.gf
@@ -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 =
diff --git a/examples/app/AppFre.gf b/examples/app/AppFre.gf
index 3b50030db..08015c828 100644
--- a/examples/app/AppFre.gf
+++ b/examples/app/AppFre.gf
@@ -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 =
diff --git a/examples/app/AppGer.gf b/examples/app/AppGer.gf
index 595555916..79c25bebc 100644
--- a/examples/app/AppGer.gf
+++ b/examples/app/AppGer.gf
@@ -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 =
diff --git a/examples/app/AppHin.gf b/examples/app/AppHin.gf
index 26b130f45..49f27ab7b 100644
--- a/examples/app/AppHin.gf
+++ b/examples/app/AppHin.gf
@@ -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 =
diff --git a/examples/app/AppIta.gf b/examples/app/AppIta.gf
index 1ca642a4b..1c44c3d9f 100644
--- a/examples/app/AppIta.gf
+++ b/examples/app/AppIta.gf
@@ -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 =
diff --git a/examples/app/AppSpa.gf b/examples/app/AppSpa.gf
index 01f049a3a..27ca61c59 100644
--- a/examples/app/AppSpa.gf
+++ b/examples/app/AppSpa.gf
@@ -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 =
diff --git a/examples/app/AppSwe.gf b/examples/app/AppSwe.gf
index 74166fb03..93491306b 100644
--- a/examples/app/AppSwe.gf
+++ b/examples/app/AppSwe.gf
@@ -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 - [
diff --git a/examples/app/Makefile b/examples/app/Makefile
index 51fe6c154..31ac95450 100644
--- a/examples/app/Makefile
+++ b/examples/app/Makefile
@@ -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
diff --git a/examples/app/README b/examples/app/README
index fe416da9b..4645d2c88 100644
--- a/examples/app/README
+++ b/examples/app/README
@@ -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