Module B00.Env
Build environment.
Build environments control tool lookup and the environment of tool spawns.
Tool lookup
type tool_lookup= B0_std.Cmd.tool -> (B0_std.Fpath.t, string) Stdlib.resultThe type for tool lookups. Given a command line tool specification returns a file path to the tool executable or an error message mentioning the tool if it cannot be found.
val env_tool_lookup : ?sep:string -> ?var:string -> B0_std.Os.Env.t -> tool_lookupenv_tool_lookup ~sep ~var envis a tool lookup that gets the value of thevarvariable inenvtreats it as asepseparated search path and uses the result to lookup withB0_std.Os.Cmd.must_find.vardefaults toPATHandseptoB0_std.Fpath.search_path_sep.
Environment
val v : ?lookup:tool_lookup -> ?forced_env:B0_std.Os.Env.t -> B0_std.Os.Env.t -> tv ~lookup ~forced_env envis a build environment with:lookupused to find build tools. Defaults toenv_tool_lookup env.forced_envis environment forced on any tool despite what it declared to access, defaults toOs.Env.emptyenvthe environment read by the tools' declared environment variables.
val env : t -> B0_std.Os.Env.tenv eise's available spawn environment.
val forced_env : t -> B0_std.Os.Env.tforced_env eise's forced spawn environment.
val tool : t -> B0_std.Cmd.tool -> (B0_std.Fpath.t, string) Stdlib.resulttool e tlooks up tooltine.