This commit is contained in:
Jeremie Dimino 2017-07-19 15:33:16 +01:00
parent 2b93f960b6
commit 45e04010c5
2 changed files with 25 additions and 15 deletions

View File

@ -28,13 +28,14 @@ let dir ~context ~scope = function
dir
else begin
match lib.public with
| Some {sub_dir;package; _} ->
| Some {sub_dir; package; _} ->
let install_dir = Config.local_install_dir ~context in
Path.relative
(Path.append install_dir (Install.lib_install_path ~package))
(Option.value ~default:"" sub_dir)
| _ -> code_errorf "The non public library %s is accessed in %s outside its scope." lib.name
(Jbuild.Scope.name scope)
| _ ->
code_errorf "The non public library %s is accessed in %s outside its scope."
lib.name (Jbuild.Scope.name scope)
end
| External pkg -> pkg.dir

View File

@ -12,22 +12,31 @@ module Set : Set.S with type elt := t
(*val deps : t -> string list*)
val include_paths :
context:string -> scope:Jbuild.Scope.t ->
t list -> Path.Set.t
(** The scope given is the current one *)
val include_paths
: context:string
-> scope:Jbuild.Scope.t
-> t list
-> Path.Set.t
val include_flags :
context:string -> scope:Jbuild.Scope.t ->
t list -> _ Arg_spec.t
val include_flags
: context:string
-> scope:Jbuild.Scope.t
-> t list
-> _ Arg_spec.t
val c_include_flags :
context:string -> scope:Jbuild.Scope.t ->
t list -> _ Arg_spec.t
val c_include_flags
: context:string
-> scope:Jbuild.Scope.t
-> t list
-> _ Arg_spec.t
val link_flags :
context:string -> scope:Jbuild.Scope.t ->
t list -> mode:Mode.t -> _ Arg_spec.t
val link_flags
: context:string
-> scope:Jbuild.Scope.t
-> t list
-> mode:Mode.t
-> _ Arg_spec.t
val archive_files : t list -> mode:Mode.t -> ext_lib:string -> Path.t list