Debian OCaml Packaging Policy for OCaml 3.10.2
Prev | Chapter 3. Packaging OCaml libraries | Next

# 3.5. Camlp4/Camlp5

Actually, Camlp4 extensions should be processed just as standard OCaml library. The META file distributed with this syntax extension should follow the OSR: META files for packages containing syntax extensions. In particular, the syntax extension should be contained in a `syntax` sub packages.

The naming convention of the package is to use the same naming as with standard package, replacing `-ocaml-` by the syntax extension name, `-camlp4-`.

If a package contains at the same time syntax extension and library, it is up to the maintainer to choose the most relevant name for the package. Whatever the name chosen for the package, the other name should be a `Provide` of the package.

For example, consider the package sexplib310. It provides a syntax extension and a library, which is the runtime support of the additional function generated by the syntax extension. Since the most common use of sexplib310 is through its syntax extension, the package is name libsexplib-camlp4-dev and it also provide libsexplib-ocaml-dev.

Camlp5 is an alternate pretty-printer and preprocessor for OCaml (which is compatible with pre-3.10.0 version). Syntax extension are handled through exactly the same scheme as for Camlp4 except that package name use `-camlp5-` rather than `-camlp4-`.

Prev | Home | Next
Providing `META` files | Up | Documentation