PLUGIN.Findlib
Findlib / Ocamlfind tools.
type command_spec = Command.spec
exception Findlib_error of error
val string_of_error : error -> string
Return a string message describing an error.
val report_error : error -> 'a
Report an error on the standard error and exit with code 2.
type package = {
name : string; | |
description : string; | |
version : string; | |
archives_byte : string; | (* Archive names, with the .cma extension, but without the directory. *) |
archives_native : string; | (* Archive names, with the .cmxa extension, but without the directory. *) |
link_options : string; | |
location : string; | |
dependencies : package list; | (* Transitive closure, as returned by |
}
Package information.
val query : string -> package
Query information about a package, given its name. May raise Not_found
.
Computes the transitive closure of a list of packages and sort them in topological order. Given any list of package l
, topological_closure l
returns a list of packages including l
and their dependencies, in an order where any element may only depend on the previous ones.
val include_flags : package list -> command_spec
Return the list of include directories.
val compile_flags_byte : package list -> command_spec
Return the flags to add when compiling in byte mode (include directories).
val compile_flags_native : package list -> command_spec
Same as compile_flags_byte
but for native mode.
val link_flags_byte : package list -> command_spec
Return the flags to add when linking in byte mode. It includes: include directories, libraries and special link options.
val link_flags_native : package list -> command_spec
Same as link_flags_byte
but for native mode.