workaround in -opt flag to compile Phrasebook

This commit is contained in:
aarne
2011-12-01 10:35:54 +00:00
parent 0d726c3f90
commit 7086eea9f5
2 changed files with 11 additions and 6 deletions

View File

@@ -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

View File

@@ -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