ocamlbrew aims to be a simple tool for getting up and running with various versions of OCaml. The concept, along with some basic code, is borrowed from perlbrew. This script should be considered to be in an early alpha state.
- OCaml's build requirements
- Any non-OCaml dependencies required by other software selected for installation.
Using ocamlbrew is very easy. In its most basic form, ocamlbrew can run in a completely automated fashion:
curl -kL https://raw.github.com/hcarty/ocamlbrew/master/ocamlbrew-install | bash
RECIPES.md for more installation options.
ocamlbrew will print the name of the log file where compilation output is being directed. This can be watched to track build progress and/or used for troubleshooting in case one of the build steps fails.
ocamlbrew can be configured with several environment variables.
The most important is
$OCAMLBREW_BASEwhich defines the directory under which all software built and installed by ocamlbrew will reside.
Output from the build process will be directed to this file. This defaults to a randomly named file under
$TMPDIRif defined or
This is only for installations which do not involve downloading ocamlbrew locally. This variable specifies which flags to pass to
-h Display this message -b [path] Use [path] as $OCAMLBREW_BASE -c "[flags]" Flags to pass to OCaml's configure -a Install everything with no prompts -o Install OCaml only, no prompts -f Install OCaml and findlib only, no prompts -s [path] Install OCaml from Subversion [path] -t Install OCaml from Subversion trunk -n [name] Install under $OCAMLBREW_BASE/[name]
The build and installation will occur under
Subversion path should be relative to
ocamlbrew will provide instructions on how to setup the newly installed OCaml environment once all build and installation steps are complete. After following those instructions, depending on the options selected at ocamlbrew startup, the OCaml toolchain, ocamlfind, odb.ml, oasis, utop, and ocamlscript will be available from the shell environment.
ocamlbrew is distributed under the MIT license. See LICENSE for details.