Version franaise
Home About Download Resources Contact us
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: -- (:)
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 ----

http://git.dvide.com/pub/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 ----

http://git.dvide.com/pub/ocamlbuild-ctools
http://git.dvide.com/pub/ocamlbuild-ctools/tree/README


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 ----

http://git.dvide.com/pub/symbiosis
http://git.dvide.com/pub/symbiosis/tree/README

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.
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.

Future:

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.


Mikkel