]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matita/matitac.ml
update in ground
[helm.git] / matita / matita / matitac.ml
index a93d694dcc240a2e17646cc14c3194c0e58c5344..d0f5603e58a347655379f812d378fa34fb9483ee 100644 (file)
@@ -44,7 +44,14 @@ let main_compiler () =
          prerr_endline ("Too many roots found:\n\t" ^ String.concat "\n\t" roots);
          prerr_endline ("\nEnter one of these directories and retry");
          exit 1);
-    | _ -> targets
+    | _ ->
+      let map targets file =
+          if HExtlib.is_dir file then
+             let files = HExtlib.find ~test:(fun path -> Filename.check_suffix path ".ma") file in
+             files @ targets
+          else file :: targets
+      in
+      List.fold_left map [] (List.rev targets)
   in
   (* must be called after init since args are set by cmdline parsing *)
   let system_mode =  Helm_registry.get_bool "matita.system" in