diff options
| author | letouzey | 2010-09-17 14:12:50 +0000 |
|---|---|---|
| committer | letouzey | 2010-09-17 14:12:50 +0000 |
| commit | 7bc7fc79e719202c84e7c60f1f4ab42f5e9bcf8f (patch) | |
| tree | 1e3996204eea985915969ea425fdb7ca30bc5311 /tools/coqdep_common.ml | |
| parent | 3111aa5721db71d0d4bb2f9717d61723f76bf97e (diff) | |
Coqdep_boot : misc improvements
- modules names can include quote '
- errors when parsing .mllib files are now properly reported
instead of dying ugly on some sort of Failure
- same when coqdep has to parse the output of ocamldep -modules
- lib/lib.mllib contains a typo (lowercase ident)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13423 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'tools/coqdep_common.ml')
| -rw-r--r-- | tools/coqdep_common.ml | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/tools/coqdep_common.ml b/tools/coqdep_common.ml index 295b7c5192..797c25cccf 100644 --- a/tools/coqdep_common.ml +++ b/tools/coqdep_common.ml @@ -190,7 +190,11 @@ let soustraite_fichier_ML dep md ext = a_faire_opt := !a_faire_opt ^ opt) (List.rev list); (!a_faire, !a_faire_opt) - with Sys_error _ -> ("","") + with + | Sys_error _ -> ("","") + | _ -> + Printf.eprintf "Coqdep: subprocess %s failed on file %s%s\n" dep md ext; + exit 1 let autotraite_fichier_ML md ext = try @@ -236,7 +240,13 @@ let traite_fichier_mllib md ext = a_faire_opt := !a_faire_opt^" "^file^".cmx" | None -> ()) list; (!a_faire, !a_faire_opt) - with Sys_error _ -> ("","") + with + | Sys_error _ -> ("","") + | Syntax_error (i,j) -> + Printf.eprintf "File \"%s%s\", characters %i-%i:\nError: Syntax error\n" + md ext i j; + exit 1 + (* Makefile's escaping rules are awful: $ is escaped by doubling and other special characters are escaped by backslash prefixing while |
