diff options
| author | aarne <unknown> | 2004-06-21 08:53:58 +0000 |
|---|---|---|
| committer | aarne <unknown> | 2004-06-21 08:53:58 +0000 |
| commit | b248e6e25e5b58163cc9b897be7eb0b4bf6dbdc6 (patch) | |
| tree | 74d74c06998903a16c5909eafc9835e1ca68491d /src/GF/Compile | |
| parent | a134a1fd65c80bae1e37d304fc674453e126c504 (diff) | |
for release meeting
Diffstat (limited to 'src/GF/Compile')
| -rw-r--r-- | src/GF/Compile/Compile.hs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/GF/Compile/Compile.hs b/src/GF/Compile/Compile.hs index fa2e65a3c..78f3a1bb1 100644 --- a/src/GF/Compile/Compile.hs +++ b/src/GF/Compile/Compile.hs @@ -35,6 +35,10 @@ import Arch import Monad +-- environment variable for grammar search path + +gfGrammarPathVar = "GF_LIB_PATH" + -- in batch mode: write code in a file batchCompile f = liftM fst $ compileModule defOpts emptyShellState f @@ -86,9 +90,10 @@ compileModule opts1 st0 file = do let opts = addOptions opts1 opts0 let ps0 = pathListOpts opts let fpath = justInitPath file - let ps = if useFileOpt - then (map (prefixPathName fpath) ps0) - else ps0 + let ps1 = if useFileOpt + then (map (prefixPathName fpath) ps0) + else ps0 + ps <- ioeIO $ extendPathEnv gfGrammarPathVar ps1 let ioeIOIf = if oElem beSilent opts then (const (return ())) else ioeIO ioeIOIf $ putStrLn $ "module search path:" +++ show ps ---- let putp = putPointE opts |
