mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
workaround in -opt flag to compile Phrasebook
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user