Source file topkg.ml

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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
(*---------------------------------------------------------------------------
   Copyright (c) 2016 Daniel C. Bünzli. All rights reserved.
   SPDX-License-Identifier: ISC
  ---------------------------------------------------------------------------*)

(* Preliminaries *)

include Topkg_result

let strf = Topkg_string.strf
module String = Topkg_string

type fpath = string
module Fpath = Topkg_fpath

module Cmd = Topkg_cmd
module Log = Topkg_log
module OS = Topkg_os
module Vcs = Topkg_vcs

(* Package description *)

module Conf = Topkg_conf
module Exts = Topkg_fexts
module Pkg = struct

  (* Install *)

  type install = Topkg_install.t
  type field = Topkg_install.field
  type exec_field = ?auto:bool -> field

  let nothing = Topkg_install.nothing
  let flatten = Topkg_install.flatten
  let bin = Topkg_install.bin
  let doc = Topkg_install.doc
  let etc = Topkg_install.etc
  let lib = Topkg_install.lib
  let lib_root = Topkg_install.lib_root
  let libexec = Topkg_install.libexec
  let libexec_root = Topkg_install.libexec_root
  let man = Topkg_install.man
  let misc = Topkg_install.misc
  let sbin = Topkg_install.sbin
  let share = Topkg_install.share
  let share_root = Topkg_install.share_root
  let stublibs = Topkg_install.stublibs
  let toplevel = Topkg_install.toplevel
  let unknown = Topkg_install.unknown
  let test = Topkg_install.test

  let mllib = Topkg_install.mllib
  let clib = Topkg_install.clib

  (* Distrib *)

  type watermark = Topkg_distrib.watermark
  type distrib = Topkg_distrib.t

  let distrib = Topkg_distrib.v
  let watermarks = Topkg_distrib.default_watermarks
  let files_to_watermark = Topkg_distrib.default_files_to_watermark
  let massage = Topkg_distrib.default_massage
  let exclude_paths = Topkg_distrib.default_exclude_paths

  (* Publish *)

  type publish = Topkg_publish.t
  let publish = Topkg_publish.v

  (* Build *)

  type build = Topkg_build.t
  let build = Topkg_build.v
  let build_cmd = Topkg_build.build_cmd
  let clean_cmd = Topkg_build.clean_cmd
  let ocb_tag = Topkg_build.ocb_tag
  let ocb_bool_tag = Topkg_build.ocb_bool_tag
  let ocb_bool_tags = Topkg_build.ocb_bool_tags

  (* Package *)

  type std_file = Topkg_pkg.std_file
  let std_file = Topkg_pkg.std_file

  type meta_file = Topkg_pkg.meta_file
  let meta_file = Topkg_pkg.meta_file

  type opam_file = Topkg_pkg.opam_file
  let opam_file = Topkg_pkg.opam_file

  (* Describe *)

  let describe = Topkg_main.describe
end

module Private = struct
  let disable_main = Topkg_main.disable
  module Codec = Topkg_codec
  module Pkg = Topkg_pkg
  module Ipc = Topkg_ipc
  module Opam = Topkg_opam
end