.TH OCAMLBUILD 1 .SH NAME ocamlbuild \- The Objective Caml project compilation tool .SH SYNOPSIS .B ocamlbuild [ .B \-Is \ dir1,... ] [ .BI \-libs \ lib1,... ] [ .BI \-lflags \ flag1,... ] [ .BI \-pp \ flags ] [ .BI \-tags \ tag1,... ] [ .B \-j \ parallel-jobs ] .I target.native [ .B \-\- arg1 arg2 ... ] .I (same options) .SH DESCRIPTION .BR ocamlbuild (1) orchestrates the compilation process of your OCaml project. It is similar in function to .BR make (1) except that it is tailor-made to automatically compile most OCaml projects with very little user input. .BR 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 .BR ocamldep (1) to extract dependency information, and gathering optional files that fine-tune its behaviour. Target names are very significant. .SH TARGET NAMES .BR ocamlbuild uses a set of target naming conventions to select the kind of objects to produce. Target names are of the form .BR base.extension where .BR base is usually the name of the underlying Ocaml module and .BR extension denotes the kind of object to produce from that file -- a byte code executable, a native executable, documentation... Of course extensions such as .BR .cmo, .BR .cma, .BR .cmi... map to their usual counterparts. Here is a list of the most important .BR ocamlbuild \&-specific extensions: .TP 2i .B .native Native code executable .TP 2i .B .byte Byte code executable .TP 2i .B .inferred.mli Interface inferred with .BR ocamlc -i .TP 2i .B .docdir/index.html HTML documentation generated with .BR ocamldoc .PP .SH OPTIONS The following command-line options are recognized by .BR ocamlbuild (1). .TP \fB\-version\fR Display the version .TP \fB\-quiet\fR Make as quiet as possible .TP \fB\-verbose\fR Set the verbose level .TP \fB\-documentation\fR Show rules and flags .TP \fB\-log\fR Set log file .TP \fB\-no\-log\fR No log file .TP \fB\-clean\fR Remove build directory and other files, then exit .TP \fB\-I\fR Add to include directories .TP \fB\-Is\fR (same as above, but accepts a comma\-separated list) .TP \fB\-X\fR Directory to ignore .TP \fB\-Xs\fR (idem) .TP \fB\-lib\fR Link to this ocaml library .TP \fB\-libs\fR (idem) .TP \fB\-lflag\fR Add to ocamlc link flags .TP \fB\-lflags\fR (idem) .TP \fB\-cflag\fR Add to ocamlc compile flags .TP \fB\-cflags\fR (idem) .TP \fB\-yaccflag\fR Add to ocamlyacc flags .TP \fB\-yaccflags\fR (idem) .TP \fB\-lexflag\fR Add to ocamllex flags .TP \fB\-lexflags\fR (idem) .TP \fB\-ppflag\fR Add to ocaml preprocessing flags .TP \fB\-pp\fR (idem) .TP \fB\-tag\fR Add to default tags .TP \fB\-tags\fR (idem) .TP \fB\-ignore\fR Don't try to build these modules .TP \fB\-no\-links\fR Don't make links of produced final targets .TP \fB\-no\-skip\fR Don't skip modules that are requested by ocamldep but cannot be built .TP \fB\-no\-hygiene\fR Don't apply sanity\-check rules .TP \fB\-no\-plugin\fR Don't build myocamlbuild.ml .TP \fB\-no\-stdlib\fR Don't ignore stdlib modules .TP \fB\-just\-plugin\fR Just build myocamlbuild.ml .TP \fB\-byte\-plugin\fR Don't use a native plugin but bytecode .TP \fB\-no-sanitize\fR Do not enforce sanity\-check rules .TP \fB\-nothing\-should\-be\-rebuilt\fR Fail if something needs to be rebuilt .TP \fB\-classic\-display\fR Display executed commands the old\-fashioned way .TP \fB\-j\fR Allow N jobs at once (0 for unlimited) .TP \fB\-build\-dir\fR Set build directory .TP \fB\-install\-dir\fR Set the install directory .TP \fB\-where\fR Display the install directory .TP \fB\-ocamlc\fR Set the OCaml bytecode compiler .TP \fB\-ocamlopt\fR Set the OCaml native compiler .TP \fB\-ocamldep\fR Set the OCaml dependency tool .TP \fB\-ocamlyacc\fR Set the ocamlyacc tool .TP \fB\-ocamllex\fR Set the ocamllex tool .TP \fB\-ocamlrun\fR Set the ocamlrun tool .TP \fB\-\-\fR Stop argument processing, remaining arguments are given to the user program .TP \fB\-help\fR Display the list of options .TP \fB\-\-help\fR Display the list of options .PP .SH SEE ALSO The .BR ocamlbuild manual, .BR ocaml (1), .BR make (1). .br .I The Objective Caml user's manual, chapter "Batch compilation".