COQDEP(1)
π COQDEP(1) π
okay bestie, welcome to coqdep, straight out of the General Commands Manual β she computes inter-module dependencies for Coq programs and she does it flawlessly β¨
πΈ NAME πΈ
coqdep β compute inter-module dependencies for Coq programs
π SYNOPSIS π
coqdep [ -I directory ] [ -coqlib directory ] [ -i ] [ -slash ] filename ... directory ...
π¦ DESCRIPTION π¦
so what does she actually do? coqdep computes inter-module dependencies for Coq programs, and then prints those dependencies on the standard output in a format that make can read. iconic behavior honestly. and listen β when you hand her a directory as an argument, she goes through it recursively. no cap. π₯
the way she figures out the dependencies of Coq modules is by peeking at Require commands (Require, Require Export, Require Import, possibly restricted by a From clause), Declare ML Module commands, Add LoadPath commands, and Load commands. π
heads up bestie: dependencies relative to modules from the Coq library are not printed β unless you pass -boot. π«Ά
β¨ OPTIONS β¨
-ffile β read filenames and the options-I,-Rand-Qfrom a_CoqProjectfile.-I/-Q/-Roptions β these have the exact same effects on load path and module names as they do for the other Coq commands (coqtop,coqc).-coqlibdirectory β tells her where the Coq library lives. the default value was already determined at installation time, so lowkey you should not be using this option under normal circumstances. π-exclude-dirdir β skips the subdirectory dir during the-R/-Qsearch.-sortβ output the given file name ordered by dependencies.-vosβ output dependencies for.vosfiles. and no, this is not the default, because it breaks dune's Coq mode. π-bootβ for Coq developers: prints dependencies over Coq library files (omitted by default).-noinitβ currently no effect. literally nothing. she's just standing there. π-vosβ includes dependencies about.vosfiles.-dyndep (opt|byte|both|no|var)β set how dependencies over ML modules are printed.-mmeta β resolve plugin names using the meta file.-ww1,...,wn β configure display of warnings, exactly like forcoqc.
β EXIT STATUS β
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 bycoqdep.0β in all other cases. and specifically: when a dependency cannot be found, or an invalid option is encountered,coqdepprints a warning and still exits with status0. yes bestie, she's chill like that. π
π SEE ALSO π
π§ NOTES π§
- the lexers (for Coq and OCaml) correctly handle nested comments and strings. ate. π
- the treatment of symbolic links is primitive. (it's giving cavewoman, not giving main character.)
- if two files have the same name, in two different directories, a warning gets printed on standard error. β οΈ
- there is no way to limit the scope of the recursive search for directories. periodt. π«
π EXAMPLES π
picture this: these files, all sitting in the same directory β
a.mllib, X.v, Y.v, and Z.v
where:
a.mllibcontains the module namesBandC;Y.vcontains the commandRequire Foo.X;Z.vcontains the commandsFrom Foo Require XandDeclare ML Module "a".
to get the dependencies of the Coq files, you just hit her with:
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
look at that output. she SERVED. π π₯
π BUGS π
please report any bug to https://github.com/rocq-prover/rocq/issues. do it for her. π₯Ί
okay that's the whole page, bestie β mwah π this has been COQDEP(1) from the General Commands Manual, part of the Coq/Rocq docs. go compute some dependencies, you absolute icon πβ¨
π¦ where this page comes from
- arch rolling: rocq 9.3.0-1 Β· LGPL-2.1-only
- fedora 44: coq-core-compat 9.3.0-1.fc44 Β· LGPL-2.1-only AND LGPL-2.1-only WITH OCaml-LGPL-linking-exception AND MIT AND BSD-3-Clause
- nixos 26.05: coq 9.2.0
- ubuntu stonking: coq 9.2.0+dfsg-4build2 Β· LGPL-2.1-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms