aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorGravatar Enrico Tassi <Enrico.Tassi@inria.fr>2018-07-02 17:02:16 +0200
committerGravatar Enrico Tassi <Enrico.Tassi@inria.fr>2018-07-02 17:10:57 +0200
commit200fbd0cec4709bd1fb5f7a32e1c40270e343b5a (patch)
tree9f07efd99c113060391fd9e387a15fd09d016a50 /lib
parentf6f606232ae3c32e5c90d4fd427721875529b777 (diff)
[envars] honor env variable COQLIB
Diffstat (limited to 'lib')
-rw-r--r--lib/envars.ml2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/envars.ml b/lib/envars.ml
index be82bfe9b..3ee0c7106 100644
--- a/lib/envars.ml
+++ b/lib/envars.ml
@@ -110,6 +110,7 @@ let check_file_else ~dir ~file oth =
if Sys.file_exists (path / file) then path else oth ()
let guess_coqlib fail =
+ getenv_else "COQLIB" (fun () ->
let prelude = "theories/Init/Prelude.vo" in
check_file_else ~dir:Coq_config.coqlibsuffix ~file:prelude
(fun () ->
@@ -117,6 +118,7 @@ let guess_coqlib fail =
then Coq_config.coqlib
else
fail "cannot guess a path for Coq libraries; please use -coqlib option")
+ )
(** coqlib is now computed once during coqtop initialization *)