Module Makefile

module Makefile: sig .. end
Makefiles.

Functions to specify and generate Makefiles.



Makefile variables


type var 
The type for makefile variable declarations.

Note. In the following functions. The right hand-side of variables is a list of strings. On output these strings are separated by one space and can be used as a break point if the line becomes too long.
val (===) : string -> string list -> [> `Var of var ]
v === def is v = def.
val (=:=) : string -> string list -> [> `Var of var ]
v =:= def is v := def.
val (=::=) : string -> string list -> [> `Var of var ]
v =::= def is v ::= def.
val (=+=) : string -> string list -> [> `Var of var ]
v =+= def is v += def.
val (=?=) : string -> string list -> [> `Var of var ]
v =+= def is v += def.
module Infix: sig .. end
Infix operators.

Rules


type rule 
The type for makefile rules.
val rule : ?ext:bool ->
?order_only_prereqs:string list ->
targets:string list ->
prereqs:string list ->
recipe:string list list -> unit -> [> `Rule of rule ]
rule ext order_only_prereqs targets prerequs recipe () is a makefile rule. ext indicates whether the rule should be extensible (double colon rule, defaults to false).

recipe is a list of commands. Commands are list of strings. On output the later strings are separated by one space and can be used as a break point if the line becomes too long.


Makefiles


type statement = [ `Rule of rule | `Var of var ] 
The type for makefile statements.
type t = [ `Blank | `Comment of string | `Rule of rule | `Var of var ]
list
The type for makefiles.
val to_string : t -> string
to_string m is m as a string.