aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorletouzey2010-03-04 16:18:33 +0000
committerletouzey2010-03-04 16:18:33 +0000
commit9ece79aa913d30adf14597f2eeec702e58240db9 (patch)
treef386793fc2931802cfa9df7feb383ca25626fb1c
parent252aa149a8c1e8df04c02d1b8be1501f122526ad (diff)
Coqdep_boot: when emultating ocamldep, avoid outputting empty answer
When we emulate ocamldep via "coqdep_boot -mldep ocamldep", it's nicer to get something as output, even if there's no dependencies. Something like foo.cmo: foo.cmx: at least indicates that something has been done. Moreover it's closer to the behavior of ocamldep git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12838 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r--tools/coqdep_common.ml18
1 files changed, 7 insertions, 11 deletions
diff --git a/tools/coqdep_common.ml b/tools/coqdep_common.ml
index 95c794ca7c..dd609c788a 100644
--- a/tools/coqdep_common.ml
+++ b/tools/coqdep_common.ml
@@ -336,28 +336,24 @@ let mL_dependencies () =
| None -> ""
| Some mldir -> " "^(file_name name mldir)^".cmi"
in
- if dep<>"" || intf<>"" then begin
- printf "%s.cmo:%s%s\n" fullname dep intf;
- printf "%s.cmx:%s%s\n" fullname dep_opt intf;
- flush stdout;
- end)
+ printf "%s.cmo:%s%s\n" fullname dep intf;
+ printf "%s.cmx:%s%s\n" fullname dep_opt intf;
+ flush stdout)
(List.rev !mlAccu);
List.iter
(fun (name,dirname) ->
let fullname = file_name name dirname in
let (dep,_) = traite_fichier_ML fullname ".mli" in
- if dep<>"" then printf "%s.cmi:%s\n" fullname dep;
+ printf "%s.cmi:%s\n" fullname dep;
flush stdout)
(List.rev !mliAccu);
List.iter
(fun (name,dirname) ->
let fullname = file_name name dirname in
let (dep,dep_opt) = traite_fichier_mllib fullname ".mllib" in
- if dep<>"" then begin
- printf "%s.cma:%s\n" fullname dep;
- printf "%s.cmxa %s.cmxs:%s\n" fullname fullname dep_opt;
- flush stdout
- end)
+ printf "%s.cma:%s\n" fullname dep;
+ printf "%s.cmxa %s.cmxs:%s\n" fullname fullname dep_opt;
+ flush stdout)
(List.rev !mllibAccu)
let coq_dependencies () =