| 1 |
.TH COQDEP 1 |
| 2 |
. |
| 3 |
.SH NAME |
| 4 |
coqdep \- compute inter-module dependencies for Coq programs |
| 5 |
. |
| 6 |
.SH SYNOPSIS |
| 7 |
.B coqdep |
| 8 |
[ |
| 9 |
.BI \-I \ directory |
| 10 |
] |
| 11 |
[ |
| 12 |
.BI \-coqlib \ directory |
| 13 |
] |
| 14 |
[ |
| 15 |
.B \-i |
| 16 |
] |
| 17 |
[ |
| 18 |
.B \-slash |
| 19 |
] |
| 20 |
.I filename .\|.\|.\& |
| 21 |
.I directory .\|.\|. |
| 22 |
. |
| 23 |
.SH DESCRIPTION |
| 24 |
. |
| 25 |
.B coqdep |
| 26 |
computes inter-module dependencies for Coq programs, |
| 27 |
and prints the dependencies on the standard output in a format |
| 28 |
readable by |
| 29 |
.BR make . |
| 30 |
When a directory is given as argument, it is recursively looked at. |
| 31 |
.PP |
| 32 |
Dependencies of Coq modules are computed by looking at |
| 33 |
.I Require |
| 34 |
commands (Require, Require Export, Require Import, possibly restricted by a From clause), |
| 35 |
.I Declare |
| 36 |
.I ML |
| 37 |
.I Module |
| 38 |
commands, |
| 39 |
.I Add |
| 40 |
.I LoadPath |
| 41 |
commands and |
| 42 |
.I Load |
| 43 |
commands. |
| 44 |
Dependencies relative to modules from the Coq library are not |
| 45 |
printed except if |
| 46 |
.B \-boot |
| 47 |
is given. |
| 48 |
. |
| 49 |
.SH OPTIONS |
| 50 |
. |
| 51 |
.TP |
| 52 |
.BI \-f \ file |
| 53 |
Read filenames and options |
| 54 |
.BR \-I , |
| 55 |
.B \-R |
| 56 |
and |
| 57 |
.B \-Q |
| 58 |
from a _CoqProject |
| 59 |
.I file. |
| 60 |
.TP |
| 61 |
.BI \-I\fR/\fB\-Q\fR/\fB\-R \ options |
| 62 |
Have the same effects on load path and modules names as for other |
| 63 |
Coq commands (\c |
| 64 |
.BR coqtop , |
| 65 |
.BR coqc ). |
| 66 |
.TP |
| 67 |
.BI \-coqlib \ directory |
| 68 |
Indicates where is the Coq library. |
| 69 |
The default value has been determined at installation time, and |
| 70 |
therefore this option should not be used under normal circumstances. |
| 71 |
.TP |
| 72 |
.BI \-exclude-dir \ dir |
| 73 |
Skips subdirectory |
| 74 |
.I dir |
| 75 |
during |
| 76 |
.BR \-R / \-Q |
| 77 |
search. |
| 78 |
.TP |
| 79 |
.B \-sort |
| 80 |
Output the given file name ordered by dependencies. |
| 81 |
.TP |
| 82 |
.B \-vos |
| 83 |
Output dependencies for .vos files (this is not the default as it breaks |
| 84 |
dune's Coq mode). |
| 85 |
.TP |
| 86 |
.B \-boot |
| 87 |
For Coq developers, prints dependencies over Coq library files |
| 88 |
(omitted by default). |
| 89 |
.TP |
| 90 |
.B \-noinit |
| 91 |
Currently no effect. |
| 92 |
.TP |
| 93 |
.B \-vos |
| 94 |
Includes dependencies about .vos files. |
| 95 |
.TP |
| 96 |
.BR \-dyndep \ ( opt | byte | both | no | var ) |
| 97 |
Set how dependencies over ML modules are printed. |
| 98 |
.TP |
| 99 |
.BI \-m \ meta |
| 100 |
Resolve plugin names using the |
| 101 |
.I meta |
| 102 |
file. |
| 103 |
.TP |
| 104 |
.BI \-w \ w1,\|.\|.\|.\|,\|wn |
| 105 |
Configure display of warnings as for |
| 106 |
.BR coqc . |
| 107 |
. |
| 108 |
.SH EXIT STATUS |
| 109 |
.IP 1 |
| 110 |
A file given on the command line cannot be found, or some file |
| 111 |
cannot be opened, or there is a syntax error in one of the commands |
| 112 |
recognized by |
| 113 |
.BR coqdep . |
| 114 |
.IP 0 |
| 115 |
In all other cases. |
| 116 |
In particular, when a dependency cannot be found or an invalid option is |
| 117 |
encountered, |
| 118 |
.B coqdep |
| 119 |
prints a warning and exits with status 0. |
| 120 |
. |
| 121 |
. |
| 122 |
.SH SEE ALSO |
| 123 |
. |
| 124 |
.BR ocamlc (1), |
| 125 |
.BR coqc (1), |
| 126 |
.BR make (1) |
| 127 |
. |
| 128 |
.SH NOTES |
| 129 |
. |
| 130 |
Lexers (for Coq and OCaml) correctly handle nested comments |
| 131 |
and strings. |
| 132 |
.PP |
| 133 |
The treatment of symbolic links is primitive. |
| 134 |
.PP |
| 135 |
If two files have the same name, in two different directories, |
| 136 |
a warning is printed on standard error. |
| 137 |
.PP |
| 138 |
There is no way to limit the scope of the recursive search for |
| 139 |
directories. |
| 140 |
. |
| 141 |
.SH EXAMPLES |
| 142 |
. |
| 143 |
Consider the files (in the same directory): |
| 144 |
.RS |
| 145 |
a.mllib, X.v, Y.v, and Z.v |
| 146 |
.RE |
| 147 |
where |
| 148 |
.IP \(bu 3 |
| 149 |
a.mllib contains the module names `B' and `C'; |
| 150 |
.IP \(bu |
| 151 |
Y.v contains the command `Require Foo.X'; |
| 152 |
.IP \(bu |
| 153 |
Z.v contains the commands `From Foo Require X' and `Declare ML Module "a"'. |
| 154 |
.PP |
| 155 |
To get the dependencies of the Coq files: |
| 156 |
.PP |
| 157 |
.RS |
| 158 |
.nf |
| 159 |
example% coqdep \-I . \-Q . Foo *.v |
| 160 |
|
| 161 |
X.vo X.glob X.v.beautified X.required_vo: X.v |
| 162 |
Y.vo Y.glob Y.v.beautified Y.required_vo: Y.v X.vo |
| 163 |
Z.vo Z.glob Z.v.beautified Z.required_vo: Z.v X.vo ./a.cma ./a.cmxs |
| 164 |
.fi |
| 165 |
.RE |
| 166 |
. |
| 167 |
.SH BUGS |
| 168 |
. |
| 169 |
Please report any bug to |
| 170 |
.BR https://github.com/rocq-prover/rocq/issues . |