sig
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 print : Format.formatter -> t -> unit
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 print_path_list : Format.formatter -> t list -> unit
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
type t = Ocamlbuild_pack.Tags.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 of_list : string list -> t
val print : Format.formatter -> t -> unit
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 tags = Ocamlbuild_pack.Tags.t
type pathname = string
type t =
Ocamlbuild_pack.Command.t =
Seq of t list
| Cmd of spec
| Echo of string list * pathname
| Nop
and 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 print : Format.formatter -> t -> unit
val to_string : t -> string
val string_of_command_spec : spec -> string
val string_target_and_tags_of_command_spec :
spec -> string * string * Ocamlbuild_pack.Tags.t
val iter_tags : (Ocamlbuild_pack.Tags.t -> unit) -> t -> unit
val fold_pathnames : (pathname -> 'a -> 'a) -> t -> 'a -> 'a
val digest : t -> Digest.t
val jobs : int ref
val tag_handler : (Ocamlbuild_pack.Tags.t -> spec) ref
val dump_parallel_stats : unit -> unit
val deps_of_tags : Ocamlbuild_pack.Tags.t -> pathname list
val dep : Ocamlbuild_pack.Tags.elt list -> pathname list -> unit
end
module Outcome :
sig
type ('a, 'b) t =
('a, 'b) Ocamlbuild_pack.My_std.Outcome.t =
Good of 'a
| Bad of 'b
val wrap : ('a -> 'b) -> 'a -> ('b, exn) t
val ignore_good : ('a, exn) t -> unit
val good : ('a, exn) t -> 'a
end
module String : Ocamlbuild_pack.Signatures.STRING
module List : Ocamlbuild_pack.Signatures.LIST
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
end
module Options :
sig
type command_spec = Command.spec
val build_dir : string ref
val include_dirs : string list ref
val exclude_dirs : string list ref
val nothing_should_be_rebuilt : bool ref
val ocamlc : command_spec ref
val ocamlopt : command_spec ref
val ocamldep : command_spec ref
val ocamldoc : command_spec ref
val ocamlyacc : command_spec ref
val ocamllex : command_spec ref
val ocamlrun : command_spec ref
val ocamlmklib : command_spec ref
val ocamlmktop : command_spec ref
val hygiene : bool ref
val sanitize : bool ref
val sanitization_script : string ref
val ignore_auto : bool ref
val plugin : bool ref
val just_plugin : bool ref
val native_plugin : bool ref
val make_links : bool ref
val nostdlib : bool ref
val program_to_execute : bool ref
val must_clean : bool ref
val catch_errors : bool ref
val use_menhir : bool ref
val show_documentation : bool ref
val recursive : bool ref
val targets : string list ref
val ocaml_libs : string list ref
val ocaml_cflags : string list ref
val ocaml_lflags : string list ref
val ocaml_ppflags : string list ref
val ocaml_yaccflags : string list ref
val ocaml_lexflags : string list ref
val program_args : string list ref
val ignore_list : string list ref
val tags : string list ref
val tag_lines : string list ref
val show_tags : string list ref
val ext_obj : string ref
val ext_lib : string ref
val ext_dll : string ref
end
module Arch : Ocamlbuild_pack.Signatures.ARCH
val opt_print :
(Format.formatter -> 'a -> unit) -> Format.formatter -> 'a option -> unit
val the : 'a option -> 'a
val getenv : ?default:string -> string -> string
val with_input_file : ?bin:bool -> string -> (in_channel -> 'a) -> 'a
val with_output_file : ?bin:bool -> string -> (out_channel -> 'a) -> 'a
val with_temp_file : string -> string -> (string -> 'a) -> 'a
val read_file : string -> string
val copy_chan : in_channel -> out_channel -> unit
val copy_file : string -> string -> unit
val print_string_list : Format.formatter -> string list -> unit
val ( !* ) : 'a Lazy.t -> 'a
val ( & ) : ('a -> 'b) -> 'a -> 'b
val ( |> ) : 'a -> ('a -> 'b) -> 'b
val ( @:= ) : 'a list ref -> 'a list -> unit
val memo : ('a -> 'b) -> 'a -> 'b
type command =
Command.t =
Seq of command list
| Cmd of spec
| Echo of string list * Pathname.t
| Nop
and 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:[ `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
val dep : Tags.elt list -> Pathname.t list -> unit
val flag : Tags.elt list -> Command.spec -> unit
val flag_and_dep : Tags.elt list -> Command.spec -> 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 tags_of_pathname : Pathname.t -> Tags.t
type hook =
Before_hygiene
| After_hygiene
| Before_options
| After_options
| Before_rules
| After_rules
val dispatch : (hook -> unit) -> unit
end