forked from ocaml/ocaml
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathocaml_dependencies.mli
45 lines (38 loc) · 2.1 KB
/
ocaml_dependencies.mli
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
(***********************************************************************)
(* *)
(* ocamlbuild *)
(* *)
(* Nicolas Pouillard, Berke Durak, projet Gallium, INRIA Rocquencourt *)
(* *)
(* Copyright 2007 Institut National de Recherche en Informatique et *)
(* en Automatique. All rights reserved. This file is distributed *)
(* under the terms of the GNU Library General Public License, with *)
(* the special exception on linking described in file ../LICENSE. *)
(* *)
(***********************************************************************)
(* Original author: Nicolas Pouillard *)
(** OCaml dependencies *)
exception Circular_dependencies of string list * string
(** Give to this module a way to access libraries, packages,
and dependencies between files. *)
module type INPUT = sig
val fold_dependencies : (string -> string -> 'a -> 'a) -> 'a -> 'a
val fold_libraries : (string -> string list -> 'a -> 'a) -> 'a -> 'a
val fold_packages : (string -> string list -> 'a -> 'a) -> 'a -> 'a
end
(** Wait an [INPUT] module and gives a function to compute the
transitive closure of caml file takeing in account libraries and packages. *)
module Make (I : INPUT) : sig
(** [caml_transitive_closure] takes a list of root ocaml compiled files and returns
the list of files that must be given to a linker. Optionally you can change the
extension of caml object/library files (cmo/cma by default); use the pack mode
(false by default) to include only root files (just sort them); and gives the
list of used libraries (empty by default). *)
val caml_transitive_closure :
?caml_obj_ext:string ->
?caml_lib_ext:string ->
?pack_mode:bool ->
?used_libraries:string list ->
?hidden_packages:string list ->
Pathname.t list -> Pathname.t list
end