aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/coqdep.ml
diff options
context:
space:
mode:
authorGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2013-04-18 16:56:05 +0000
committerGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2013-04-18 16:56:05 +0000
commit95e8234b7a3e3850710a18d26f6dd561497e25d0 (patch)
tree1d5ab022eec7131634bb429a9e73eb3aa66e27f4 /tools/coqdep.ml
parentcd8bcabd56650981d00618cfdabdc51f6c0cc2c1 (diff)
Coqdep: add an -exclude-dir option (wish mentionned in #3025)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16431 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'tools/coqdep.ml')
-rw-r--r--tools/coqdep.ml13
1 files changed, 8 insertions, 5 deletions
diff --git a/tools/coqdep.ml b/tools/coqdep.ml
index a8c108f4e..f296594d1 100644
--- a/tools/coqdep.ml
+++ b/tools/coqdep.ml
@@ -157,9 +157,10 @@ let declare_dependencies () =
(List.rev !vAccu)
let usage () =
- eprintf
- "[ usage: coqdep [-w] [-I dir] [-R dir coqdir] [-coqlib dir] [-c] [-i] [-D] <filename>+ ]\n";
- flush stderr;
+ eprintf " usage: coqdep [-w] [-c] [-D] [-I dir] [-R dir coqdir] <filename>+\n";
+ eprintf " extra options:\n";
+ eprintf " -coqlib dir : set the coq standard library directory\n";
+ eprintf " -exclude-dir f : skip subdirectories named f during -R search\n";
exit 1
let rec parse = function
@@ -177,9 +178,11 @@ let rec parse = function
| "-R" :: r :: "-as" :: [] -> usage ()
| "-R" :: r :: ln :: ll -> add_rec_dir add_known r [ln]; parse ll
| "-R" :: ([] | [_]) -> usage ()
- | "-coqlib" :: (r :: ll) -> Flags.coqlib_spec := true; Flags.coqlib := r; parse ll
+ | "-exclude-dir" :: r :: ll -> norec_dirnames := r::!norec_dirnames; parse ll
+ | "-exclude-dir" :: [] -> usage ()
+ | "-coqlib" :: r :: ll -> Flags.coqlib_spec := true; Flags.coqlib := r; parse ll
| "-coqlib" :: [] -> usage ()
- | "-suffix" :: (s :: ll) -> suffixe := s ; parse ll
+ | "-suffix" :: s :: ll -> suffixe := s ; parse ll
| "-suffix" :: [] -> usage ()
| "-slash" :: ll -> option_slash := true; parse ll
| ("-h"|"--help"|"-help") :: _ -> usage ()