module OASISTypes:sig
..end
This module contains all the types used to build an OASIS package.
A package is described by an '_oasis' file.
Author(s): Sylvain Le Gall
typename =
string
typepackage_name =
string
OASISTypes.package
.typeurl =
string
typeunix_dirname =
string
typeunix_filename =
string
typehost_dirname =
string
typehost_filename =
string
typeprog =
string
typearg =
string
typeargs =
arg list
typecommand_line =
prog * args
typefindlib_name =
string
typefindlib_full =
string
type
compiled_object =
| |
Byte |
(* |
Always use byte code.
| *) |
| |
Native |
(* |
Always use native code.
| *) |
| |
Best |
(* |
Use either byte or native, depending ocamlopt availability.
| *) |
type
dependency =
| |
FindlibPackage of |
(* |
External findlib package.
| *) |
| |
InternalLibrary of |
(* |
Section library of the given name.
| *) |
type
tool =
| |
ExternalTool of |
(* |
External tool.
| *) |
| |
InternalExecutable of |
(* |
Section executable of the given name.
| *) |
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.
| *) |
type'a
conditional ='a OASISExpr.choices
typeplugin_kind =
[ `Build | `Configure | `Doc | `Extra | `Install | `Test ]
typeplugin_data_purpose =
[ `Build
| `Clean
| `Configure
| `Distclean
| `Doc
| `Extra
| `Install
| `Other of string
| `Test
| `Uninstall ]
OASISPlugin.data_new_property
type'a
plugin ='a * name * OASISVersion.t option
typeall_plugin =
plugin_kind plugin
typeplugin_data =
(all_plugin * plugin_data_purpose * (unit -> unit))
list
type
custom = {
|
pre_command : |
(* |
Run before.
| *) |
|
post_command : |
(* |
Run after.
| *) |
type
common_section = {
|
cs_name : |
(* |
Name of the section.
| *) |
|
cs_data : |
|||
|
cs_plugin_data : |
(* |
Property list attached to the section.
| *) |
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_path . | *) |
|
bs_data_files : |
(* |
Data files and their install location, relative to
bs_path . | *) |
|
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.
| *) |
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
| *) |
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 : |
(* | *) |
type
executable = {
|
exec_custom : |
(* |
Use -custom ocamlc option.
| *) |
|
exec_main_is : |
(* |
Main file to compile, dependencies should be guessed
by build system.
| *) |
type
flag = {
|
flag_description : |
(* |
Short description.
| *) |
|
flag_default : |
(* |
Default value.
| *) |
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).
| *) |
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.
| *) |
type
doc_format =
| |
HTML of |
(* |
HTML files and their main entry point
(e.g.
HTML "index.html" ) | *) |
| |
DocText |
(* |
Plain text.
| *) |
| |
PDF |
(* |
Portable document format.
| *) |
| |
PostScript |
|||
| |
Info of |
(* |
Info files and their main entry point.
| *) |
| |
DVI |
|||
| |
OtherDoc |
(* |
Anything else.
| *) |
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.
| *) |
type
section =
| |
Library of |
| |
Object of |
| |
Executable of |
| |
Flag of |
| |
SrcRepo of |
| |
Test of |
| |
Doc of |
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.
| *) |
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.
| *) |
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.
| *) |
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