OCAMLBUILD(1)

NAME
ocamlbuild - The OCaml project compilation tool

SYNOPSIS
ocamlbuild [ -Is dir1,... ] [ -libs lib1,... ] [ -lflags flag1,... ] [ -pp flags ] [ -tags tag1,... ] [ -j parallel-jobs ] target.native [ -- arg1 arg2 ... ] (same options)

DESCRIPTION
ocamlbuild(1) orchestrates the compilation process of your OCaml project. It is similar in function to make(1) except that it is tailor-made to automatically compile most OCaml projects with very little user input. ocamlbuild should be invoked in the root of a clean project tree (e.g., with no leftover compilation files). Given one or more targets to compile, it scans the required subdirectories to gather information about the various files present, running tools such as ocamldep(1) to extract dependency information, and gathering optional files that fine-tune its behaviour. Target names are very significant.

TARGET NAMES
ocamlbuild uses a set of target naming conventions to select the kind of objects to produce. Target names are of the form base.extension where base is usually the name of the underlying OCaml module and extension denotes the kind of object to produce from that file -- a byte code executable, a native executable, documentation... Of course extensions such as .cmo, .cma, .cmi... map to their usual counterparts. Here is a list of the most important ocamlbuild-specific extensions:

.native
    Native code executable

.byte
    Byte code executable

.inferred.mli
    Interface inferred with ocamlc-i

.docdir/index.html
    HTML documentation generated with ocamldoc