Module Ocamlbuild_plugin
module Pathname : sig
type t = string
val concat : t -> t -> t
val compare : t -> t -> int
val equal : t -> t -> bool
val exists : t -> bool
val mk : string -> t
val define_context : string -> string list -> unit
val include_dirs_of : string -> string list
val copy : t -> t -> unit
val to_string : t -> string
val current_dir_name : t
val parent_dir_name : t
val read : t -> string
val same_contents : t -> t -> bool
val basename : t -> t
val dirname : t -> t
val is_relative : t -> bool
val readlink : t -> t
val readdir : t -> t array
val is_link : t -> bool
val is_directory : t -> bool
val add_extension : string -> t -> t
val check_extension : t -> string -> bool
val get_extension : t -> string
val remove_extension : t -> t
val update_extension : string -> t -> t
val get_extensions : t -> string
val remove_extensions : t -> t
val update_extensions : string -> t -> t
val pwd : t
val parent : t -> t
val is_prefix : t -> t -> bool
val is_implicit : t -> bool
module Operators : sig
val (/) : t -> t -> t
val (-.-) : t -> string -> t
end
val link_to_dir : t -> t -> bool
val normalize : t -> t
end
module Tags : sig
type elt = string
val empty : t
val is_empty : t -> bool
val mem : elt -> t -> bool
val add : elt -> t -> t
val singleton : elt -> t
val remove : elt -> t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val compare : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val iter : elt -> unit -> t -> unit
val fold : elt -> 'a -> 'a -> t -> 'a -> 'a
val for_all : elt -> bool -> t -> bool
val exists : elt -> bool -> t -> bool
val filter : elt -> bool -> t -> t
val partition : elt -> bool -> t -> (t * t)
val cardinal : t -> int
val elements : t -> elt list
val min_elt : t -> elt
val max_elt : t -> elt
val choose : t -> elt
val split : elt -> t -> (t * bool * t)
val find : elt -> t -> elt
val of_list : string list -> t
val does_match : t -> t -> bool
module Operators : sig
val (++) : t -> elt -> t
val (--) : t -> elt -> t
val (+++) : t -> elt option -> t
val (---) : t -> elt option -> t
end
end
module Command : sig
type pathname = string
type t = Ocamlbuild_pack.Command.t =
| Seq of t list
| Cmd of spec
| Echo of string list * pathname
| Nop
type spec = Ocamlbuild_pack.Command.spec =
| N
| S of spec list
| A of string
| P of pathname
| Px of pathname
| Sh of string
| T of tags
| V of string
| Quote of spec
val atomize : string list -> spec
val atomize_paths : string list -> spec
val execute : ?quiet:bool -> ?pretend:bool -> t -> unit
val execute_many : ?quiet:bool -> ?pretend:bool -> t list -> (bool list * exn) option
val setup_virtual_command_solver : string -> unit -> spec -> unit
val search_in_path : string -> string
val reduce : spec -> spec
val to_string : t -> string
val string_of_command_spec : spec -> string
val fold_pathnames : pathname -> 'a -> 'a -> t -> 'a -> 'a
val dump_parallel_stats : unit -> unit
val pdep : Ocamlbuild_pack.Tags.elt list -> Ocamlbuild_pack.Tags.elt -> string -> pathname list -> unit
val file_or_exe_exists : string -> bool
end
module Outcome : sig
val wrap : 'a -> 'b -> 'a -> ('b, exn) t
val ignore_good : ('a, exn) t -> unit
val good : ('a, exn) t -> 'a
end
module StringSet : sig
type elt = String.t
type t
val empty : t
val is_empty : t -> bool
val mem : elt -> t -> bool
val add : elt -> t -> t
val singleton : elt -> t
val remove : elt -> t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val compare : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val iter : elt -> unit -> t -> unit
val fold : elt -> 'a -> 'a -> t -> 'a -> 'a
val for_all : elt -> bool -> t -> bool
val exists : elt -> bool -> t -> bool
val filter : elt -> bool -> t -> t
val partition : elt -> bool -> t -> (t * t)
val cardinal : t -> int
val elements : t -> elt list
val min_elt : t -> elt
val max_elt : t -> elt
val choose : t -> elt
val split : elt -> t -> (t * bool * t)
val find : elt -> t -> elt
val of_list : elt list -> t
end
module Options : sig
type command_spec = Command.spec
end
module Findlib : sig
type command_spec = Command.spec
type error =
| Cannot_run_ocamlfind
| Dependency_not_found of string * string
| Package_not_found of string
| Cannot_parse_query of string * string
exception Findlib_error of error
val string_of_error : error -> string
val report_error : error -> 'a
type package = {
name : string;
description : string;
version : string;
archives_byte : string;
archives_native : string;
link_options : string;
location : string;
dependencies : package list;
}
val query : string -> package
val list : unit -> string list
val topological_closure : package list -> package list
val compile_flags_byte : package list -> command_spec
val compile_flags_native : package list -> command_spec
val link_flags_byte : package list -> command_spec
val link_flags_native : package list -> command_spec
end
val the : 'a option -> 'a
val getenv : ?default:string -> string -> string
val with_temp_file : string -> string -> string -> 'a -> 'a
val read_file : string -> string
val copy_file : string -> string -> unit
val (&) : 'a -> 'b -> 'a -> 'b
val (|>) : 'a -> 'a -> 'b -> 'b
val memo : 'a -> 'b -> 'a -> 'b
val memo2 : 'a -> 'b -> 'c -> 'a -> 'b -> 'c
val memo3 : 'a -> 'b -> 'c -> 'd -> 'a -> 'b -> 'c -> 'd
type command = Command.t =
| Seq of command list
| Cmd of spec
| Echo of string list * Pathname.t
| Nop
type spec = Command.spec =
| N
| S of spec list
| A of string
| P of string
| Px of string
| Sh of string
| T of Tags.t
| V of string
| Quote of spec
val (/) : Pathname.t -> Pathname.t -> Pathname.t
val (-.-) : Pathname.t -> string -> Pathname.t
val (++) : Tags.t -> Tags.elt -> Tags.t
val (--) : Tags.t -> Tags.elt -> Tags.t
val (+++) : Tags.t -> Tags.elt option -> Tags.t
val (---) : Tags.t -> Tags.elt option -> Tags.t
type env = Pathname.t -> Pathname.t
type builder = Pathname.t list list -> (Pathname.t, exn) Outcome.t list
type action = env -> builder -> Command.t
val rule : string -> ?tags:string list -> ?prods:string list -> ?deps:string list -> ?prod:string -> ?dep:string -> ?stamp:string -> ?insert:TODO: a -> ?doc:string -> action -> unit
val copy_rule : string -> ?insert:TODO: a -> string -> string -> unit
val clear_rules : unit -> unit
val dep : Tags.elt list -> Pathname.t list -> unit
val pdep : Tags.elt list -> Tags.elt -> string -> Pathname.t list -> unit
val flag : Tags.elt list -> Command.spec -> unit
val pflag : Tags.elt list -> Tags.elt -> string -> Command.spec -> unit
val flag_and_dep : Tags.elt list -> Command.spec -> unit
val pflag_and_dep : Tags.elt list -> Tags.elt -> string -> Command.spec -> unit
val mark_tag_used : Tags.elt -> unit
val non_dependency : Pathname.t -> string -> unit
val use_lib : Pathname.t -> Pathname.t -> unit
val ocaml_lib : ?extern:bool -> ?byte:bool -> ?native:bool -> ?dir:Pathname.t -> ?tag_name:string -> Pathname.t -> unit
val expand_module : Pathname.t list -> Pathname.t -> string list -> Pathname.t list
val string_list_of_file : Pathname.t -> string list
val module_name_of_pathname : Pathname.t -> string
val mv : Pathname.t -> Pathname.t -> Command.t
val cp : 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
val hide_package_contents : string -> unit
val tag_file : Pathname.t -> Tags.elt list -> unit
val tag_any : Tags.elt list -> unit
val run_and_read : string -> string
type hook =
| Before_hygiene
| After_hygiene
| Before_options
| After_options
| Before_rules
| After_rules
val dispatch : hook -> unit -> unit