]> matita.cs.unibo.it Git - helm.git/blob - components/library/librarian.mli
839d8daa1e80381b3aba4faed09bee8a520cf471
[helm.git] / components / library / librarian.mli
1 exception NoRootFor of string
2
3 val find_root: string -> string
4
5 (* val parse_root: string -> (string*string) list *)
6
7 (* baseuri_of_script ?(inc:REG[matita.includes]) fname 
8  *   -> 
9  * root, buri, fullpath, rootrelativepath
10  * sample: baseuri_of_script a.ma -> /home/pippo/devel/, cic:/matita/a,
11  * /home/pippo/devel/a.ma *)
12 val baseuri_of_script: 
13   include_paths:string list -> string -> string * string * string * string
14
15 (* finds all the roots files in the specified dir *)
16 val find_roots_in_dir: string -> string list
17
18 (* make *)
19 type options = (string * string) list
20
21 module type Format =
22   sig
23     type source_object
24     type target_object
25     val load_deps_file: string -> (source_object * source_object list) list
26     val target_of: options -> source_object -> target_object
27     val string_of_source_object: source_object -> string
28     val string_of_target_object: target_object -> string
29     val build: options -> source_object -> bool
30     val root_of: options -> source_object -> string option
31     val mtime_of_source_object: source_object -> float option
32     val mtime_of_target_object: target_object -> float option
33   end
34
35 module Make :
36   functor (F : Format) ->
37     sig
38       (* make [root dir] [targets], targets = [] means make all *)
39       val make : string -> F.source_object list ->  bool
40     end
41
42 val load_deps_file: string -> (string * string list) list
43 val write_deps_file: string -> (string * string list) list -> unit