From 9ece79aa913d30adf14597f2eeec702e58240db9 Mon Sep 17 00:00:00 2001 From: letouzey Date: Thu, 4 Mar 2010 16:18:33 +0000 Subject: 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 --- tools/coqdep_common.ml | 18 +++++++----------- 1 file 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 () = -- cgit v1.2.3