]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/matita/matitadep.ml
version 0.7.1
[helm.git] / helm / matita / matitadep.ml
index c1ccce7808c9cdacc1c79baa21bcb96460efc562..966b02b09d49b7b246fc1326ff6f87a484de0a4f 100644 (file)
@@ -45,6 +45,8 @@ let main () =
       | TA.Executable (_, TA.Command 
           (_, TA.Alias (_, TA.Ident_alias(_, uri)))) -> 
             Hashtbl.add aliases file uri
+      | TA.Executable (_, TA.Command (_, TA.Include (_, path))) ->
+            Hashtbl.add deps file path
       | _ -> ()) 
       stms; 
     Hashtbl.iter 
@@ -60,6 +62,9 @@ let main () =
     let deps = Hashtbl.find_all deps file in
     let deps = List.fast_sort Pervasives.compare deps in
     let deps = MatitaMisc.list_uniq deps in
+    let deps = 
+      List.map (fun x -> Pcre.replace ~pat:"ma$" ~templ:"moo" x) deps 
+    in
     let deps = file :: deps in
     Printf.printf "%s: %s\n" (MatitaMisc.obj_file_of_script file)
       (String.concat " " deps)