]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/library/librarian.ml
- added some options to matitadep: -stdout and -exclude
[helm.git] / helm / software / components / library / librarian.ml
index aa6b2e81dd2e3997f96d41669e7ff245fc50e306..f9831545d39fd57ae7ebef2cd539eeec4793f684 100644 (file)
@@ -366,15 +366,15 @@ module Make = functor (F:Format) -> struct
 
 end
   
-let write_deps_file root deps =
-  let oc = open_out (root ^ "/depends") in
-  List.iter 
-    (fun (t,d) -> output_string oc (t^" "^String.concat " " d^"\n")) 
-    deps;
-  close_out oc;
-  HLog.message ("Generated: " ^ root ^ "/depends")
-;;
-
+let write_deps_file where deps = match where with 
+   | Some root ->
+      let oc = open_out (root ^ "/depends") in
+      let map (t, d) = output_string oc (t^" "^String.concat " " d^"\n") in
+      List.iter map deps; close_out oc;
+      HLog.message ("Generated: " ^ root ^ "/depends")
+   | None -> 
+      print_endline (String.concat " " (List.flatten (List.map snd deps)))
+      
 (* FG ***********************************************************************)
 
 (* scheme uri part as defined in URI Generic Syntax (RFC 3986) *)