diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/envars.ml | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/envars.ml b/lib/envars.ml index c260a86484..4f33ccb7f3 100644 --- a/lib/envars.ml +++ b/lib/envars.ml @@ -25,21 +25,21 @@ let reldir instdir testfile oth = let prefix = Filename.dirname (coqbin ()) in let rpath = if Coq_config.local then [] else instdir in let out = List.fold_left Filename.concat prefix rpath in - if Sys.file_exists (Filename.concat out testfile) then out else oth + if Sys.file_exists (Filename.concat out testfile) then out else oth () let guess_coqlib () = let file = "states/initial.coq" in - if Sys.file_exists (Filename.concat Coq_config.coqlib file) - then Coq_config.coqlib - else reldir (if Coq_config.arch = "win32" then ["lib"] else ["lib";"coq"]) file - (Util.error "cannot guess a path for Coq libraries; please use -coqlib option") + reldir (if Coq_config.arch = "win32" then ["lib"] else ["lib";"coq"]) file + (fun () -> if Sys.file_exists (Filename.concat Coq_config.coqlib file) + then Coq_config.coqlib + else Util.error "cannot guess a path for Coq libraries; please use -coqlib option") let coqlib () = if !Flags.coqlib_spec then !Flags.coqlib else (if !Flags.boot then Coq_config.coqsrc else guess_coqlib ()) let docdir () = - reldir (if Coq_config.arch = "win32" then ["doc"] else ["share";"doc";"coq"]) "html" Coq_config.docdir + reldir (if Coq_config.arch = "win32" then ["doc"] else ["share";"doc";"coq"]) "html" (fun () -> Coq_config.docdir) let path_to_list p = let sep = if Sys.os_type = "Win32" then ';' else ':' in |
