Skip to content
Browse files

also install %{prefix}/man/man[1-9] in a switch

  • Loading branch information...
1 parent ba9cbff commit 1e493717b45e2cf40dc381856561c0d7322fb711 @avsm avsm committed Oct 10, 2012
Showing with 10 additions and 3 deletions.
  1. +3 −0 src/opamClient.ml
  2. +4 −1 src/opamPath.ml
  3. +3 −2 src/opamPath.mli
View
3 src/opamClient.ml
@@ -1004,6 +1004,9 @@ let init_ocaml t quiet alias compiler =
OpamFilename.mkdir (OpamPath.Alias.man_dir t.root alias);
OpamFilename.mkdir (OpamPath.Alias.install_dir t.root alias);
OpamFilename.mkdir (OpamPath.Alias.config_dir t.root alias);
+ List.iter (fun num ->
+ OpamFilename.mkdir (OpamPath.Alias.man_dir ~num t.root alias)
+ ) ["1";"1M";"2";"3";"4";"5";"6";"7";"9"];
let comp = OpamFile.Comp.read comp_f in
begin try
View
5 src/opamPath.ml
@@ -62,7 +62,10 @@ module Alias = struct
let doc_dir t a = root t a / "doc"
- let man_dir t a = root t a / "man"
+ let man_dir ?num t a =
+ match num with
+ | None -> root t a / "man"
+ | Some n -> root t a / "man" / ("man" ^ n)
let doc t a n = doc_dir t a / OpamPackage.Name.to_string n
View
5 src/opamPath.mli
@@ -87,8 +87,9 @@ module Alias: sig
(** Documentation path: {i $opam/$OVERSION/doc/} *)
val doc_dir: t -> alias -> dirname
- (** Man pages path: {i $opam/$OVERSION/man/} *)
- val man_dir: t -> alias -> dirname
+ (** Man pages path: {i $opam/$OVERSION/man/}. The optional
+ [num] argument will add a {i manN } suffix if specified *)
+ val man_dir: ?num:string -> t -> alias -> dirname
(** Installed binaries: {i $opam/$OVERSION/bin} *)
val bin: t -> alias -> dirname

0 comments on commit 1e49371

Please sign in to comment.
Something went wrong with that request. Please try again.