module Assemblage:sig..end
Assemblage provides functions to describe the structure of your
software project as a project description value. This
data structure allows tools known as assemblage drivers to
explore, build and manage your project.
Open the module to use it, this defines only modules, types and a few combinators in your scope.
Consult the basics.
Release %%VERSION%% — %%MAINTAINER%%
module String:sig..end
String module, string sets and maps.
module Fmt:sig..end
module Path:sig..end
module Log:sig..end
module Cmd:sig..end
module Conf:sig..end
module Ctx:sig..end
module Args:sig..end
module Acmd:sig..end
module Action:sig..end
typepart_kind =[ `Base | `Bin | `Dir | `Doc | `Lib | `Pkg | `Run | `Unit ]
type +[< part_kind ] part
module Part:sig..end
module Unit:sig..end
module Lib:sig..end
module Bin:sig..end
module Pkg:sig..end
module Doc:sig..end
module Dir:sig..end
module Run:sig..end
typepath =Path.t Conf.value
val root : pathroot is the current directory relative to the
project root.val (/) : path -> string -> pathpath / seg is Conf.(const Path.( / ) $ path $ const seg).val (//) : path ->
Path.rel Conf.value -> pathpath // rel is Conf.(const Path.( // ) $ path $ rel).val unit : ?usage:Part.usage ->
?exists:bool Conf.value ->
?args:Args.t ->
?needs:[< `Lib | `Pkg ] part list ->
?kind:Unit.kind ->
?dir:path ->
string -> [< part_kind > `Unit ] part
val lib : ?usage:Part.usage ->
?exists:bool Conf.value ->
?args:Args.t ->
?byte:bool ->
?native:bool ->
?native_dynlink:bool ->
?kind:Lib.kind ->
string ->
[< `Lib | `Pkg | `Unit ] part list ->
[< part_kind > `Lib ] part
val bin : ?usage:Part.usage ->
?exists:bool Conf.value ->
?args:Args.t ->
?byte:bool ->
?native:bool ->
?js:bool ->
?kind:Bin.kind ->
string ->
[< `Lib | `Pkg | `Unit ] part list ->
[< part_kind > `Bin ] part
val pkg : ?usage:Part.usage ->
?exists:bool Conf.value ->
?opt:bool ->
?kind:Pkg.kind ->
string -> [< part_kind > `Pkg ] part
val doc : ?usage:Part.usage ->
?exists:bool Conf.value ->
?args:Args.t ->
?keep:([< `Unit ] part -> bool) ->
?kind:Doc.kind ->
string ->
[< `Bin | `Lib | `Unit ] part list ->
[< part_kind > `Doc ] part
val dir : ?usage:Part.usage ->
?exists:bool Conf.value ->
?args:Args.t ->
?spec:Dir.spec ->
?install:bool ->
Dir.kind ->
[< `Base | `Bin | `Dir | `Doc | `Lib | `Unit ] part list ->
[< part_kind > `Dir ] partAssemblage.Dir.v.val file : ?usage:Part.usage ->
?exists:bool Conf.value ->
Path.t -> [< part_kind > `Base ] partAssemblage.Part.file.val run : ?usage:Part.usage ->
?exists:bool Conf.value ->
?args:Args.t ->
?dir:path ->
string ->
Action.t Conf.value ->
[< part_kind > `Run ] partAssemblage.Run.v. FIXME maybe removed that one from the toplevel.type project
module Project:sig..end
val assemble : project -> unitassemble p registers p for assembling by an assemblage driver.module Private:sig..end
An assemblage project is made of parts. This was very basic.
Make the project depend on direct conditions. E.g.
if Sys.file_exists file then Some (unit "src") else None
if Sys.win32 then ...
if Sys.ocaml_version = ...
That's the way of doing it:
let exists = Conf.(const Cmd.File.exists $ const (Path.file file)) in
unit ~exists "src"
TODO the rule to hammer in people's mind is the following:
don't do anything that doesn't make the set of configuration
keys constant on *every* load of the assemble.ml file. Maybe
we could still make an exception for a units combinator
that looksup the units in a directory automatically.
The build model behind assemblage has the following limitation.
?args optional argument.?args optional argument of creators.