summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>2008-08-01 09:02:55 +0000
committerXavier Leroy <xavier.leroy@inria.fr>2008-08-01 09:02:55 +0000
commit88c5dc442f31c5728ae5b66b3d3a09f7c180516b (patch)
tree37aa38f7b520d772deac0f9da99e612dd9867867 /tools
parent1f93465a0e797d61d7de5c09c259ae1691f83efe (diff)
downloadocaml-88c5dc442f31c5728ae5b66b3d3a09f7c180516b.tar.gz
PR#4212: print dependency lines even if there are no dependencies
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8963 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'tools')
-rw-r--r--tools/ocamldep.ml27
1 files changed, 12 insertions, 15 deletions
diff --git a/tools/ocamldep.ml b/tools/ocamldep.ml
index 8761666b42..a2081f32f7 100644
--- a/tools/ocamldep.ml
+++ b/tools/ocamldep.ml
@@ -113,21 +113,18 @@ let print_filename s =
;;
let print_dependencies target_file deps =
- match deps with
- [] -> ()
- | _ ->
- print_filename target_file; print_string depends_on;
- let rec print_items pos = function
- [] -> print_string "\n"
- | dep :: rem ->
- if pos + String.length dep <= 77 then begin
- print_filename dep; print_string " ";
- print_items (pos + String.length dep + 1) rem
- end else begin
- print_string escaped_eol; print_filename dep; print_string " ";
- print_items (String.length dep + 5) rem
- end in
- print_items (String.length target_file + 2) deps
+ print_filename target_file; print_string depends_on;
+ let rec print_items pos = function
+ [] -> print_string "\n"
+ | dep :: rem ->
+ if pos + String.length dep <= 77 then begin
+ print_filename dep; print_string " ";
+ print_items (pos + String.length dep + 1) rem
+ end else begin
+ print_string escaped_eol; print_filename dep; print_string " ";
+ print_items (String.length dep + 5) rem
+ end in
+ print_items (String.length target_file + 2) deps
let print_raw_dependencies source_file deps =
print_filename source_file; print_string ":";