- (function
- | TA.Executable (_, TA.Command (_, TA.Set (_, "baseuri", uri))) ->
- let uri = MatitaMisc.strip_trailing_slash uri in
- baseuri := (uri, file) :: !baseuri
- | 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 (find path)
- | _ -> ())
- stms;
- Hashtbl.iter
- (fun file alias ->
- let dep = resolve alias in
- match dep with
- | None -> ()
- | Some d -> Hashtbl.add deps file d)
- aliases;)
- !files;
- List.iter (fun file ->
- let deps = Hashtbl.find_all deps file in
+ (function
+ | DependenciesParser.UriDep uri ->
+ let uri = UriManager.string_of_uri uri in
+ if not (Http_getter_storage.is_legacy uri) then
+ Hashtbl.add uri_deps ma_file uri
+ | DependenciesParser.BaseuriDep uri ->
+ let uri = Http_getter_misc.strip_trailing_slash uri in
+ Hashtbl.add baseuri_of ma_file uri
+ | DependenciesParser.IncludeDep path ->
+ try
+ let baseuri =
+ DependenciesParser.baseuri_of_script ~include_paths path in
+ if not (Http_getter_storage.is_legacy baseuri) then
+ let moo_file =
+ LibraryMisc.obj_file_of_baseuri ~basedir ~baseuri in
+ Hashtbl.add include_deps ma_file moo_file
+ with Sys_error _ ->
+ HLog.warn
+ ("Unable to find " ^ path ^ " that is included in " ^ ma_file)
+ ) dependencies
+ ) (Helm_registry.get_list Helm_registry.string "matita.args");
+ Hashtbl.iter
+ (fun file alias ->
+ let dep = resolve alias (Hashtbl.find baseuri_of file) in
+ match dep with
+ | None -> ()
+ | Some u ->
+ Hashtbl.add include_deps file
+ (LibraryMisc.obj_file_of_baseuri ~basedir ~baseuri:u))
+ uri_deps;
+ List.iter
+ (fun ma_file ->
+ let deps = Hashtbl.find_all include_deps ma_file in