module OASISTypes:sig
..end
Package definition
This module contains all the types used to build an OASIS package. A package is described by an '_oasis' file.
typename =
string
Standard name.
typepackage_name =
string
Name of a package, see OASISTypes.package
.
typeurl =
string
Standard URL.
typeunix_dirname =
string
UNIX directory name.
typeunix_filename =
string
UNIX file name.
typehost_dirname =
string
Host directory name.
typehost_filename =
string
Host file name.
typeprog =
string
Program.
typearg =
string
Command line argument.
typeargs =
arg list
Command line arguments.
typecommand_line =
prog * args
Command line.
typefindlib_name =
string
Package name for findlib, doesn't contain '.'.
typefindlib_full =
string
Package name + path for findlib, made of several findlib name concatenated with '.'.
type
compiled_object =
| |
Byte |
(* | Always use byte code. | *) |
| |
Native |
(* | Always use native code. | *) |
| |
Best |
(* | Use either byte or native, depending ocamlopt availability. | *) |
Compilation type.
type
dependency =
| |
FindlibPackage of |
(* | External findlib package. | *) |
| |
InternalLibrary of |
(* | Section library of the given name. | *) |
Package dependency.
type
tool =
| |
ExternalTool of |
(* | External tool. | *) |
| |
InternalExecutable of |
(* | Section executable of the given name. | *) |
Tool dependency.
type
vcs =
| |
Darcs |
(* | Darcs | *) |
| |
Git |
(* | Git | *) |
| |
Svn |
(* | Subversion | *) |
| |
Cvs |
(* | CVS | *) |
| |
Hg |
(* | Mercurial | *) |
| |
Bzr |
(* | Bazaar | *) |
| |
Arch |
(* | GNU arch | *) |
| |
Monotone |
(* | Monotone | *) |
| |
OtherVCS of |
(* | Anything else, follow URL for description. | *) |
Possible VCS.
type'a
conditional ='a OASISExpr.choices
Conditional value, last expression that evaluate to true define the value.
typeplugin_kind =
[ `Build | `Configure | `Doc | `Extra | `Install | `Test ]
Plugin kind.
typeplugin_data_purpose =
[ `Build
| `Clean
| `Configure
| `Distclean
| `Doc
| `Extra
| `Install
| `Other of string
| `Test
| `Uninstall ]
Additional data to allow registration of more than
one data property per plugin. See OASISPlugin.data_new_property
type'a
plugin ='a * name * OASISVersion.t option
Plugin definition, plugin type depends on which fields this types is used for.
typeall_plugin =
plugin_kind plugin
typeplugin_data =
(all_plugin * plugin_data_purpose * (unit -> unit))
list
Property list storage for plugin data
type
custom = {
|
pre_command : |
(* | Run before. | *) |
|
post_command : |
(* | Run after. | *) |
Set of command lines to run before and after a step.
type
common_section = {
|
cs_name : |
(* | Name of the section. | *) |
|
cs_data : |
|||
|
cs_plugin_data : |
(* | Property list attached to the section. | *) |
Common attributes for sections.
type
build_section = {
|
bs_build : |
(* | Build this section. | *) |
|
bs_install : |
(* | Install this section. | *) |
|
bs_path : |
(* | Top level location of the sources. | *) |
|
bs_compiled_object : |
(* | What kind of compilation. | *) |
|
bs_build_depends : |
(* | List of dependencies. | *) |
|
bs_build_tools : |
(* | List of build tools. | *) |
|
bs_interface_patterns : |
(* | Patterns used to locate interface source filesi (.mli). | *) |
|
bs_implementation_patterns : |
(* | Patterns used to locate implementation source files (.ml). | *) |
|
bs_c_sources : |
(* | C sources, relative to | *) |
|
bs_data_files : |
(* | Data files and their install location, relative to | *) |
|
bs_findlib_extra_files : |
(* | Extra files to install with findlib. | *) |
|
bs_ccopt : |
(* | Options for -ccopt. | *) |
|
bs_cclib : |
(* | Options for -cclib. | *) |
|
bs_dlllib : |
(* | Options for -dllib. | *) |
|
bs_dllpath : |
(* | Options for -dllpath. | *) |
|
bs_byteopt : |
(* | Option to pass to ocamlc. | *) |
|
bs_nativeopt : |
(* | Option to pass to ocamlopt. | *) |
Common attributes for Executable and Library sections.
type
library = {
|
lib_modules : |
(* | List of modules exported by the library. | *) |
|
lib_pack : |
(* | Are we building a packed library? | *) |
|
lib_internal_modules : |
(* | List of modules not-exported by the library, but compiled along. | *) |
|
lib_findlib_parent : |
(* | Name of the findlib parent, if any. | *) |
|
lib_findlib_name : |
(* | Findlib name of this library, this name is used to refer to this library in build dependencies. | *) |
|
lib_findlib_directory : |
(* | Findlib sub-directory where the library will be installed. This directory is actually relative to the directory of the findlib parent. | *) |
|
lib_findlib_containers : |
(* | Name of virtual containers (empty findlib package) between findlib parent and findlib name | *) |
Library definition.
type
object_ = {
|
obj_modules : |
|||
|
obj_findlib_fullname : |
(* | Findlib name of this library, this name is used to refer to this library in build dependencies. | *) |
|
obj_findlib_directory : |
(* | *) |
Object definition.
type
executable = {
|
exec_custom : |
(* | Use -custom ocamlc option. | *) |
|
exec_main_is : |
(* | Main file to compile, dependencies should be guessed by build system. | *) |
Executable definition.
type
flag = {
|
flag_description : |
(* | Short description. | *) |
|
flag_default : |
(* | Default value. | *) |
Command line flag definition.
type
source_repository = {
|
src_repo_type : |
(* | Repository type. | *) |
|
src_repo_location : |
(* | Where to fetch the source, using appropriate VCS tool. | *) |
|
src_repo_browser : |
(* | Where to browse the source, using web browser. | *) |
|
src_repo_module : |
(* | Depending on VCS, which module (e.g. CVS). | *) |
|
src_repo_branch : |
(* | Depending on VCS, which branch (e.g. git). | *) |
|
src_repo_tag : |
(* | Depending on VCS, which tag (e.g. tag for darcs, git or svn). | *) |
|
src_repo_subdir : |
(* | Depending on VCS, which sub directory (e.g. svn). | *) |
Source repository definition.
type
test = {
|
test_type : |
(* | Plugin to run the test, default custom. | *) |
|
test_command : |
(* | Command to run the test, may depend on the plugin meaning. | *) |
|
test_custom : |
(* | Custom command lines to run before and after. | *) |
|
test_working_directory : |
(* | Which working directorty to chdir in. | *) |
|
test_run : |
(* | Should we run the test. | *) |
|
test_tools : |
(* | Tools required for this test. | *) |
Test definition.
type
doc_format =
| |
HTML of |
(* | HTML files and their main entry point
(e.g. | *) |
| |
DocText |
(* | Plain text. | *) |
| |
PDF |
(* | Portable document format. | *) |
| |
PostScript |
|||
| |
Info of |
(* | Info files and their main entry point. | *) |
| |
DVI |
|||
| |
OtherDoc |
(* | Anything else. | *) |
Document formats.
type
doc = {
|
doc_type : |
(* | Plugin to build this document, default none. | *) |
|
doc_custom : |
(* | Custom command lines ommand to before and after. | *) |
|
doc_build : |
(* | Build this document. | *) |
|
doc_install : |
(* | Install this document. | *) |
|
doc_install_dir : |
(* | Where to install this document. | *) |
|
doc_title : |
(* | What is the title of this document. | *) |
|
: |
(* | Who are the authors of this document. | *) |
|
doc_abstract : |
(* | Abstract of this document. | *) |
|
doc_format : |
(* | Format of this document. | *) |
|
doc_data_files : |
(* | All data files and where they should be install, by default to doc_install_dir | *) |
|
doc_build_tools : |
(* | Tools required to generate this document. | *) |
Document definition.
type
section =
| |
Library of |
| |
Object of |
| |
Executable of |
| |
Flag of |
| |
SrcRepo of |
| |
Test of |
| |
Doc of |
All sections and their attributes.
typesection_kind =
[ `Doc | `Executable | `Flag | `Library | `Object | `SrcRepo | `Test ]
type
package = {
|
oasis_version : |
(* | OASIS version used to write this package. | *) |
|
ocaml_version : |
(* | OCaml version required for this package. | *) |
|
findlib_version : |
(* | Findlib version required for this package. | *) |
|
alpha_features : |
(* | Alpha features enabled for this package. | *) |
|
beta_features : |
(* | Beta features enabled for this package. | *) |
|
name : |
(* | Name of this package. | *) |
|
version : |
(* | Version of this package. | *) |
|
license : |
(* | License of this package. | *) |
|
license_file : |
(* | File containing the license of this package. | *) |
|
copyrights : |
(* | Copyright holders (e.g. companies or people). | *) |
|
maintainers : |
(* | People actually taking care of this package (e.g. subset of copyright holders) | *) |
|
: |
(* | Real people who wrote this package, not their companies. | *) |
|
homepage : |
(* | Location of the package homepage. | *) |
|
bugreports : |
(* | Location of the page to report bugs. | *) |
|
synopsis : |
(* | Short description of the package. | *) |
|
description : |
(* | Long description of the package. | *) |
|
: |
(* | List of tags. | *) |
|
categories : |
(* | List of categories that the package belong to. | *) |
|
conf_type : |
(* | Plugin to configure, default internal. | *) |
|
conf_custom : |
(* | Actions around configure step. | *) |
|
build_type : |
(* | Plugin to build, default ocamlbuild. | *) |
|
build_custom : |
(* | Actions around build step. | *) |
|
install_type : |
(* | Plugin to install/uninstall, default internal. | *) |
|
install_custom : |
(* | Actions around install step. | *) |
|
uninstall_custom : |
(* | Actions around uninstall step. | *) |
|
clean_custom : |
(* | Actions around clean step. | *) |
|
distclean_custom : |
(* | Actions aroudn distclean step. | *) |
|
files_ab : |
(* | Files to generate by replacing token in it after configure step. | *) |
|
sections : |
(* | All sections (libraries, executables, tests...). | *) |
|
plugins : |
(* | Extra plugins applied. | *) |
|
disable_oasis_section : |
(* | Files which should not have OASIS Section comments and digests | *) |
|
schema_data : |
|||
|
plugin_data : |
(* | Property list attached to this package. | *) |
OASIS package, what an '_oasis' file contains.
type 'a
quickstart_level =
| |
NoChoice of |
(* | Don't ask question, use provided value. | *) |
| |
Beginner |
(* | Ask the question to a beginner and above. | *) |
| |
Intermediate |
(* | Ask the question to an intermediate user and above. | *) |
| |
Expert |
(* | Ask the question to an expert. | *) |
Quickstart level. Not exported.
type 'a
quickstart_question =
| |
Field |
(* | Short text. | *) |
| |
Text |
(* | Long text, may use editor for it. | *) |
| |
Choices of |
(* | Multiple choices in a list. | *) |
| |
ExclusiveChoices of |
(* | Pick a single choice in the list. | *) |
Howto ask questions in quickstart. Not exported.
TODO: rewrite.
These functions allow to generate setup.ml standalone code, by serializing OCaml data using OCaml notation. They are not exported.
See the OCaml data notation project
val odn_of_unix_dirname : unix_dirname -> OASISDataNotation.t
val odn_of_unix_filename : unix_filename -> OASISDataNotation.t
val odn_of_command_line : prog * args -> OASISDataNotation.t
val odn_of_conditional : ('a -> OASISDataNotation.t) -> 'a OASISExpr.choices -> OASISDataNotation.t
val odn_of_package : package -> OASISDataNotation.t