aboutsummaryrefslogtreecommitdiff
path: root/checker
diff options
context:
space:
mode:
authorherbelin2011-04-14 18:47:38 +0000
committerherbelin2011-04-14 18:47:38 +0000
commitf36693e6a38ef7395905f7388da3d450cf5b3b5a (patch)
treeaad9678c1df92ab33a4f30611a8ccf7f0c48371b /checker
parent3f787586c709a75e73837e4384d10752079bc646 (diff)
Add directories in COQPATH to search path.
This is to allow users to install plugins when coq is installed system-wide. Signed-off-by: Tom Prince <tom.prince@ualberta.net> git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@14001 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'checker')
-rw-r--r--checker/checker.ml3
1 files changed, 3 insertions, 0 deletions
diff --git a/checker/checker.ml b/checker/checker.ml
index c2c21fbe29..0c9d7e2dc3 100644
--- a/checker/checker.ml
+++ b/checker/checker.ml
@@ -102,6 +102,7 @@ let set_rec_include d p =
let init_load_path () =
let coqlib = Envars.coqlib () in
let user_contrib = coqlib/"user-contrib" in
+ let coqpath = Envars.coqpath () in
let plugins = coqlib/"plugins" in
(* NOTE: These directories are searched from last to first *)
(* first standard library *)
@@ -111,6 +112,8 @@ let init_load_path () =
(* then user-contrib *)
if Sys.file_exists user_contrib then
add_rec_path ~unix_path:user_contrib ~coq_root:Check.default_root_prefix;
+ (* then directories in COQPATH *)
+ List.iter (fun s -> add_rec_path ~unix_path:s ~coq_root:Check.default_root_prefix) coqpath;
(* then current directory *)
add_path ~unix_path:"." ~coq_root:Check.default_root_prefix;
(* additional loadpath, given with -I -include -R options *)