summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2011-10-14 19:34:55 +0000
committerhallgren <hallgren@chalmers.se>2011-10-14 19:34:55 +0000
commitc0becec2bd70d8dfb45554f9928c4cba7bc3109e (patch)
tree946d2e8f1f3ad5ae18db24b180a7f85f9e78db63
parentbd7cb1ab41cd9b873ddc619bd5e74507366d26f6 (diff)
Bug fix in setup for gf -server mode
Use the command "dist/build/gf/gf" instead of "gf" to compile the sample grammars for the minibar, to avoid failing if gf is installed in a directory which is not in the $PATH.
-rw-r--r--Setup.hs6
-rw-r--r--WebSetup.hs8
2 files changed, 8 insertions, 6 deletions
diff --git a/Setup.hs b/Setup.hs
index 38b4ed1f6..76dae24d2 100644
--- a/Setup.hs
+++ b/Setup.hs
@@ -29,11 +29,13 @@ main = defaultMainWithHooks simpleUserHooks{ preBuild =checkRGLArgs
where
gfPostInst args flags pkg lbi =
do installRGL args flags pkg lbi
- installWeb args flags pkg lbi
+ let gf = default_gf pkg lbi
+ installWeb gf args flags pkg lbi
gfPostCopy args flags pkg lbi =
do copyRGL args flags pkg lbi
- copyWeb args flags pkg lbi
+ let gf = default_gf pkg lbi
+ copyWeb gf args flags pkg lbi
--------------------------------------------------------
-- Commands for building the Resource Grammar Library
diff --git a/WebSetup.hs b/WebSetup.hs
index c0ac0a66c..3deba51ea 100644
--- a/WebSetup.hs
+++ b/WebSetup.hs
@@ -21,17 +21,17 @@ example_grammars = -- :: [(pgf, tmp, src)]
("Letter.pgf","letter","examples"</>"letter"</>"Letter???.gf")]
-installWeb args flags pki lbi = setupWeb args dest pki lbi
+installWeb gf args flags pki lbi = setupWeb gf args dest pki lbi
where
dest = NoCopyDest
-copyWeb args flags pki lbi = setupWeb args dest pki lbi
+copyWeb gf args flags pki lbi = setupWeb gf args dest pki lbi
where
dest = case copyDest flags of
NoFlag -> NoCopyDest
Flag d -> d
-setupWeb args dest pkg lbi =
+setupWeb gf args dest pkg lbi =
do putStrLn "setupWeb"
mapM_ (createDirectoryIfMissing True) [grammars_dir,cloud_dir]
mapM_ build_pgf example_grammars
@@ -49,7 +49,7 @@ setupWeb args dest pkg lbi =
removeFile pgf
where
tmp_dir = gfo_dir</>tmp
- cmd = "gf -make -s -optimize-pgf --gfo-dir="++tmp_dir++
+ cmd = gf++" -make -s -optimize-pgf --gfo-dir="++tmp_dir++
-- " --output-dir="++grammars_dir++ -- has no effect?!
" "++src