summaryrefslogtreecommitdiff
path: root/examples/phrasebook/Compile.hs
diff options
context:
space:
mode:
authoraarne <aarne@chalmers.se>2011-12-01 10:35:54 +0000
committeraarne <aarne@chalmers.se>2011-12-01 10:35:54 +0000
commit7086eea9f5c242c57094f682a7c03e12856ab00b (patch)
tree0785309a35dcfc0aec024f69a6258fbb1a6e8cfa /examples/phrasebook/Compile.hs
parent0d726c3f90d82dadd26c6d05b9be10e4dc8563d9 (diff)
workaround in -opt flag to compile Phrasebook
Diffstat (limited to 'examples/phrasebook/Compile.hs')
-rw-r--r--examples/phrasebook/Compile.hs8
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/phrasebook/Compile.hs b/examples/phrasebook/Compile.hs
index 5945e62e6..a3b7d2048 100644
--- a/examples/phrasebook/Compile.hs
+++ b/examples/phrasebook/Compile.hs
@@ -23,9 +23,10 @@ mainmodu = "Phrasebook"
main = do
(opts,langs) <- getArgs >>= return . partition ((=='-') . head)
let modus = [mkFile la | la <- langs]
+ let opt = elem "-opt" opts
putStrLn $ unwords modus
if notElem "-link" opts
- then mapM_ compileOne modus >> return ()
+ then mapM_ (compileOne opt) modus >> return ()
else return ()
case opts of
_ | elem "-make" opts || elem "-link" opts -> do
@@ -35,8 +36,9 @@ main = do
return ()
_ -> return ()
-compileOne modu = do
- let comm = "gf -make -s -optimize-pgf -name=" ++
+compileOne opt modu = do
+ let optim = if opt then " -optimize-pgf" else ""
+ comm = "gf -make -s" ++ optim ++ " -name=" ++
modu ++ " " ++ modu ++ ".gf" ++
" +RTS -K32M"
putStrLn comm