]> matita.cs.unibo.it Git - helm.git/blob - helm/software/components/library/librarian.mli
63c900036f89d92f4dd98fd0a4cdcc5195ced80e
[helm.git] / helm / software / components / library / librarian.mli
1 exception NoRootFor of string
2
3 val absolutize: string -> string 
4
5 val load_root_file: 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, a.ma *)
12 val baseuri_of_script: 
13   include_paths:string list -> string -> string * string * string * string
14
15 val mk_baseuri: 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 string_of_source_object: source_object -> string
29     val string_of_target_object: target_object -> string
30     val build: options -> source_object -> bool
31     val root_and_target_of: 
32           options -> source_object -> string option * target_object
33     val mtime_of_source_object: source_object -> float option
34     val mtime_of_target_object: target_object -> float option
35     val is_readonly_buri_of: options -> source_object -> bool
36   end
37
38 module Make :
39   functor (F : Format) ->
40     sig
41       (* make [root dir] [targets], targets = [] means make all *)
42       val make : string -> F.source_object list ->  bool
43     end
44
45 val load_deps_file: string -> (string * string list) list
46 val write_deps_file: string -> (string * string list) list -> unit