Module Brzo.Conf

Brzo configuration.

type domain_defs = B0_std.String.Set.t B0_std.String.Map.t

The type for domain definitions as far as brzo configuration is concerned: domain names mapped to their outcome names.

type outcome_mode = [
| `Action
| `Build
| `Delete
| `Normal
| `Where

The type for outcome modes.

type t

The type for configurations.

val v : action_args:string list -> b0_dir:B0_std.Fpath.t option -> brzo_file:B0_std.Fpath.t option -> cache_dir:B0_std.Fpath.t option -> cwd:B0_std.Fpath.t option -> domain:string option -> log_file:B0_std.Fpath.t option -> max_spawn:int option -> outcome:string option -> outcome_mode:outcome_mode option -> root:B0_std.Fpath.t option -> show_pdf:(B0_std.Fpath.t -> (unit, string) Stdlib.result) Stdlib.Lazy.t -> show_uri:(string -> (unit, string) Stdlib.result) Stdlib.Lazy.t -> srcs_i:B0_std.Fpath.t list -> srcs_x:B0_std.Fpath.t list -> domain_defs -> (t, string) Stdlib.result

v constructs a configuration with given attributes. If unspecified they are discovered or read from brzo_file.

val action_args : t -> string list

action_args are the outcome action arguments.

val brzo_file : t -> B0_std.Fpath.t option

brzo_file is the absolute path to the brzo file found at the root (if any).

val brzo_file_sexp : t -> B0_sexp.Sexp.t

brzo_file_sexp is the s-expression of the brzo file.

val b0_dir : t -> B0_std.Fpath.t

b0_dir is the absolute path to the b0 dir.

val cache_dir : t -> B0_std.Fpath.t

cache_dir is the absolute path to the cache directory.

val cwd : t -> B0_std.Fpath.t

cwd is the absolute path to the current working directoy.

val domain : t -> string option

domain is the domain, if specified.

val log_file : t -> B0_std.Fpath.t

log_file is the absolute path to the build log file.

val outcome : t -> string

outcome is the build outcome.

val outcome_mode : t -> outcome_mode

outcome is the outcome_mode.

val root : t -> B0_std.Fpath.t

root is absolute path to the brzo root.

val show_pdf : t -> B0_std.Fpath.t -> (unit, string) Stdlib.result

show_pdf c pdf tries to show file pdf in a PDF viewer.

val show_uri : t -> string -> (unit, string) Stdlib.result

show_uri c uri tries to show uri in a browser.

val srcs_i : t -> B0_std.Fpath.Set.t

srcs_i are absolute prefixes to include.

val srcs_x : t -> B0_std.Fpath.Set.t

srcs_x are absolute prefixes to exclude.

val srcs : t -> (, string) Stdlib.result

srcs c are the absolute sources files path in configuration c sorted by file extension.

val memo : t -> (B00.Memo.t, string) Stdlib.result

memo conf is a memoizer for configuration conf.

val pp : t B0_std.Fmt.t

pp formats configurations.