Defining additional predicates

As additional predicates can be simply introduced this a natural means to express conditional linkage. For example, one may provide archives for various conditions, such as a production archive, and a development archive. A single new predicate, "development", would be sufficient to express this:

archive(byte) = "p_production.cma"
archive(byte,development) = "p_development.cma"

When linking, include a "-predicates development" argument in the compiler command to select the development archive, otherwise the production archive is taken.

Predicates could also be used to select among several implementations of the same module. Define simply one predicate per implementation, e.g. "p_impl1", "p_impl2", and "p_impl3", and specify the archives for every implementation separately:

archive(byte,p_impl1) = "p_impl1.cma"
archive(byte,p_impl2) = "p_impl2.cma"
archive(byte,p_impl3) = "p_impl3.cma"

In the case that the implementations have different dependencies, simply provide multiple "requires" variables:

requires(p_impl1) = "q"
requires(p_impl2) = "q,r"
requires(p_impl3) = "r,s"

Sometimes, the implementations require different linker options. In this case, define several versions of the "linkopts" variable just like in the "requires" example.