Ninja_utils.Build
Helper module to build ninja build statements.
type t = {
outputs : Expr.t list; |
rule : string; |
inputs : Expr.t list option; |
vars : (string * Expr.t) list; |
}
Represents the minimal ninja build statement representation for Clerk:
build <outputs>: <rule> [<inputs>]
[<vars>]
val make_with_vars_and_inputs :
outputs:Expr.t list ->
rule:string ->
inputs:Expr.t list ->
vars:(string * Expr.t) list ->
t
make_with_vars ~outputs ~rule ~inputs ~vars
returns the corresponding ninja Build.t
.
unpath ~sep path
replaces all /
occurences with sep
in path
to avoid ninja writing the corresponding file and use it as sub command. By default, sep
is set to "-"
.
val format : Stdlib.Format.formatter -> t -> unit
format fmt build
outputs in fmt
the string representation of the ninja build
.