Skip to content

Commit

Permalink
opam config -env now exports MANPATH
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent Bernardoff committed Sep 6, 2012
1 parent 13c2a84 commit 79f8fc7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/client.ml
Expand Up @@ -1106,7 +1106,9 @@ let get_env t =
let add_to_env = File.Comp.env comp in
let toplevel_dir =
"OCAML_TOPLEVEL_PATH", "=", Dirname.to_string (Path.C.toplevel t.compiler) in
let new_env = new_path :: toplevel_dir :: add_to_env in
let man_path =
"MANPATH", "+=", Dirname.to_string (Path.C.man_dir t.compiler) in
let new_env = new_path :: man_path :: toplevel_dir :: add_to_env in

let add_to_env = expand_env t add_to_env in
let new_env = expand_env t new_env in
Expand Down
2 changes: 2 additions & 0 deletions src/path.ml
Expand Up @@ -71,6 +71,8 @@ module C = struct

let doc_dir t = t / "doc"

let man_dir t = t / "man"

let doc t n = doc_dir t / N.to_string n

let bin t = t / "bin"
Expand Down
3 changes: 3 additions & 0 deletions src/path.mli
Expand Up @@ -49,6 +49,9 @@ module C: sig
(** Documentation path: {i $opam/$OVERSION/doc/} *)
val doc_dir: t -> dirname

(** Man pages path: {i $opam/$OVERSION/man/} *)
val man_dir: t -> dirname

(** Installed binaries: {i $opam/$OVERSION/bin} *)
val bin: t -> dirname

Expand Down

0 comments on commit 79f8fc7

Please sign in to comment.