]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/matita/matitadep.ml
* Part of matita that used to deal with the library moved into ocaml/library
[helm.git] / helm / matita / matitadep.ml
index 5b22cb70b9cbe9abce580c4d254a0344b009a3d4..34f7744a00daa88c241e769442e6c5ddb4aa8a09 100644 (file)
@@ -48,12 +48,13 @@ let main () =
     try
       aux paths
     with Sys_error _ as exc ->
-      MatitaLog.error ("Unable to read " ^ path);
-      MatitaLog.error ("opts.include_paths was " ^ String.concat ":" paths);
+      HLog.error ("Unable to read " ^ path);
+      HLog.error ("opts.include_paths was " ^ String.concat ":" paths);
       raise exc
   in
   MatitaInit.load_configuration_file ();
   MatitaInit.parse_cmdline ();
+  let basedir = Helm_registry.get "matita.basedir" in
   List.iter
    (fun file -> 
     let ic = open_in file in
@@ -71,10 +72,10 @@ let main () =
       | GrafiteAst.IncludeDep path -> 
           try 
             let ma_file = if path <> "coq.ma" then find path else path in
-            let moo_file = MatitacleanLib.obj_file_of_script ma_file in
+            let moo_file = MatitaMisc.obj_file_of_script ~basedir ma_file in
             Hashtbl.add include_deps file moo_file
           with Sys_error _ -> 
-            MatitaLog.warn 
+            HLog.warn 
               ("Unable to find " ^ path ^ " that is included in " ^ file))
     dependencies)
   (Helm_registry.get_list Helm_registry.string "matita.args");
@@ -84,7 +85,8 @@ let main () =
       match dep with 
       | None -> ()
       | Some u -> 
-          Hashtbl.add include_deps file (MatitaMisc.obj_file_of_baseuri u))
+         Hashtbl.add include_deps file
+          (LibraryMisc.obj_file_of_baseuri ~basedir ~baseuri:u))
   uri_deps;
   List.iter
    (fun file -> 
@@ -92,7 +94,7 @@ let main () =
     let deps = List.fast_sort Pervasives.compare deps in
     let deps = HExtlib.list_uniq deps in
     let deps = file :: deps in
-    let moo = MatitacleanLib.obj_file_of_script file in
+    let moo = MatitaMisc.obj_file_of_script ~basedir file in
      Printf.printf "%s: %s\n" moo (String.concat " " deps);
      Printf.printf "%s: %s\n" (Pcre.replace ~pat:"ma$" ~templ:"mo" file) moo)
    (Helm_registry.get_list Helm_registry.string "matita.args")