forked from ocaml/dune
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.mli
124 lines (93 loc) · 3.42 KB
/
build.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
(** The build arrow *)
open! Import
type ('a, 'b) t
val arr : ('a -> 'b) -> ('a, 'b) t
val return : 'a -> (unit, 'a) t
module Vspec : sig
type 'a t = T : Path.t * 'a Vfile_kind.t -> 'a t
end
val store_vfile : 'a Vspec.t -> ('a, Action.t) t
module O : sig
val ( >>> ) : ('a, 'b) t -> ('b, 'c) t -> ('a, 'c) t
val ( ^>> ) : ('a -> 'b) -> ('b, 'c) t -> ('a, 'c) t
val ( >>^ ) : ('a, 'b) t -> ('b -> 'c) -> ('a, 'c) t
val ( *** ) : ('a, 'b) t -> ('c, 'd) t -> ('a * 'c, 'b * 'd) t
val ( &&& ) : ('a, 'b) t -> ('a, 'c) t -> ('a, 'b * 'c) t
end
val first : ('a, 'b) t -> ('a * 'c, 'b * 'c) t
val second : ('a, 'b) t -> ('c * 'a, 'c * 'b) t
(** Same as [O.(&&&)]. Sends the input to both argument arrows and combine their output.
The default definition may be overridden with a more efficient version if desired. *)
val fanout : ('a, 'b) t -> ('a, 'c) t -> ('a, 'b * 'c) t
val fanout3 : ('a, 'b) t -> ('a, 'c) t -> ('a, 'd) t -> ('a, 'b * 'c * 'd) t
val all : ('a, 'b) t list -> ('a, 'b list) t
val path : Path.t -> ('a, 'a) t
val paths : Path.t list -> ('a, 'a) t
val path_set : Path.Set.t -> ('a, 'a) t
val paths_glob : dir:Path.t -> Re.re -> ('a, 'a) t
val files_recursively_in : dir:Path.t -> ('a, 'a) t
val vpath : 'a Vspec.t -> (unit, 'a) t
val dyn_paths : ('a, Path.t list) t -> ('a, 'a) t
val contents : Path.t -> ('a, string) t
val lines_of : Path.t -> ('a, string list) t
(** Always fail when executed. We pass a function rather than an exception to get a proper
backtrace *)
val fail : ?targets:Path.t list -> fail -> (_, _) t
module Prog_spec : sig
type 'a t =
| Dep of Path.t
| Dyn of ('a -> Path.t)
end
val run
: ?dir:Path.t
-> ?stdout_to:Path.t
-> ?context:Context.t
-> ?extra_targets:Path.t list
-> 'a Prog_spec.t
-> 'a Arg_spec.t list
-> ('a, Action.t) t
val action
: ?dir:Path.t
-> ?context:Context.t
-> targets:Path.t list
-> Action.Mini_shexp.t
-> (unit, Action.t) t
(** Create a file with the given contents. Do not ovewrite the file if
it hasn't changed. *)
val update_file : Path.t -> string -> (unit, Action.t) t
val update_file_dyn : Path.t -> (string, Action.t) t
val copy : src:Path.t -> dst:Path.t -> (unit, Action.t) t
val symlink : src:Path.t -> dst:Path.t -> (unit, Action.t) t
val create_file : Path.t -> (unit, Action.t) t
val and_create_file : Path.t -> (Action.t, Action.t) t
type lib_dep_kind =
| Optional
| Required
val record_lib_deps
: dir:Path.t
-> kind:lib_dep_kind
-> Jbuild_types.Lib_dep.t list
-> ('a, 'a) t
type lib_deps = lib_dep_kind String_map.t
(**/**)
module Repr : sig
type ('a, 'b) t =
| Arr : ('a -> 'b) -> ('a, 'b) t
| Targets : Path.t list -> ('a, 'a) t
| Store_vfile : 'a Vspec.t -> ('a, Action.t) t
| Compose : ('a, 'b) t * ('b, 'c) t -> ('a, 'c) t
| First : ('a, 'b) t -> ('a * 'c, 'b * 'c) t
| Second : ('a, 'b) t -> ('c * 'a, 'c * 'b) t
| Split : ('a, 'b) t * ('c, 'd) t -> ('a * 'c, 'b * 'd) t
| Fanout : ('a, 'b) t * ('a, 'c) t -> ('a, 'b * 'c) t
| Paths : Path.Set.t -> ('a, 'a) t
| Paths_glob : Path.t * Re.re -> ('a, 'a) t
| Contents : Path.t -> ('a, string) t
| Lines_of : Path.t -> ('a, string list) t
| Vpath : 'a Vspec.t -> (unit, 'a) t
| Dyn_paths : ('a, Path.t list) t -> ('a, 'a) t
| Record_lib_deps : Path.t * lib_deps -> ('a, 'a) t
| Fail : fail -> (_, _) t
end
val repr : ('a, 'b) t -> ('a, 'b) Repr.t
val merge_lib_deps : lib_deps -> lib_deps -> lib_deps