Module Brzo.Conf

Configuration.

Configuration bits

module Bit : sig ... end

Configuration bits.

Default file names

val brzo_file_name : string

brzo_file_name is "BRZO" the default BRZO file name.

val brzo_dir_name : string

brzo_dir_name is "brzo" the default brzo directory name in the b0 directory.

Configuration

type outcome_mode = [
  1. | `Action
  2. | `Build
  3. | `Conf
  4. | `Delete
  5. | `Normal
  6. | `Path
]

The type for outcome modes.

type domain =
  1. | Domain : (module Pre_domain.T with type Conf.t = 'a) * string * 'a -> domain

The type for domain configurations. The pre-domain, its configured outcome name and its configuration value.

type t

The type for configurations.

val make : action_args:string list -> background:bool -> b0_dir:B0_std.Fpath.t -> brzo_file:B0_std.Fpath.t option -> cache_dir:B0_std.Fpath.t -> cwd:B0_std.Fpath.t -> domain_name:string option -> domain_confs:domain list -> hash_fun:(module B0_hash.T) -> jobs:int -> log_file:B0_std.Fpath.t -> no_pager:bool -> outcome_mode:outcome_mode -> output_outcome_path:bool -> pdf_viewer:B0_std.Cmd.t option -> root:B0_std.Fpath.t -> srcs_i:B0_std.Fpath.Set.t -> srcs_x:B0_std.Fpath.Set.t -> web_browser:B0_std.Cmd.t option -> unit -> t

v constructs a configuration with given attributes. See the accessors for semantics.

val action_args : t -> string list

action_args are the outcome action arguments.

val background : t -> bool

background is true if external viewers should be launched in the background.

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 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_name : t -> string option

domain_name is the name of the running domain (if any).

val domain_confs : t -> domain list

domain_confs is the list of domain specific configurations.

val domain_conf : t -> (module Pre_domain.T with type Conf.t = 'a) -> (string * 'a) option

domain_conf c d is the configuration for pre-domain d (if any). This is the domain's selected outcome and its configuration.

val log_file : t -> B0_std.Fpath.t

log_file is the absolute path to the build log file.

val hash_fun : t -> (module B0_hash.T)

hash_fun is the hash function to use for build caching.

val jobs : t -> int

jobs is the maximal number of spawns allowed.

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

memo is the memoizer for the configuration.

val no_pager : t -> bool

no_pager indicates no paging is desired on stdout.

val outcome_mode : t -> outcome_mode

outcome is the build outcome mode.

val output_outcome_path : t -> bool

output_outcome_path is true if the outcome path should be output at the end of the build.

val root : t -> B0_std.Fpath.t

root is absolute path to the brzo root.

val pdf_viewer : t -> B0_std.Cmd.t option

pdf_viewer is the PDF viewer command.

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 -> (B0_file_exts.map, string) Stdlib.result

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

val web_browser : t -> B0_std.Cmd.t option

web_browser is the WWW browser command to use.

val pp_auto : 'a B0_std.Fmt.t -> 'a option B0_std.Fmt.t

pp_auto pp formats "<auto>" for None and the value with pp otherwise.

val pp : t B0_std.Fmt.t

pp formats configurations. Does not format domain specific configuration.

val pp_with_header : t B0_std.Fmt.t

pp_with_header formats a header and the configuration with pp.