English version
Accueil propos Tlchargement Ressources Contactez-nous

Ce site est rarement mis jour. Pour les informations les plus rcentes, rendez-vous sur le nouveau site OCaml l'adresse ocaml.org.

Browse thread
[ANN] ocamlbuild-ctools and symbiosis meta build engine
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-09-26 (23:57)
From: Mikkel_Fahnøe_Jørgensen <mikkel@d...>
Subject: [ANN] ocamlbuild-ctools and symbiosis meta build engine
I just dusted off some code used for internal builds and made it public.

---- cppinclude ----


A very simple but fast dependency scanner needed by ocamlbuild-ctools.
Just compile the cppinclude.c file to cppi binary and put it in the
executable path.

---- ocamlbuild-ctools ----


An ocamlbuild plugin that supports compiling C and C++ cross platform
using ocamlbuild only.

Variant builds - can build many different variants from the same
source tree. For example static libraries, test builds, debug,
optimization, linking or not linking with some other code, different
platform builds etc.

Automic recursive header file generation - needed for pulling source
into _build directory.
It used to be able to rebuild on header file change, but it has
regressed - it is possible that .stamp files do not hold signatures of
dependencies of dependencies or something.

It has not been tested on Windows, but build rules have been copied
from old build scripts so it should not be that hard to get going.

---- Symbiosis ----


This is a meta build system.
It is implemented as an ocamlbuild plugin.

It checks out source code from repositories and starts builds of
individual components.

Because ocamlbuild doesn't support linking additional files, a lot of
different code is collected in a single file. This includes a JSON
parser for configuration files.

Symbiosis tries to avoid the problem of collecting all source
dependencies in one large tree, or alternatively installing
dependencies on the system. The former makes it difficult to change
dependent component versions. The latter makes it difficult to quickly
test different build version complicates developer setup.

Correctly configured, just call ocamlbuild with a target for the top
most component to build. All the source should be appear in the
working directory and build.
Initially it can be complex to set up, but once done, it is rather
easy to add new components with interesting dependencies.

The README explains it, but it really lacks examples since it was
extracted from my own build infrastructure.

Each component is viewed as a source tree with actions that can depend
on other actions in other components. Typically checkout and build
Actions are implemented through agents - for example to execute make,
ocamlbuild or check out source code.
Actions receive parameters and return result arguments. This makes it
possible to find tool locations, libraries etc.


Currently agents need to be added to the ocamlbuild plugin. This is
easy - for example adding a new scm agent. But it would be nice to add
agents as external scripts. Symbiosis is designed to support this, but
it has not been implemented.

I have looked into integration with continuos build systems, but it
appears to be easier to integrate this into symbiosis also, since it
already does some of the work such a build system requires - but is
definitely is also missing some parts.