Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ocamldep(1) [debian man page]

OCAMLDEP(1)						      General Commands Manual						       OCAMLDEP(1)

NAME
ocamldep - Dependency generator for Objective Caml SYNOPSIS
ocamldep [ options ] filename ... DESCRIPTION
The ocamldep(1) command scans a set of Objective Caml 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 Objective Caml user's manual, chapter "Dependency generator". OCAMLDEP(1)

Check Out this Related Man Page

COQ(1)							      General Commands Manual							    COQ(1)

NAME
coqdep - Compute inter-module dependencies for Coq and Caml programs SYNOPSIS
coqdep [ -w ] [ -I directory ] [ -coqlib directory ] [ -c ] [ -i ] [ -D ] [ -slash ] filename ... directory ... DESCRIPTION
coqdep compute inter-module dependencies for Coq and Caml programs, and prints the dependencies on the standard output in a format readable by make. When a directory is given as argument, it is recursively looked at. Dependencies of Coq modules are computed by looking at Require commands (Require, Require Export, Require Import), Declare ML Module com- mands and Load commands. Dependencies relative to modules from the Coq library are not printed. Dependencies of Caml modules are computed by looking at open directives and the dot notation module.value. OPTIONS
-c Prints the dependencies of Caml modules. (On Caml modules, the behaviour is exactly the same as ocamldep). -w Prints a warning if a Coq command Declare ML Module is incorrect. (For instance, you wrote `Declare ML Module "A".', but the module A contains #open "B"). The correct command is printed (see option -D). The warning is printed on standard error. -D This commands looks for every command Declare ML Module of each Coq file given as argument and complete (if needed) the list of Caml modules. The new command is printed on the standard output. No dependency is computed with this option. -slash Prints paths using a slash instead of the OS specific separator. This option is useful when developping under Cygwin. -I directory The files .v .ml .mli of the directory directory are taken into account during the calculus of dependencies, but their own dependen- cies are not printed. -coqlib directory Indicates where is the Coq library. The default value has been determined at installation time, and therefore this option should not be used under normal circumstances. SEE ALSO
ocamlc(1), coqc(1), make(1). NOTES
Lexers (for Coq and Caml) correctly handle nested comments and strings. The treatment of symbolic links is primitive. If two files have the same name, in two different directories, a warning is printed on standard error. There is no way to limit the scope of the recursive search for directories. EXAMPLES
Consider the files (in the same directory): A.ml B.ml C.ml D.ml X.v Y.v and Z.v where + D.ml contains the commands `open A', `open B' and `type t = C.t' ; + Y.v contains the command `Require X' ; + Z.v contains the commands `Require X' and `Declare ML Module "D"'. To get the dependencies of the Coq files: example% coqdep -I . *.v Z.vo: Z.v ./X.vo ./D.cmo Y.vo: Y.v ./X.vo X.vo: X.v With a warning: example% coqdep -w -I . *.v Z.vo: Z.v ./X.vo ./D.cmo Y.vo: Y.v ./X.vo X.vo: X.v ### Warning : In file Z.v, the ML modules declaration should be ### Declare ML Module "A" "B" "C" "D". To get only the Caml dependencies: example% coqdep -c -I . *.ml D.cmo: D.ml ./A.cmo ./B.cmo ./C.cmo D.cmx: D.ml ./A.cmx ./B.cmx ./C.cmx C.cmo: C.ml C.cmx: C.ml B.cmo: B.ml B.cmx: B.ml A.cmo: A.ml A.cmx: A.ml BUGS
Please report any bug to coq-bugs@pauillac.inria.fr Coq tools 28 March 1995 COQ(1)
Man Page