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 diff --git a/examples/phrasebook/Makefile b/examples/phrasebook/Makefile index 9af86ccfb..b2788cda2 100644 --- a/examples/phrasebook/Makefile +++ b/examples/phrasebook/Makefile @@ -5,14 +5,17 @@ all: fin demo missing demo: compdemo linkdemo compdemo: - $(compile) Bul Cat Dan Dut Eng Fre Ger Ita Nor Pol Ron Rus Spa Swe Tha Urd DisambPhrasebookEng + $(compile) Bul Dan Dut Nor Pol Ron Spa + $(compile) -opt Cat Eng Fre Ger Rus Swe Tha Urd DisambPhrasebookEng +# $(compile) -opt Bul Cat Dan Dut Eng Fre Ger Ita Nor Pol Ron Rus Spa Swe Tha Urd DisambPhrasebookEng linkdemo: - $(compile) -link Eng Bul Cat Dan Dut Fin Fre Ger Ita Nor Pol Ron Rus Spa Swe Tha Urd DisambPhrasebookEng + $(compile) -link Eng Bul Cat Dan Dut Fin Fre Ger Ita Nor Pol Rus Spa Swe Tha Urd DisambPhrasebookEng +# $(compile) -link Eng Bul Cat Dan Dut Fin Fre Ger Ita Nor Pol Ron Rus Spa Swe Tha Urd DisambPhrasebookEng #separate, because slow... fin: - $(compile) Fin + $(compile) -opt Fin missing: echo "pg -missing | wf -file=missing.txt" | gf -run Phrasebook.pgf