File: coqdep.1

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

X.vo X.glob X.v.beautified X.required_vo: X.v
Y.vo Y.glob Y.v.beautified Y.required_vo: Y.v X.vo
Z.vo Z.glob Z.v.beautified Z.required_vo: Z.v X.vo ./a.cma ./a.cmxs
.fi
.RE
.
.SH BUGS
.
Please report any bug to
.BR https://github.com/coq/coq/issues .