summaryrefslogtreecommitdiff
path: root/src/compiler/GF/CompileInParallel.hs
diff options
context:
space:
mode:
authorJohn J. Camilleri <john@johnjcamilleri.com>2018-07-22 14:48:44 +0200
committerGitHub <noreply@github.com>2018-07-22 14:48:44 +0200
commit895b479564c36e5d686a16852556ba54dc84f2be (patch)
treea109720842569c61389f896627eecf427f157d2a /src/compiler/GF/CompileInParallel.hs
parentcd1942a8454d569363b201f2345953e648ec9b53 (diff)
parent7f86bee8e708d88bd218b090eb23764ce37f50a6 (diff)
Merge pull request #8 from legalese/GF_LIB_PATH
GF_LIB_PATH can now be path1:path2:path3, not just 1path
Diffstat (limited to 'src/compiler/GF/CompileInParallel.hs')
-rw-r--r--src/compiler/GF/CompileInParallel.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/compiler/GF/CompileInParallel.hs b/src/compiler/GF/CompileInParallel.hs
index 8420b1771..fecce0a68 100644
--- a/src/compiler/GF/CompileInParallel.hs
+++ b/src/compiler/GF/CompileInParallel.hs
@@ -34,8 +34,11 @@ import qualified Data.ByteString.Lazy as BS
parallelBatchCompile jobs opts rootfiles0 =
do setJobs jobs
rootfiles <- mapM canonical rootfiles0
- lib_dir <- canonical =<< getLibraryDirectory opts
- filepaths <- mapM (getPathFromFile lib_dir opts) rootfiles
+ lib_dirs1 <- getLibraryDirectory opts
+ lib_dirs2 <- mapM canonical lib_dirs1
+ let lib_dir = head lib_dirs2
+ when (length lib_dirs2 >1) $ ePutStrLn ("GF_LIB_PATH defines more than one directory; using the first, " ++ show lib_dir)
+ filepaths <- mapM (getPathFromFile [lib_dir] opts) rootfiles
let groups = groupFiles lib_dir filepaths
n = length groups
when (n>1) $ ePutStrLn "Grammar mixes present and alltenses, dividing modules into two groups"