+ if matita_debug then raise exn;
+ HLog.error
+ ("Unwrapped exception, please fix: "^ snd (MatitaExcPp.to_string exn));
+ pp_times fname false big_bang big_bang_u big_bang_s;
+ clean_exit baseuri false
+;;
+
+module F =
+ struct
+ type source_object = string
+ type target_object = string
+ let string_of_source_object s = s;;
+ let string_of_target_object s = s;;
+
+ let is_readonly_buri_of opts file =
+ let buri = List.assoc "baseuri" opts in
+ Http_getter_storage.is_read_only (Librarian.mk_baseuri buri file)
+ ;;
+
+ let root_and_target_of opts mafile =
+ try
+ let include_paths = get_include_paths opts in
+ let root,baseuri,_,_ =
+ Librarian.baseuri_of_script ~include_paths mafile
+ in
+ Some root, LibraryMisc.obj_file_of_baseuri
+ ~must_exist:false ~baseuri ~writable:true
+ with Librarian.NoRootFor x -> None, ""
+ ;;
+
+ let mtime_of_source_object s =
+ try Some (Unix.stat s).Unix.st_mtime
+ with Unix.Unix_error (Unix.ENOENT, "stat", f) when f = s -> None
+ ;;
+
+ let mtime_of_target_object s =
+ try Some (Unix.stat s).Unix.st_mtime
+ with Unix.Unix_error (Unix.ENOENT, "stat", f) when f = s -> None
+ ;;
+
+ let build = compile;;
+
+ let load_deps_file = Librarian.load_deps_file;;
+
+ let dotdothack s =
+ let rec aux = function
+ | ".." :: _ :: tl -> aux tl
+ | x -> x
+ in
+ String.concat "/" (aux (Str.split (Str.regexp "/") s))
+ ;;
+
+ end
+
+module Make = Librarian.Make(F)