From 5c875b6ab907cb48b0d06aba48d4c733cfd2ff06 Mon Sep 17 00:00:00 2001 From: Hugo Herbelin Date: Sat, 12 Nov 2016 04:01:29 +0100 Subject: Relying on computation done in Envars to discover the installation directories. This allows to share the test for possible relocalisation done in envars.ml. --- lib/envars.ml | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/envars.ml') 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 = -- cgit v1.2.3