mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-20 16:42:51 -06:00
Added --output-dir to GF.Devel.GFC.Options. Suggested by peb.
This commit is contained in:
@@ -74,6 +74,7 @@ data Options = Options {
|
|||||||
optGFCDir :: FilePath,
|
optGFCDir :: FilePath,
|
||||||
optOutputFormats :: [OutputFormat],
|
optOutputFormats :: [OutputFormat],
|
||||||
optOutputFile :: Maybe FilePath,
|
optOutputFile :: Maybe FilePath,
|
||||||
|
optOutputDir :: FilePath,
|
||||||
optLibraryPath :: [FilePath],
|
optLibraryPath :: [FilePath],
|
||||||
optForceRecomp :: Bool,
|
optForceRecomp :: Bool,
|
||||||
optPreprocessors :: [String],
|
optPreprocessors :: [String],
|
||||||
@@ -94,6 +95,7 @@ defaultOptions = Options {
|
|||||||
optGFCDir = ".",
|
optGFCDir = ".",
|
||||||
optOutputFormats = [FmtGFCC],
|
optOutputFormats = [FmtGFCC],
|
||||||
optOutputFile = Nothing,
|
optOutputFile = Nothing,
|
||||||
|
optOutputDir = ".",
|
||||||
optLibraryPath = [],
|
optLibraryPath = [],
|
||||||
optForceRecomp = False,
|
optForceRecomp = False,
|
||||||
optPreprocessors = [],
|
optPreprocessors = [],
|
||||||
@@ -134,6 +136,8 @@ optDescr =
|
|||||||
"Abstract only: haskell, ..."]),
|
"Abstract only: haskell, ..."]),
|
||||||
Option ['o'] ["output-file"] (ReqArg outFile "FILE")
|
Option ['o'] ["output-file"] (ReqArg outFile "FILE")
|
||||||
"Save output in FILE (default is out.X, where X depends on output format.",
|
"Save output in FILE (default is out.X, where X depends on output format.",
|
||||||
|
Option ['D'] ["output-dir"] (ReqArg outDir "DIR")
|
||||||
|
"Save output files (other than .gfc files) in DIR.",
|
||||||
Option ['i'] [] (ReqArg addLibDir "DIR") "Add DIR to the library search path.",
|
Option ['i'] [] (ReqArg addLibDir "DIR") "Add DIR to the library search path.",
|
||||||
Option [] ["path"] (ReqArg setLibPath "DIR:DIR:...") "Set the library search path.",
|
Option [] ["path"] (ReqArg setLibPath "DIR:DIR:...") "Set the library search path.",
|
||||||
Option [] ["src","force-recomp"] (NoArg (forceRecomp True))
|
Option [] ["src","force-recomp"] (NoArg (forceRecomp True))
|
||||||
@@ -159,6 +163,7 @@ optDescr =
|
|||||||
gfcDir x o = return $ o { optGFCDir = x }
|
gfcDir x o = return $ o { optGFCDir = x }
|
||||||
outFmt x o = readOutputFormat x >>= \f -> return $ o { optOutputFormats = optOutputFormats o ++ [f] }
|
outFmt x o = readOutputFormat x >>= \f -> return $ o { optOutputFormats = optOutputFormats o ++ [f] }
|
||||||
outFile x o = return $ o { optOutputFile = Just x }
|
outFile x o = return $ o { optOutputFile = Just x }
|
||||||
|
outDir x o = return $ o { optOutputDir = x }
|
||||||
addLibDir x o = return $ o { optLibraryPath = x:optLibraryPath o }
|
addLibDir x o = return $ o { optLibraryPath = x:optLibraryPath o }
|
||||||
setLibPath x o = return $ o { optLibraryPath = splitSearchPath x }
|
setLibPath x o = return $ o { optLibraryPath = splitSearchPath x }
|
||||||
forceRecomp x o = return $ o { optForceRecomp = x }
|
forceRecomp x o = return $ o { optForceRecomp = x }
|
||||||
|
|||||||
Reference in New Issue
Block a user