"Committed_by_peb"

This commit is contained in:
peb
2005-05-11 09:28:16 +00:00
parent 2c9e0c6148
commit 4bdb527770
9 changed files with 105 additions and 91 deletions

View File

@@ -4,9 +4,9 @@
-- Stability : (stable) -- Stability : (stable)
-- Portability : (portable) -- Portability : (portable)
-- --
-- > CVS $Date: 2005/05/09 09:28:44 $ -- > CVS $Date: 2005/05/11 10:28:16 $
-- > CVS $Author: peb $ -- > CVS $Author: peb $
-- > CVS $Revision: 1.4 $ -- > CVS $Revision: 1.5 $
-- --
-- Instantiating all types which only have one single element. -- Instantiating all types which only have one single element.
-- --
@@ -57,7 +57,7 @@ instantiateLin newArgs = inst
= case newArgs !! nr of = case newArgs !! nr of
Unify [nr'] -> Arg nr' cat path Unify [nr'] -> Arg nr' cat path
Constant (Just term) -> termFollowPath path term Constant (Just term) -> termFollowPath path term
Constant Nothing -> error "instantiateLin: argument has no linearization" Constant Nothing -> error "RemoveSingletons.instantiateLin: This should not happen (argument has no linearization)"
inst (cn :^ terms) = cn :^ map inst terms inst (cn :^ terms) = cn :^ map inst terms
inst (Rec rec) = Rec [ (lbl, inst term) | (lbl, term) <- rec ] inst (Rec rec) = Rec [ (lbl, inst term) | (lbl, term) <- rec ]
inst (term :. lbl) = inst term +. lbl inst (term :. lbl) = inst term +. lbl

View File

@@ -5,9 +5,9 @@
-- Stability : (stable) -- Stability : (stable)
-- Portability : (portable) -- Portability : (portable)
-- --
-- > CVS $Date: 2005/04/21 16:22:37 $ -- > CVS $Date: 2005/05/11 10:28:16 $
-- > CVS $Author: bringert $ -- > CVS $Author: peb $
-- > CVS $Revision: 1.26 $ -- > CVS $Revision: 1.27 $
-- --
-- Options and flags used in GF shell commands and files. -- Options and flags used in GF shell commands and files.
-- --
@@ -146,9 +146,11 @@ rawParse = iOpt "raw"
firstParse = iOpt "1" firstParse = iOpt "1"
dontParse = iOpt "read" dontParse = iOpt "read"
newParser, newerParser :: Option newParser, newerParser, newCParser, newMParser :: Option
newParser = iOpt "new" newParser = iOpt "new"
newerParser = iOpt "newer" newerParser = iOpt "newer"
newCParser = iOpt "cfg"
newMParser = iOpt "mcfg"
{- {-
useParserMCFG, useParserMCFGviaCFG, useParserCFG, useParserCF :: Option useParserMCFG, useParserMCFGviaCFG, useParserCFG, useParserCF :: Option

View File

@@ -4,9 +4,9 @@
-- Stability : (stable) -- Stability : (stable)
-- Portability : (portable) -- Portability : (portable)
-- --
-- > CVS $Date: 2005/04/21 16:23:05 $ -- > CVS $Date: 2005/05/11 10:28:16 $
-- > CVS $Author: bringert $ -- > CVS $Author: peb $
-- > CVS $Revision: 1.4 $ -- > CVS $Revision: 1.5 $
-- --
-- CFG parsing -- CFG parsing
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
@@ -27,6 +27,10 @@ import qualified GF.Parsing.CFG.General as Gen
-- parsing -- parsing
parseCF :: (Ord n, Ord c, Ord t) => String -> Err (CFParser c n t) parseCF :: (Ord n, Ord c, Ord t) => String -> Err (CFParser c n t)
parseCF "bottomup" = Ok $ Gen.parse bottomup
parseCF "topdown" = Ok $ Gen.parse topdown
parseCF "gb" = Ok $ Gen.parse bottomup parseCF "gb" = Ok $ Gen.parse bottomup
parseCF "gt" = Ok $ Gen.parse topdown parseCF "gt" = Ok $ Gen.parse topdown
parseCF "ib" = Ok $ Inc.parse (bottomup, noFilter) parseCF "ib" = Ok $ Inc.parse (bottomup, noFilter)
@@ -35,10 +39,9 @@ parseCF "ibFT" = Ok $ Inc.parse (bottomup, topdown)
parseCF "ibFB" = Ok $ Inc.parse (bottomup, bottomup) parseCF "ibFB" = Ok $ Inc.parse (bottomup, bottomup)
parseCF "ibFTB" = Ok $ Inc.parse (bottomup, bothFilters) parseCF "ibFTB" = Ok $ Inc.parse (bottomup, bothFilters)
parseCF "itF" = Ok $ Inc.parse (topdown, bottomup) parseCF "itF" = Ok $ Inc.parse (topdown, bottomup)
-- default parser:
parseCF "" = parseCF "gb"
-- error parser: -- error parser:
parseCF prs = Bad $ "Parser not defined: " ++ prs parseCF prs = Bad $ "CFG parsing strategy not defined: " ++ prs
bottomup = (True, False) bottomup = (True, False)
topdown = (False, True) topdown = (False, True)

View File

@@ -4,9 +4,9 @@
-- Stability : (stable) -- Stability : (stable)
-- Portability : (portable) -- Portability : (portable)
-- --
-- > CVS $Date: 2005/05/09 09:28:45 $ -- > CVS $Date: 2005/05/11 10:28:16 $
-- > CVS $Author: peb $ -- > CVS $Author: peb $
-- > CVS $Revision: 1.7 $ -- > CVS $Revision: 1.8 $
-- --
-- The main parsing module, parsing GFC grammars -- The main parsing module, parsing GFC grammars
-- by translating to simpler formats, such as PMCFG and CFG -- by translating to simpler formats, such as PMCFG and CFG
@@ -58,14 +58,15 @@ instance Print PInfo where
---------------------------------------------------------------------- ----------------------------------------------------------------------
-- main parsing function -- main parsing function
parse :: String -- ^ parsing strategy parse :: String -- ^ parsing algorithm (mcfg/cfg)
-> String -- ^ parsing strategy
-> PInfo -- ^ compiled grammars (mcfg and cfg) -> PInfo -- ^ compiled grammars (mcfg and cfg)
-> Ident.Ident -- ^ abstract module name -> Ident.Ident -- ^ abstract module name
-> CFCat -- ^ starting category -> CFCat -- ^ starting category
-> [CFTok] -- ^ input tokens -> [CFTok] -- ^ input tokens
-> Err [Grammar.Term] -- ^ resulting GF terms -> Err [Grammar.Term] -- ^ resulting GF terms
parse (prs:strategy) pinfo abs startCat inString = parse prs strategy pinfo abs startCat inString =
do let inTokens = tracePrt "Parsing.GFC - input tokens" prt $ do let inTokens = tracePrt "Parsing.GFC - input tokens" prt $
inputMany (map wordsCFTok inString) inputMany (map wordsCFTok inString)
forests <- selectParser prs strategy pinfo startCat inTokens forests <- selectParser prs strategy pinfo startCat inTokens
@@ -81,34 +82,32 @@ parse (prs:strategy) pinfo abs startCat inString =
-- compactFs >>= forest2trees -- compactFs >>= forest2trees
return $ map (tree2term abs) trees return $ map (tree2term abs) trees
-- default parser = CFG (for now)
parse "" pinfo abs startCat inString = parse "c" pinfo abs startCat inString
-- parsing via CFG -- parsing via CFG
selectParser prs strategy pinfo startCat inTokens | prs=='c' selectParser "c" strategy pinfo startCat inTokens
= do let startCats = tracePrt "Parsing.GFC - starting CF categories" prt $ = do let startCats = tracePrt "Parsing.GFC - starting CF categories" prt $
filter isStart $ map fst $ aAssocs $ PC.topdownRules cfpi filter isStart $ map fst $ aAssocs $ PC.topdownRules cfpi
isStart cat = ccat2scat cat == cfCat2Ident startCat isStart cat = ccat2scat cat == cfCat2Ident startCat
cfpi = cfPInfo pinfo cfpi = cfPInfo pinfo
cfParser <- PC.parseCF strategy cfParser <- PC.parseCF strategy
let cfChart = tracePrt "Parsing.GFC - sz. CF chart" (prt . length) $ let cfChart = tracePrt "Parsing.GFC - CF chart" (prt . length) $
cfParser cfpi startCats inTokens cfParser cfpi startCats inTokens
chart = tracePrt "Parsing.GFC - sz. chart" (prt . map (length.snd) . aAssocs) $ chart = tracePrt "Parsing.GFC - chart" (prt . map (length.snd) . aAssocs) $
C.grammar2chart cfChart C.grammar2chart cfChart
finalEdges = tracePrt "Parsing.GFC - final chart edges" prt $ finalEdges = tracePrt "Parsing.GFC - final chart edges" prt $
map (uncurry Edge (inputBounds inTokens)) startCats map (uncurry Edge (inputBounds inTokens)) startCats
return $ chart2forests chart (const False) finalEdges return $ chart2forests chart (const False) finalEdges
-- parsing via MCFG -- parsing via MCFG
selectParser prs strategy pinfo startCat inTokens | prs=='m' selectParser "m" strategy pinfo startCat inTokens
= do let startCats = tracePrt "Parsing.GFC - starting MCF categories" prt $ = do let startCats = tracePrt "Parsing.GFC - starting MCF categories" prt $
filter isStart $ PM.grammarCats mcfpi filter isStart $ PM.grammarCats mcfpi
isStart cat = mcat2scat cat == cfCat2Ident startCat isStart cat = mcat2scat cat == cfCat2Ident startCat
mcfpi = mcfPInfo pinfo mcfpi = mcfPInfo pinfo
mcfChart <- PM.parseMCF strategy mcfpi startCats inTokens mcfParser <- PM.parseMCF strategy
traceM "Parsing.GFC - sz. MCF chart" (prt (length mcfChart)) let mcfChart = tracePrt "Parsing.GFC - MCF chart" (prt . length) $
let chart = tracePrt "Parsing.GFC - sz. chart" (prt . length . concat . map snd . aAssocs) $ mcfParser mcfpi startCats inTokens
chart = tracePrt "Parsing.GFC - chart" (prt . length . concat . map snd . aAssocs) $
G.abstract2chart mcfChart G.abstract2chart mcfChart
finalEdges = tracePrt "Parsing.GFC - final chart edges" prt $ finalEdges = tracePrt "Parsing.GFC - final chart edges" prt $
[ PM.makeFinalEdge cat lbl (inputBounds inTokens) | [ PM.makeFinalEdge cat lbl (inputBounds inTokens) |
@@ -116,7 +115,7 @@ selectParser prs strategy pinfo startCat inTokens | prs=='m'
return $ chart2forests chart (const False) finalEdges return $ chart2forests chart (const False) finalEdges
-- error parser: -- error parser:
selectParser prs strategy _ _ _ = Bad $ "Parser not defined: " ++ (prs:strategy) selectParser prs strategy _ _ _ = Bad $ "Parser '" ++ prs ++ "' not defined with strategy: " ++ strategy
---------------------------------------------------------------------- ----------------------------------------------------------------------

View File

@@ -4,9 +4,9 @@
-- Stability : (stable) -- Stability : (stable)
-- Portability : (portable) -- Portability : (portable)
-- --
-- > CVS $Date: 2005/05/09 09:28:45 $ -- > CVS $Date: 2005/05/11 10:28:16 $
-- > CVS $Author: peb $ -- > CVS $Author: peb $
-- > CVS $Revision: 1.4 $ -- > CVS $Revision: 1.5 $
-- --
-- MCFG parsing -- MCFG parsing
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
@@ -30,30 +30,35 @@ import qualified GF.Parsing.MCFG.Incremental2 as Incremental2
---------------------------------------------------------------------- ----------------------------------------------------------------------
-- parsing -- parsing
-- parseMCF :: (Ord c, Ord n, Ord l, Ord t) => String -> Err (MCFParser c n l t) parseMCF :: (Ord c, Ord n, Ord l, Ord t) => String -> Err (MCFParser c n l t)
parseMCF prs | prs `elem` strategies = Ok $ parseMCF' prs
| otherwise = Bad $ "MCFG parsing strategy not defined: " ++ prs
parseMCF "n" pinfo starts toks = Ok $ Naive.parse pinfo starts toks
parseMCF "an" pinfo starts toks = Ok $ Active.parse "n" pinfo starts toks
parseMCF "ab" pinfo starts toks = Ok $ Active.parse "b" pinfo starts toks
parseMCF "at" pinfo starts toks = Ok $ Active.parse "t" pinfo starts toks
parseMCF "i" pinfo starts toks = Ok $ Incremental.parse pinfo starts toks
parseMCF "an2" pinfo starts toks = Ok $ Active2.parse "n" pinfo starts toks strategies = words "bottomup topdown n an ab at i an2 ab2 at2 i2 rn ran rab rat ri"
parseMCF "ab2" pinfo starts toks = Ok $ Active2.parse "b" pinfo starts toks
parseMCF "at2" pinfo starts toks = Ok $ Active2.parse "t" pinfo starts toks
parseMCF "i2" pinfo starts toks = Ok $ Incremental2.parse pinfo starts toks
parseMCF "rn" pinfo starts toks = Ok $ Naive.parseR (rrP pinfo toks) starts
parseMCF "ran" pinfo starts toks = Ok $ Active.parseR "n" (rrP pinfo toks) starts parseMCF' :: (Ord c, Ord n, Ord l, Ord t) => String -> MCFParser c n l t
parseMCF "rab" pinfo starts toks = Ok $ Active.parseR "b" (rrP pinfo toks) starts
parseMCF "rat" pinfo starts toks = Ok $ Active.parseR "t" (rrP pinfo toks) starts parseMCF' "bottomup" pinfo starts toks = Active.parse "b" pinfo starts toks
parseMCF "ri" pinfo starts toks = Ok $ Incremental.parseR (rrP pinfo toks) starts ntoks parseMCF' "topdown" pinfo starts toks = Active.parse "t" pinfo starts toks
parseMCF' "n" pinfo starts toks = Naive.parse pinfo starts toks
parseMCF' "an" pinfo starts toks = Active.parse "n" pinfo starts toks
parseMCF' "ab" pinfo starts toks = Active.parse "b" pinfo starts toks
parseMCF' "at" pinfo starts toks = Active.parse "t" pinfo starts toks
parseMCF' "i" pinfo starts toks = Incremental.parse pinfo starts toks
parseMCF' "an2" pinfo starts toks = Active2.parse "n" pinfo starts toks
parseMCF' "ab2" pinfo starts toks = Active2.parse "b" pinfo starts toks
parseMCF' "at2" pinfo starts toks = Active2.parse "t" pinfo starts toks
parseMCF' "i2" pinfo starts toks = Incremental2.parse pinfo starts toks
parseMCF' "rn" pinfo starts toks = Naive.parseR (rrP pinfo toks) starts
parseMCF' "ran" pinfo starts toks = Active.parseR "n" (rrP pinfo toks) starts
parseMCF' "rab" pinfo starts toks = Active.parseR "b" (rrP pinfo toks) starts
parseMCF' "rat" pinfo starts toks = Active.parseR "t" (rrP pinfo toks) starts
parseMCF' "ri" pinfo starts toks = Incremental.parseR (rrP pinfo toks) starts ntoks
where ntoks = snd (inputBounds toks) where ntoks = snd (inputBounds toks)
-- default parsers:
parseMCF "" pinfo starts toks = parseMCF "n" pinfo starts toks
-- error parser:
parseMCF prs pinfo starts toks = Bad $ "Parser not defined: " ++ prs
rrP pi = rangeRestrictPInfo pi rrP pi = rangeRestrictPInfo pi

View File

@@ -5,9 +5,9 @@
-- Stability : (stable) -- Stability : (stable)
-- Portability : (portable) -- Portability : (portable)
-- --
-- > CVS $Date: 2005/05/09 09:28:46 $ -- > CVS $Date: 2005/05/11 10:28:16 $
-- > CVS $Author: peb $ -- > CVS $Author: peb $
-- > CVS $Revision: 1.31 $ -- > CVS $Revision: 1.32 $
-- --
-- The datatype of shell commands and the list of their options. -- The datatype of shell commands and the list of their options.
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
@@ -130,8 +130,9 @@ testValidFlag st co f x = case f of
"depth" -> testN "depth" -> testN
"rawtrees"-> testN "rawtrees"-> testN
"parser" -> testInc customParser "parser" -> testInc customParser
-- hack for the -newer parsers: (to be changed) -- hack for the -newer parsers: (to be changed in the future)
`mplus` if not(null x) && head x `elem` "mc" then return () else Bad "" -- `mplus` testIn (words "mcfg mcfg-bottomup mcfg-topdown cfg cfg-bottomup cfg-topdown bottomup topdown")
-- if not(null x) && head x `elem` "mc" then return () else Bad ""
"alts" -> testN "alts" -> testN
"transform" -> testInc customTermCommand "transform" -> testInc customTermCommand
"filter" -> testInc customStringCommand "filter" -> testInc customStringCommand
@@ -167,7 +168,7 @@ optionsOfCommand co = case co of
CTransformGrammar _ -> flags "printer" CTransformGrammar _ -> flags "printer"
CConvertLatex _ -> none CConvertLatex _ -> none
CLinearize _ -> both "utf8 table struct record all multi" "lang number unlexer" CLinearize _ -> both "utf8 table struct record all multi" "lang number unlexer"
CParse -> both "new newer n ign raw v lines all" "cat lang lexer parser number rawtrees" CParse -> both "new newer cfg mcfg n ign raw v lines all" "cat lang lexer parser number rawtrees"
CTranslate _ _ -> opts "cat lexer parser" CTranslate _ _ -> opts "cat lexer parser"
CGenerateRandom -> flags "cat lang number depth" CGenerateRandom -> flags "cat lang number depth"
CGenerateTrees -> both "metas" "depth alts cat lang number" CGenerateTrees -> both "metas" "depth alts cat lang number"

View File

@@ -5,9 +5,9 @@
-- Stability : (stable) -- Stability : (stable)
-- Portability : (portable) -- Portability : (portable)
-- --
-- > CVS $Date: 2005/05/09 09:28:46 $ -- > CVS $Date: 2005/05/11 10:28:16 $
-- > CVS $Author: peb $ -- > CVS $Author: peb $
-- > CVS $Revision: 1.59 $ -- > CVS $Revision: 1.60 $
-- --
-- A database for customizable GF shell commands. -- A database for customizable GF shell commands.
-- --
@@ -349,13 +349,13 @@ customStringCommand =
customParser = customParser =
customData "Parsers, selected by option -parser=x" $ customData "Parsers, selected by option -parser=x" $
[ [
(strCI "chart", PCFOld.parse "ibn" . stateCF) -- DEPRECATED (strCI "bottomup", PCF.parse "gb" . stateCF)
,(strCI "general", PCF.parse "gb" . stateCF) ,(strCI "topdown", PCF.parse "gt" . stateCF)
,(strCI "general-bottomup", PCF.parse "gt" . stateCF) -- commented for now, since there's a bug in the incremental algorithm:
,(strCI "general-topdown", PCF.parse "gt" . stateCF) -- ,(strCI "incremental", PCF.parse "ib" . stateCF)
,(strCI "incremental", PCF.parse "ib" . stateCF) -- ,(strCI "incremental-bottomup", PCF.parse "ib" . stateCF)
,(strCI "incremental-bottomup", PCF.parse "ib" . stateCF) -- ,(strCI "incremental-topdown", PCF.parse "it" . stateCF)
,(strCI "incremental-topdown", PCF.parse "it" . stateCF) ,(strCI "chart", PCFOld.parse "ibn" . stateCF) -- DEPRECATED
,(strCI "old", chartParser . stateCF) -- DEPRECATED ,(strCI "old", chartParser . stateCF) -- DEPRECATED
,(strCI "myparser", myParser) ,(strCI "myparser", myParser)
-- add your own parsers here -- add your own parsers here

View File

@@ -5,9 +5,9 @@
-- Stability : (stable) -- Stability : (stable)
-- Portability : (portable) -- Portability : (portable)
-- --
-- > CVS $Date: 2005/05/10 14:16:59 $ -- > CVS $Date: 2005/05/11 10:28:16 $
-- > CVS $Author: aarne $ -- > CVS $Author: peb $
-- > CVS $Revision: 1.22 $ -- > CVS $Revision: 1.23 $
-- --
-- (Description of the module) -- (Description of the module)
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
@@ -35,7 +35,7 @@ import GF.UseGrammar.Custom
import GF.Compile.ShellState import GF.Compile.ShellState
import GF.CF.PPrCF (prCFTree) import GF.CF.PPrCF (prCFTree)
import qualified GF.OldParsing.ParseGFC as NewOld -- OBSOLETE -- import qualified GF.OldParsing.ParseGFC as NewOld -- OBSOLETE
import qualified GF.Parsing.GFC as New import qualified GF.Parsing.GFC as New
import GF.Data.Operations import GF.Data.Operations
@@ -54,26 +54,30 @@ parseStringMsg os sg cat s = do
return (ts,unlines ss) return (ts,unlines ss)
parseStringC :: Options -> StateGrammar -> CFCat -> String -> Check [Tree] parseStringC :: Options -> StateGrammar -> CFCat -> String -> Check [Tree]
parseStringC opts0 sg cat s
---- to test peb's new parser 6/10/2003 ---- to test peb's new parser 6/10/2003
---- (to be obsoleted by "newer" below) ---- (obsoleted by "newer" below)
| oElem newParser opts0 = do -- parseStringC opts0 sg cat s
let pm = maybe "" id $ getOptVal opts0 useParser -- -parser=pm -- | oElem newParser opts0 = do
ct = cfCat2Cat cat -- let pm = maybe "" id $ getOptVal opts0 useParser -- -parser=pm
ts <- checkErr $ NewOld.newParser pm sg ct s -- ct = cfCat2Cat cat
mapM (checkErr . annotate (stateGrammarST sg) . refreshMetas []) ts -- ts <- checkErr $ NewOld.newParser pm sg ct s
-- mapM (checkErr . annotate (stateGrammarST sg) . refreshMetas []) ts
---- to test peb's newer parser 7/4-05 -- to use peb's newer parser 7/4-05
| oElem newerParser opts0 = do parseStringC opts0 sg cat s
let opts = unionOptions opts0 $ stateOptions sg | oElem newCParser opts0 || oElem newMParser opts0 || oElem newParser opts0 || oElem newerParser opts0 = do
pm = maybe "" id $ getOptVal opts0 useParser -- -parser=pm let opts = unionOptions opts0 $ stateOptions sg
tok = customOrDefault opts useTokenizer customTokenizer sg algorithm | oElem newCParser opts0 = "c"
ts <- checkErr $ New.parse pm (pInfo sg) (absId sg) cat (tok s) | oElem newMParser opts0 = "m"
| otherwise = "c" -- default algorithm
strategy = maybe "bottomup" id $ getOptVal opts useParser -- -parser=bottomup/topdown
tokenizer = customOrDefault opts useTokenizer customTokenizer sg
ts <- checkErr $ New.parse algorithm strategy (pInfo sg) (absId sg) cat (tokenizer s)
ts' <- mapM (checkErr . annotate (stateGrammarST sg) . refreshMetas []) ts ts' <- mapM (checkErr . annotate (stateGrammarST sg) . refreshMetas []) ts
return $ optIntOrAll opts flagNumber ts' return $ optIntOrAll opts flagNumber ts'
| otherwise = do parseStringC opts0 sg cat s = do
let opts = unionOptions opts0 $ stateOptions sg let opts = unionOptions opts0 $ stateOptions sg
cf = stateCF sg cf = stateCF sg
gr = stateGrammarST sg gr = stateGrammarST sg

View File

@@ -19,6 +19,8 @@ BIN_DIST_DIR=$(DIST_DIR)-$(host)
SNAPSHOT_DIR=GF-$(shell date +%Y%m%d) SNAPSHOT_DIR=GF-$(shell date +%Y%m%d)
# use the temporary binary file name 'gf-bin' name to not clash with directory 'GF'
# on case insensitive file systems (such as MacOSX)
GF_EXE=gf$(EXEEXT) GF_EXE=gf$(EXEEXT)
GF_EXE_TMP=gf-bin$(EXEEXT) GF_EXE_TMP=gf-bin$(EXEEXT)
GF_DOC_EXE=gfdoc$(EXEEXT) GF_DOC_EXE=gfdoc$(EXEEXT)
@@ -39,16 +41,14 @@ endif
all: unix gfdoc $(BUILD_JAR) all: unix gfdoc $(BUILD_JAR)
unix: today touch-files opt unix: today opt
windows: unix windows: unix
temp: today touch-files noopt temp: today noopt
# use gf-bin name to not clash with GF/ dir on
# case insensitive file systems
build: build:
$(GHMAKE) $(GHCFLAGS) GF.hs -o $(GF_EXE_TMP) $(GHMAKE) $(GHCFLAGS) GF.hs -o $(GF_EXE_TMP)
strip $(GF_EXE_TMP) strip $(GF_EXE_TMP)
@@ -59,7 +59,7 @@ opt: build
noopt: build noopt: build
ghci: touch-files ghci-nofud ghci: ghci-nofud
fud: fud:
$(GHCXMAKE) $(GHCFLAGS) $(GHCFUDFLAG) GF.hs -o fgf $(GHCXMAKE) $(GHCFLAGS) $(GHCFUDFLAG) GF.hs -o fgf
@@ -111,9 +111,9 @@ tracing: temp
ghci-trace: GHCFLAGS += -DTRACING ghci-trace: GHCFLAGS += -DTRACING
ghci-trace: ghci ghci-trace: ghci
touch-files: #touch-files:
rm -f GF/System/Tracing.{hi,o} # rm -f GF/System/Tracing.{hi,o}
touch GF/System/Tracing.hs # touch GF/System/Tracing.hs
# profiling # profiling
prof: GHCOPTFLAGS += -prof -auto-all -auto-dicts prof: GHCOPTFLAGS += -prof -auto-all -auto-dicts