File: dist.mli

package info (click to toggle)
ocaml-obuild 0.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,456 kB
  • sloc: ml: 14,491; sh: 211; ansic: 34; makefile: 11
file content (45 lines) | stat: -rw-r--r-- 1,465 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
(** Distribution directory management *)

(** Build directory type *)
type t =
  | Autogen           (** Auto-generated files *)
  | Dot               (** DOT graph files *)
  | Target of Target.Name.t  (** Target-specific directory *)

val to_string : t -> string
(** Convert build directory type to string *)

exception DistNotADirectory
exception MissingDestinationDirectory of t
exception DistNotFound
exception DistFileNotFound of string

val set_path : Filepath.filepath -> unit
val get_path : unit -> Filepath.filepath
val build_path : Filepath.filepath
val setup_path : Filepath.filepath
val configure_path : Filepath.filepath

val check_exn : (unit -> unit) -> unit
(** Check dist directory exists, call function if it doesn't *)

val exist : unit -> unit
(** Check dist directory exists, raise DistNotFound if not *)

val create_maybe : unit -> unit
(** Create dist directory if it doesn't exist *)

val get_build : unit -> Filepath.filepath
val get_build_path : t -> Filepath.filepath
val get_build_exn : t -> Filepath.filepath
(** Get build path, raise MissingDestinationDirectory if doesn't exist *)

val create_build : t -> Filepath.filepath
(** Create and return build directory for given type *)

val read_setup : unit -> (string, string) Hashtbl.t
val read_configure : unit -> (string, string) Hashtbl.t
val write_setup : (string, string) Hashtbl.t -> unit

val remove_dead_links : unit -> unit
(** Remove symlinks pointing to build directories *)