package ninja_utils

  1. Overview
  2. Docs

Module Ninja_utilsSource

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.

What 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

Sourcemodule Var : sig ... end

Ninja variable names, distinguishing binding name ("x") from references in expressions ("$x")

Sourcemodule Expr : sig ... end

Helper module to build ninja expressions.

Sourcemodule Binding : sig ... end

Ninja rules

Sourcemodule Rule : sig ... end

Helper module to build ninja rules.

Ninja builds

Sourcemodule Build : sig ... end

Helper module to build ninja build statements.

Sourcemodule Default : sig ... end
Sourcetype def =
  1. | Comment of string
  2. | Binding of Binding.t
  3. | Rule of Rule.t
  4. | Build of Build.t
  5. | Default of Default.t
Sourceval comment : string -> def
Sourceval binding : Var.t -> Expr.t -> def
Sourceval rule : ?vars:Binding.t list -> string -> command:Expr.t -> description:Expr.t -> def
Sourceval build : ?inputs:Expr.t -> ?implicit_in:Expr.t -> outputs:Expr.t -> ?implicit_out:Expr.t -> ?vars:(Var.t * Expr.t) list -> string -> def
Sourceval default : Expr.t -> def
Sourceval format_def : Format.formatter -> def -> unit
Sourcetype ninja = def Seq.t
Sourceval format : Format.formatter -> ninja -> unit
OCaml

Innovation. Community. Security.