summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2014-08-08 17:02:36 +0000
committerhallgren <hallgren@chalmers.se>2014-08-08 17:02:36 +0000
commit02dda1e66f80047f0a8718557a8bf7cc84c16625 (patch)
tree254bfaeea8aa906c43674364e35e4803a04ce00c
parentf07096c4093ddf7630713f5f4cc6fdc0ce663cd8 (diff)
Setup.hs: don't build example grammars when the rgl-none argument is specified
-rw-r--r--Setup.hs18
-rw-r--r--WebSetup.hs8
2 files changed, 14 insertions, 12 deletions
diff --git a/Setup.hs b/Setup.hs
index 996e10a85..e930c66bd 100644
--- a/Setup.hs
+++ b/Setup.hs
@@ -43,18 +43,18 @@ main = defaultMainWithHooks simpleUserHooks{ preBuild = gfPreBuild
gfPostBuild args flags pkg lbi =
do --writeFile "running" ""
buildRGL args flags (pkg,lbi)
- let gf = default_gf (pkg,lbi)
- buildWeb gf args flags pkg lbi
+-- let gf = default_gf (pkg,lbi)
+-- buildWeb gf (pkg,lbi)
gfPostInst args flags pkg lbi =
do installRGL args flags (pkg,lbi)
let gf = default_gf (pkg,lbi)
- installWeb gf args flags pkg lbi
+ installWeb gf args flags (pkg,lbi)
- gfPostCopy args flags pkg lbi =
+ gfPostCopy args flags pkg lbi =
do copyRGL args flags (pkg,lbi)
let gf = default_gf (pkg,lbi)
- copyWeb gf args flags pkg lbi
+ copyWeb gf args flags (pkg,lbi)
--------------------------------------------------------
-- Commands for building the Resource Grammar Library
@@ -93,6 +93,8 @@ rglCommands =
| mode <- modes,
let files = map try (optml mode langsAPI args) ++
map symbolic (optml mode langsSymbolic args)]
+ , RGLCommand "web" True $ \modes args bi ->
+ buildWeb (default_gf bi) bi
, RGLCommand "pgf" False $ \modes args bi ->
parallel_ [
do let dir = getRGLBuildDir bi mode
@@ -107,9 +109,9 @@ rglCommands =
let ls = optl langsDemo args
gf bi (demos "Demo" ls) ["demo/Demo" ++ la ++ ".gf" | (_,la) <- ls]
return ()
- , RGLCommand "parse" False $ \mode args bi ->
- gfc bi mode (summary parse) (map parse (optl langsParse args))
- , RGLCommand "none" False $ \mode args bi ->
+ , RGLCommand "parse" False $ \modes args bi ->
+ gfc bi modes (summary parse) (map parse (optl langsParse args))
+ , RGLCommand "none" False $ \modes args bi ->
return ()
]
where
diff --git a/WebSetup.hs b/WebSetup.hs
index f13977b02..b3007e3c7 100644
--- a/WebSetup.hs
+++ b/WebSetup.hs
@@ -33,7 +33,7 @@ example_grammars = -- :: [(pgf, subdir, src)]
letterSrc = ["Letter"++lang++".gf"|lang<-letterLangs]
letterLangs = words "Eng Fin Fre Heb Rus Swe"
-buildWeb gf args flags pkg lbi =
+buildWeb gf (pkg,lbi) =
do --putStrLn "buildWeb"
mapM_ build_pgf example_grammars
where
@@ -51,17 +51,17 @@ buildWeb gf args flags pkg lbi =
" --output-dir="++gfo_dir++
" "++unwords [dir</>file|file<-src]
-installWeb gf args flags pki lbi = setupWeb gf args dest pki lbi
+installWeb gf args flags = setupWeb gf args dest
where
dest = NoCopyDest
-copyWeb gf args flags pki lbi = setupWeb gf args dest pki lbi
+copyWeb gf args flags = setupWeb gf args dest
where
dest = case copyDest flags of
NoFlag -> NoCopyDest
Flag d -> d
-setupWeb gf args dest pkg lbi =
+setupWeb gf args dest (pkg,lbi) =
do mapM_ (createDirectoryIfMissing True) [grammars_dir,cloud_dir]
mapM_ copy_pgf example_grammars
copyGFLogo