Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ocamldep(1) [centos man page]

OCAMLDEP(1)						      General Commands Manual						       OCAMLDEP(1)

NAME
ocamldep - Dependency generator for OCaml SYNOPSIS
ocamldep [ options ] filename ... DESCRIPTION
The ocamldep(1) command scans a set of OCaml source files (.ml and .mli files) for references to external compilation units, and outputs dependency lines in a format suitable for the make(1) utility. This ensures that make will compile the source files in the correct order, and recompile those files that need to when a source file is modified. The typical usage is: ocamldep options *.mli *.ml > .depend where .depend is the file that should contain the dependencies. Dependencies are generated both for compiling with the bytecode compiler ocamlc(1) and with the native-code compiler ocamlopt(1). OPTIONS
The following command-line options are recognized by ocamldep(1). -I directory Add the given directory to the list of directories searched for source files. If a source file foo.ml mentions an external compila- tion unit Bar, a dependency on that unit's interface bar.cmi is generated only if the source for bar is found in the current direc- tory or in one of the directories specified with -I. Otherwise, Bar is assumed to be a module from the standard library, and no dependencies are generated. For programs that span multiple directories, it is recommended to pass ocamldep(1) the same -I options that are passed to the compiler. -ml-synonym .ext Consider the given extension (with leading dot) to be a synonym for .ml. -mli-synonym .ext Consider the given extension (with leading dot) to be a synonym for .mli. -modules Output raw dependencies of the form filename: Module1 Module2 ... ModuleN where Module1, ..., ModuleN are the names of the compila- tion units referenced within the file filename, but these names are not resolved to source file names. Such raw dependencies cannot be used by make(1), but can be post-processed by other tools such as Omake(1). -native Generate dependencies for a pure native-code program (no bytecode version). When an implementation file (.ml file) has no explicit interface file (.mli file), ocamldep(1) generates dependencies on the bytecode compiled file (.cmo file) to reflect interface changes. This can cause unnecessary bytecode recompilations for programs that are compiled to native-code only. The flag -native causes dependencies on native compiled files (.cmx) to be generated instead of on .cmo files. (This flag makes no difference if all source files have explicit .mli interface files.) -pp command Cause ocamldep(1) to call the given command as a preprocessor for each source file. -slash Under Unix, this option does nothing. -version Print version string and exit. -vnum Print short version number and exit. -help or --help Display a short usage summary and exit. SEE ALSO
ocamlc(1), ocamlopt(1). The OCaml user's manual, chapter "Dependency generator". OCAMLDEP(1)

Check Out this Related Man Page

OCAMLBUILD(1)						      General Commands Manual						     OCAMLBUILD(1)

NAME
ocamlbuild - The OCaml project compilation tool SYNOPSIS
ocamlbuild [ -Is dir1,... ] [ -libs lib1,... ] [ -lflags flag1,... ] [ -pp flags ] [ -tags tag1,... ] [ -j parallel-jobs ] tar- get.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 OPTIONS
The following command-line options are recognized by ocamlbuild(1). -version Display the version -quiet Make as quiet as possible -verbose <level> Set the verbose level -documentation Show rules and flags -log <file> Set log file -no-log No log file -clean Remove build directory and other files, then exit -I <path> Add to include directories -Is <path,...> (same as above, but accepts a comma-separated list) -X <path> Directory to ignore -Xs <path,...> (idem) -lib <flag> Link to this ocaml library -libs <flag,...> (idem) -lflag <flag> Add to ocamlc link flags -lflags <flag,...> (idem) -cflag <flag> Add to ocamlc compile flags -cflags <flag,...> (idem) -yaccflag <flag> Add to ocamlyacc flags -yaccflags <flag,...> (idem) -lexflag <flag> Add to ocamllex flags -lexflags <flag,...> (idem) -ppflag <flag> Add to ocaml preprocessing flags -pp <flag,...> (idem) -tag <tag> Add to default tags -tags <tag,...> (idem) -ignore <module,...> Don't try to build these modules -no-links Don't make links of produced final targets -no-skip Don't skip modules that are requested by ocamldep but cannot be built -no-hygiene Don't apply sanity-check rules -no-plugin Don't build myocamlbuild.ml -no-stdlib Don't ignore stdlib modules -just-plugin Just build myocamlbuild.ml -byte-plugin Don't use a native plugin but bytecode -no-sanitize Do not enforce sanity-check rules -nothing-should-be-rebuilt Fail if something needs to be rebuilt -classic-display Display executed commands the old-fashioned way -j <N> Allow N jobs at once (0 for unlimited) -build-dir <path> Set build directory -install-dir <path> Set the install directory -where Display the install directory -ocamlc <command> Set the OCaml bytecode compiler -ocamlopt <command> Set the OCaml native compiler -ocamldep <command> Set the OCaml dependency tool -ocamlyacc <command> Set the ocamlyacc tool -ocamllex <command> Set the ocamllex tool -ocamlrun <command> Set the ocamlrun tool -- Stop argument processing, remaining arguments are given to the user program -help Display the list of options --help Display the list of options SEE ALSO
The ocamlbuild manual, ocaml(1), make(1). The OCaml user's manual, chapter Batch compilation . OCAMLBUILD(1)
Man Page

Featured Tech Videos