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