Skip to content

Installing Batteries

Jürgen Hötzel edited this page Dec 30, 2016 · 11 revisions
  1. Installing from packages

Batteries is packaged in several distributions and package systems (some may have older packages):

  1. Installing from source

Batteries can be installed from source by downloading and unpacking the tarball (or cloning the Git repository) and running the following commands with GNU Make:

$ make
$ make test
$ make install

Optionally:

$ make install-doc

The following variables can be used to control Make’s behavior:

  • BATTERIES_NATIVE_SHLIB
    Set this to `no` to disable building dynamically-loadable native code modules for Batteries.
  • BATTERIES_NATIVE
    Set this to `no` to disable all native code compilation. This disables dynamically loaded native code modules as well.
  • DOCROOT
    Specifies the location for installing documentation. Defaults to `/usr/share/doc/ocaml-batteries`.
  • BROWSER_COMMAND
    Specifies the default command for invoking a web browser for help in the Batteries toplevel enhancements. Defaults to `x-www-browser %s`.

The modules are installed to `ocamlfind`’s default installation directory. Consult the OCamlFind documentation for how to control this via environment variables.

Clone this wiki locally