Home

Awesome

obuild

A parallel, incremental and declarative build system for OCaml.

Design

The goal is to make a very simple build system for users and developers of OCaml library and programs.

obuild acts as building black box: user declare only what they want to build and with which sources, and it will be consistently built. The design is based on Haskell's Cabal, and borrow most of the layout and way of working, adapting parts where necessary to support OCaml fully.

There's no way to build things that obuild has not been designed to do on purpose, so that the experience provided is consistent, and all future improvements to obuild will automatically benefit program and libraries using older versions. Currently unsupported features should be requested on the Github issue tracker.

Feature

How to build a project using obuild

obuild supports a few sub commands:

    obuild clean
    obuild configure
    obuild init
    obuild build
    obuild install
    obuild doc
    obuild test
    obuild sdist

How to write a project file

A project file is a file terminated by the .obuild extension. Only one per project is supported.

The content is declarative using a simple layout format. Every normal line needs to be in a "key: value" format. Multiple lines are supported by indenting (with spaces) the value related to the key.

    name: myproject
    version: 0.0.1
    description:
      This is my new cool project
      .
      This is a long description describing properly what the project does.
    licence: MyLicense
    authors: John Doe <john@doe.com>
    obuild-ver: 1
    homepage: http://my.server.com/myproject

The different target types:

Declaring an executable

    executable myexec
      main-is: mymain.ml
      src-dir: src
      build-deps: unix

Declaring a library

    library mylib
      modules: Module1, Module2
      src-dir: lib
      build-deps: mydep1, mydep2