Module Ninja_utils

What (** This library contains the implementations of utility functions used to generate Ninja build files in OCaml with almost no dependencies -- it only depends on Re. It's currently developed to be used by Clerk, the Catala build system. Therefore, the library supports only very basic features required by Clerk. *) is Ninja?

Ninja is a low-level build system. It's designed to have its input files (build.ninja) generated by a higher-level build system, and to run builds as fast as possible by supporting native cross-platform (Windows and Unix) parallel builds.

See the manual for more details.

Ninja expressions

module Expr : sig ... end

Helper module to build ninja expressions.

Ninja rules

module Rule : sig ... end

Helper module to build ninja rules.

Ninja builds

module Build : sig ... end

Helper module to build ninja build statements.

Maps

module RuleMap : Stdlib.Map.S with type key = Stdlib.String.t
module BuildMap : Stdlib.Map.S with type key = Stdlib.String.t

Ninja

type ninja = {
rules : Rule.t RuleMap.t;
builds : Build.t BuildMap.t;
}

Represents the minimal ninja architecture (list of rule and build statements) needed for clerk.

val empty : ninja

empty returns the empty empty ninja structure.

val format : Stdlib.Format.formatter -> ninja -> unit

format fmt build outputs in fmt the string representation of all ninja.rules and ninja.builds.