• en

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 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 readdir : t -> t array
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 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 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
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 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 Pervasives.ref
val tag_handler : Ocamlbuild_pack.Tags.t -> spec Pervasives.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
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
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 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
val build_dir : string Pervasives.ref
val include_dirs : string list Pervasives.ref
val exclude_dirs : string list Pervasives.ref
val nothing_should_be_rebuilt : bool Pervasives.ref
val ocamlc : command_spec Pervasives.ref
val ocamlopt : command_spec Pervasives.ref
val ocamldep : command_spec Pervasives.ref
val ocamldoc : command_spec Pervasives.ref
val ocamlyacc : command_spec Pervasives.ref
val ocamllex : command_spec Pervasives.ref
val ocamlrun : command_spec Pervasives.ref
val ocamlmklib : command_spec Pervasives.ref
val ocamlmktop : command_spec Pervasives.ref
val hygiene : bool Pervasives.ref
val sanitize : bool Pervasives.ref
val sanitization_script : string Pervasives.ref
val ignore_auto : bool Pervasives.ref
val plugin : bool Pervasives.ref
val just_plugin : bool Pervasives.ref
val native_plugin : bool Pervasives.ref
val nostdlib : bool Pervasives.ref
val program_to_execute : bool Pervasives.ref
val must_clean : bool Pervasives.ref
val catch_errors : bool Pervasives.ref
val use_menhir : bool Pervasives.ref
val show_documentation : bool Pervasives.ref
val recursive : bool Pervasives.ref
val use_ocamlfind : bool Pervasives.ref
val targets : string list Pervasives.ref
val ocaml_libs : string list Pervasives.ref
val ocaml_mods : string list Pervasives.ref
val ocaml_pkgs : string list Pervasives.ref
val ocaml_syntax : string option Pervasives.ref
val ocaml_cflags : string list Pervasives.ref
val ocaml_lflags : string list Pervasives.ref
val ocaml_ppflags : string list Pervasives.ref
val ocaml_docflags : string list Pervasives.ref
val ocaml_yaccflags : string list Pervasives.ref
val ocaml_lexflags : string list Pervasives.ref
val program_args : string list Pervasives.ref
val ignore_list : string list Pervasives.ref
val tags : string list Pervasives.ref
val tag_lines : string list Pervasives.ref
val show_tags : string list Pervasives.ref
val ext_obj : string Pervasives.ref
val ext_lib : string Pervasives.ref
val ext_dll : string Pervasives.ref
val exe : string Pervasives.ref
val add : (string * Arg.spec * string) -> unit
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
end
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 -> Pervasives.in_channel -> 'a -> 'a
val with_output_file : ?bin:bool -> string -> Pervasives.out_channel -> 'a -> 'a
val with_temp_file : string -> string -> string -> 'a -> 'a
val read_file : string -> string
val copy_chan : Pervasives.in_channel -> Pervasives.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 Pervasives.ref -> 'a list -> unit
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 tags_of_pathname : Pathname.t -> Tags.t
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