diff options
| author | John J. Camilleri <john@johnjcamilleri.com> | 2018-07-22 14:48:44 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-07-22 14:48:44 +0200 |
| commit | 895b479564c36e5d686a16852556ba54dc84f2be (patch) | |
| tree | a109720842569c61389f896627eecf427f157d2a /src/compiler/GF/CompileInParallel.hs | |
| parent | cd1942a8454d569363b201f2345953e648ec9b53 (diff) | |
| parent | 7f86bee8e708d88bd218b090eb23764ce37f50a6 (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.hs | 7 |
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" |
