From 0119b13c5003fd8d471c744e353d38a7e2cc9c9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Bobot?= Date: Tue, 21 Aug 2018 16:03:10 +0200 Subject: [PATCH] Extends the environment with the variable OCAMLFIND_IGNORE_DUPS_IN MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Prevent ocamlfind to warn about multiple definition if the library is also installed Signed-off-by: François Bobot --- src/context.ml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/context.ml b/src/context.ml index 86e49ea8..f5864736 100644 --- a/src/context.ml +++ b/src/context.ml @@ -302,14 +302,19 @@ let create ~(kind : Kind.t) ~path ~env ~env_nodes ~name ~merlin ~targets | Some prev -> (var, sprintf "%s%c%s" v path_sep prev) in let vars = + let local_lib_path = + (Path.relative + (Config.local_install_dir ~context:name) + "lib") + in [ extend_var "CAML_LD_LIBRARY_PATH" (Path.relative (Config.local_install_dir ~context:name) "lib/stublibs") ; extend_var "OCAMLPATH" ~path_sep:ocamlpath_sep - (Path.relative - (Config.local_install_dir ~context:name) - "lib") + local_lib_path + ; extend_var "OCAMLFIND_IGNORE_DUPS_IN" ~path_sep:ocamlpath_sep + local_lib_path ; extend_var "MANPATH" (Config.local_install_man_dir ~context:name) ; "DUNE_CONFIGURATOR", (Path.to_string ocamlc)