sig
type env = Ocamlbuild_pack.Pathname.t -> Ocamlbuild_pack.Pathname.t
type builder =
Ocamlbuild_pack.Pathname.t list list ->
(Ocamlbuild_pack.Pathname.t, exn) Ocamlbuild_pack.My_std.Outcome.t list
type action = env -> builder -> Ocamlbuild_pack.Command.t
type 'a gen_rule = 'a Ocamlbuild_pack.Rule.gen_rule
type rule = Ocamlbuild_pack.Pathname.t gen_rule
type rule_scheme = Ocamlbuild_pack.Resource.resource_pattern gen_rule
type 'a rule_printer =
(Format.formatter -> 'a -> unit) ->
Format.formatter -> 'a gen_rule -> unit
exception Failed
val name_of_rule : 'a gen_rule -> string
val deps_of_rule : 'a gen_rule -> Ocamlbuild_pack.Pathname.t list
val prods_of_rule : 'a gen_rule -> 'a list
val rule :
string ->
?tags:string list ->
?prods:string list ->
?deps:string list ->
?prod:string ->
?dep:string ->
?stamp:string ->
?insert:[ `after of string | `before of string | `bottom | `top ] ->
action -> unit
val copy_rule :
string ->
?insert:[ `after of string | `before of string | `bottom | `top ] ->
string -> string -> unit
module Common_commands :
sig
val mv :
Ocamlbuild_pack.Pathname.t ->
Ocamlbuild_pack.Pathname.t -> Ocamlbuild_pack.Command.t
val cp :
Ocamlbuild_pack.Pathname.t ->
Ocamlbuild_pack.Pathname.t -> Ocamlbuild_pack.Command.t
val cp_p :
Ocamlbuild_pack.Pathname.t ->
Ocamlbuild_pack.Pathname.t -> Ocamlbuild_pack.Command.t
val ln_f :
Ocamlbuild_pack.Pathname.t ->
Ocamlbuild_pack.Pathname.t -> Ocamlbuild_pack.Command.t
val ln_s :
Ocamlbuild_pack.Pathname.t ->
Ocamlbuild_pack.Pathname.t -> Ocamlbuild_pack.Command.t
val rm_f : Ocamlbuild_pack.Pathname.t -> Ocamlbuild_pack.Command.t
val chmod :
Ocamlbuild_pack.Command.spec ->
Ocamlbuild_pack.Pathname.t -> Ocamlbuild_pack.Command.t
val cmp :
Ocamlbuild_pack.Pathname.t ->
Ocamlbuild_pack.Pathname.t -> Ocamlbuild_pack.Command.t
end
val print : Format.formatter -> rule -> unit
val pretty_print : 'a rule_printer
val subst : Ocamlbuild_pack.Resource.env -> rule_scheme -> rule
val can_produce : Ocamlbuild_pack.Pathname.t -> rule_scheme -> rule option
val compare : 'a gen_rule -> 'a gen_rule -> int
val print_rule_name : Format.formatter -> 'a gen_rule -> unit
val print_rule_contents : 'a rule_printer
val get_rules : unit -> rule_scheme list
val clear_rules : unit -> unit
val call : builder -> rule -> unit
val build_deps_of_tags :
builder -> Ocamlbuild_pack.Tags.t -> Ocamlbuild_pack.Pathname.t list
end