package ninja_utils

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Helper module to build ninja build statements.

type t

Represents the minimal ninja build statement representation for Clerk:

build <outputs>: <rule> [<inputs>]
  [<vars>]
val make : ?inputs:Expr.t -> ?implicit_in:Expr.t -> outputs:Expr.t -> ?implicit_out:Expr.t -> ?vars:(Var.t * Expr.t) list -> string -> t

make ~outputs rule returns the corresponding ninja Build.t.

val empty : t

empty is the minimal ninja Build.t with "empty" as outputs and "phony" as rule.

val unpath : ?sep:string -> string -> string

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.

OCaml

Innovation. Community. Security.