The first goal is to be able to generate most of the required file for ocamlbuild. The build tool of choice for OASIS will be ocamlbuild. Other build tools like OCamlMakefile and OMake should also be used, but this will be only secondary goals.
The minimum requirement for using OASIS is findlib and ocaml. It is used to detect available packages and install package. If the package doesn't depend on external package, findlib dependencies can be ignored.
We consider that a full build system should configure, build and install a software package.
The configure phase provides a way to set various options of the build system depending of software/hardware configurations and user choices. A project has requirements regarding third party softwares, this is its "build dependencies". The user's choices can also change the build scheme: don't build a module, use an alternate implementation for another. We call it the "user choices". The configure step try to auto detect various parameters and see if they match with "build dependencies" and "user choices". At the endi, the configure scheme should create files which summarize choices 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 this checks, use translated
_oasis
in setup.ml structure. - ocaml-autoconf: use translated
_oasis
in configure.ac, output setup.data.
The build phase should build all the project objects. It should take care of building native and bytecode object 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)
build phase use configure phase result through a generated file that list important variable regarding build process.
The test phase is optional. TODO
The doc phase is optional. TODO
The install phase install all generated objects into the target system.
OASIS provides 1 choice for install:
- internal (default): use ocamlfind to install library FileUtils to install data and executable.
install phase use configure phase result through a generated file that list important variable regarding build process.
TODO
TODO