Architecture
============

The first goal is to be able to generate most of the required files for
ocamlbuild. The default build tool for OASIS will be ocamlbuild.  Other build
tools like OCamlMakefile and OMake should also be usable, but supporting these
tools is a secondary goal.

The minimum requirements for using OASIS are `findlib` and `ocaml`. They are
used to detect available packages and install packages. If there are no external
dependencies, findlib dependencies can be ignored.

A full build system should be capable of configuring, building and installing a
software package.

configure
---------

The configure phase provides a way to set various options of the build system
depending on software/hardware configurations and user choices.  A project has
requirements regarding third party software; these are its "build dependencies".
The user's choices can also change the build scheme: don't build one module, use
an alternate implementation for another. We call these the "user choices". The
configure step tries to auto detect various parameters and see if they match
with the "build dependencies" and "user choices". At the end, the configure
scheme should create files which summarize the choices that were made.  Files
are created through replacement of variable in files `(%.ab -> %)`.

We rely on `_oasis` file to describe "user choices" (Flag) and "build
dependencies" (BuildDepends and BuildTools).

OASIS should provide 2 choices for configure:
- internal (default): an OCaml module is embedded in the project that perform
  all these checks, use translated `_oasis` in setup.ml structure.
- ocaml-autoconf: use translated `_oasis` in configure.ac, output setup.data.

build
-----

The build phase should build all the project objects. It should take care of
building native or bytecode objects depending on the target system.

OASIS provides 3 choices for build:
- ocamlbuild (default): use translated `_oasis` files (.mllib, .itarget...) and
  ocamlbuild shipped with ocaml, add ocamlbuild detection to configure
- OCamlMakefile: use translated `_oasis` files (Makefile) and OCamlMakefile
  shipped externally, add OCamlMakefile user choice and detection
- OMake: use translated `_oasis` files (TODO)

The build phase uses the result of the configure phase by reading a generated
file that lists important variables regarding the build process.

test
----

The test phase is optional.
TODO

doc
---

The doc phase is optional.
TODO

install
-------

The install phase installs all generated objects into the target system.

OASIS provides 1 choice for install:

- internal (default):
  - use ocamlfind to install library
  - use FileUtils to install data and executable.

The install phase uses the result of the configure phase by reading a generated
file that lists important variables regarding the build process.

OASIS files
-----------

TODO

Generating project skeleton
---------------------------

TODO

External tools
==============


ocamlconf
---------

yam
---

ocamlbuild
----------

OCamlMakefile
-------------

OMake
-----

godiva
------

ocaml-autoconf
--------------

ocamake
-------

Target system
=============

GODI
----

Debian
------

Fedora
------

Developer
----------
