]> matita.cs.unibo.it Git - helm.git/blobdiff - components/library/librarian.mli
matita now includes compiling. if the file is not compiled it compiles it,
[helm.git] / components / library / librarian.mli
index a8e10bf5a6c5c5a565a1dfd6b5b4e1e778d69539..1c305c2654bf49ee0d338f0710760f909d58afd8 100644 (file)
@@ -1,13 +1,45 @@
-exception UnableToQualify
-val find_root : string -> string
-val is_prefix_of : string -> string -> bool
-val filename : unit -> string
+exception NoRootFor of string
 
-(* baseuri_of_script ?(inc:REG[matita.includes] fname -> root, buri, fullpath 
+val find_root: string -> string
+
+val load_root_file: string -> (string*string) list
+
+val absolutize: string -> string 
+
+(* baseuri_of_script ?(inc:REG[matita.includes]) fname 
+ *   -> 
+ * root, buri, fullpath, rootrelativepath
  * sample: baseuri_of_script a.ma -> /home/pippo/devel/, cic:/matita/a,
  * /home/pippo/devel/a.ma *)
 val baseuri_of_script: 
-  ?include_paths:string list -> string -> string * string * string
+  include_paths:string list -> string -> string * string * string * string
 
 (* finds all the roots files in the specified dir *)
 val find_roots_in_dir: string -> string list
+
+(* make *)
+type options = (string * string) list
+
+module type Format =
+  sig
+    type source_object
+    type target_object
+    val load_deps_file: string -> (source_object * source_object list) list
+    val target_of: options -> source_object -> target_object
+    val string_of_source_object: source_object -> string
+    val string_of_target_object: target_object -> string
+    val build: options -> source_object -> bool
+    val root_of: options -> source_object -> string option
+    val mtime_of_source_object: source_object -> float option
+    val mtime_of_target_object: target_object -> float option
+  end
+
+module Make :
+  functor (F : Format) ->
+    sig
+      (* make [root dir] [targets], targets = [] means make all *)
+      val make : string -> F.source_object list ->  bool
+    end
+
+val load_deps_file: string -> (string * string list) list
+val write_deps_file: string -> (string * string list) list -> unit