META

Name

META -- [File that specifies metainformation of OCaml packages]

GRAMMAR

            entry ::= variable_name [ formal_predicates ] '=' value
formal_predicates ::= '(' formal_predicate { ',' formal_predicate } ')'
    variable_name ::= name
 formal_predicate ::= name
             name ::= [ 'A'-'Z' 'a'-'z' '0'-'9' '_' ]+
            value ::= '"' character* '"'

DESCRIPTION

If a package directory contains a file with the fixed name "META" it is interpreted as described here. The file is a sequence of entries following the given grammar; every entry defines a variable under a certain condition given by the list of formal predicates.

There is a list of predefined variables and a list of standard predicates. These variables define: required packages, version information, directories, archive files, and linker options. The predicates denote circumstances of the application of the variables: whether the bytecode or the native compiler is used, if there is a toploop compiled in, details of multi-threading execution, details of profiling.

DETAILS OF THE FILE FORMAT

The file consists of a sequence of entries which must be formed as the grammar prescribes. The lexical tokens are names, values, and interpunctuation like '(', ',' and so on. Note that linefeeds do not play a special role, i.e. an entry definition may be given in more than one line, or several definitions may occur on a single line. There may be comments which begin with '#' and consist of the rest of the line.

Names are sequences of the characters A-Z, a-z, 0-9, or _. Names containing capital letters and names beginning with digits are allowed but not recommended.

Values are enclosed between double quotes. Values may contain any character. The characters " and \ must be preceded by backslashes.

SEMANTICS OF DEFINITIONS

There may be multiple definitions for the same variable if the lists of formal predicates are different. The effective definition is selected upon a set of actual predicates, i.e. the set of predicates that are assumed to be true. In order to determine the value of a variable, the following rule applies:

VARIABLES

There is a set of variables with predefined meaning:

It is possible to define additional variables but there is currently no software interpreting them.

PREDICATES

There is a list of standard predicates: