aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/envars.ml
diff options
context:
space:
mode:
authorGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2016-11-12 04:01:29 +0100
committerGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2017-05-29 12:12:57 +0200
commit5c875b6ab907cb48b0d06aba48d4c733cfd2ff06 (patch)
treeaec2a11ab2b73620eb02b49c412f645f7241f868 /lib/envars.ml
parent66b98ecd41bac232bbee19a9b3484feefd71df3c (diff)
Relying on computation done in Envars to discover the installation directories.
This allows to share the test for possible relocalisation done in envars.ml.
Diffstat (limited to 'lib/envars.ml')
-rw-r--r--lib/envars.ml5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/envars.ml b/lib/envars.ml
index 78f14273d..bc8012297 100644
--- a/lib/envars.ml
+++ b/lib/envars.ml
@@ -135,6 +135,11 @@ let datadir () =
let path = use_suffix coqroot Coq_config.datadirsuffix in
if Sys.file_exists path then path else Coq_config.datadir
+let configdir () =
+ (* This assumes implicitly that the suffix is non-trivial *)
+ let path = use_suffix coqroot Coq_config.configdirsuffix in
+ if Sys.file_exists path then path else Coq_config.configdir
+
let coqpath =
let coqpath = getenv_else "COQPATH" (fun () -> "") in
let make_search_path path =