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