-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathassemble.ml
213 lines (174 loc) · 3.41 KB
/
assemble.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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
open Assemblage
let version = "0.2.0"
let warnings = ["-w";"@f@p@u@y"]
let flags =
Flags.(v (`Compile `Byte) warnings @@@
v (`Compile `Native) warnings @@@
v (`Link `Native) [(*"-p"*)])
let unix = pkg "unix"
let stringext = pkg "stringext"
let uri = pkg "uri"
let doc_ock = pkg "doc-ock"
let doc_ock_xml = pkg "doc-ock-xml"
let xmlm = pkg "xmlm"
let blueprint = pkg "blueprint"
let cmdliner = pkg "cmdliner"
let library = `Path ["lib"]
let cli = `Path ["cli"]
let opam = `Path ["opam-doc"]
let codoc_doc_maps = unit "codocDocMaps" ~deps:[
doc_ock;
] library
let codoc_extraction = unit "codocExtraction" ~deps:[
doc_ock;
] library
let codoc_doc = unit "codocDoc" ~deps:[
doc_ock;
doc_ock_xml;
codoc_doc_maps;
codoc_extraction;
] library
let codoc_util = unit "codocUtil" ~deps:[
stringext;
doc_ock;
codoc_doc;
] library
let codoc_unit = unit "codocUnit" ~deps:[
uri;
doc_ock;
codoc_util;
codoc_doc;
codoc_doc_maps;
] library
let codoc_analysis = unit "codocAnalysis" ~deps:[
xmlm;
doc_ock;
] library
let codoc_doc_html = unit "codocDocHtml" ~deps:[
uri;
doc_ock;
blueprint;
codoc_doc;
] library
let codoc_xml = unit "codocXml" ~deps:[
xmlm;
doc_ock_xml;
codoc_doc;
] library
let codoc_index = unit "codocIndex" ~deps:[
xmlm;
stringext;
] library
let codoc_unit_html = unit "codocUnitHtml" ~deps:[
blueprint;
] library
let codoc_index_html = unit "codocIndexHtml" ~deps:[
uri;
blueprint;
codoc_util;
codoc_unit_html;
] library
let codoc_env = unit "codocEnvironment" ~deps:[
doc_ock_xml;
codoc_doc;
] library
let codoc_template = unit "codocTemplate" ~deps:[
blueprint;
xmlm;
unix; (* TODO: would be nice out of the library and into the tool *)
] library
let codoc = lib ~flags "codoc" (`Units [
codoc_doc_maps;
codoc_extraction;
codoc_doc;
codoc_util;
codoc_unit;
codoc_doc_html;
codoc_xml;
codoc_analysis;
codoc_index;
codoc_unit_html;
codoc_index_html;
codoc_env;
codoc_template;
])
let codoc_config = unit "codocConfig" ~deps:[] cli
let codoc_sys_util = unit "codocSysUtil" ~deps:[
xmlm;
codoc;
] cli
let codoc_cli = unit "codocCli" ~deps:[
uri;
cmdliner;
codoc_config;
] cli
let cli_lib = lib ~flags "cli" (`Units [
codoc_cli;
])
let codoc_cli_list_extractions = unit "codocCliListExtractions" ~deps:[
cli_lib;
codoc_sys_util;
codoc;
] cli
let codoc_cli_extract = unit "codocCliExtract" ~deps:[
codoc;
cli_lib;
codoc_sys_util;
doc_ock;
doc_ock_xml;
] cli
let codoc_cli_link = unit "codocCliLink" ~deps:[
xmlm;
codoc;
cli_lib;
codoc_sys_util;
doc_ock;
doc_ock_xml;
] cli
let codoc_cli_html = unit "codocCliHtml" ~deps:[
xmlm;
blueprint;
codoc;
cli_lib;
codoc_sys_util;
] cli
let codoc_cli_doc = unit "codocCliDoc" ~deps:[
doc_ock;
doc_ock_xml;
codoc;
codoc_cli_extract;
codoc_cli_link;
codoc_cli_html;
] cli
let codoc_cmd = unit "codocMain" ~deps:[
cmdliner;
cli_lib;
codoc_cli_list_extractions;
codoc_cli_extract;
codoc_cli_link;
codoc_cli_html;
codoc_cli_doc;
] cli
let codoc_bin = bin ~flags "codoc" (`Units [
codoc_cli_list_extractions;
codoc_cli_extract;
codoc_cli_link;
codoc_cli_html;
codoc_cli_doc;
codoc_cmd;
])
let opam_doc = unit "opamDoc" ~deps:[
unix;
cmdliner;
cli_lib;
codoc_config;
] opam
let opamdoc = bin ~flags "opam-doc" (`Units [
opam_doc;
])
;;
assemble (project ~version "codoc" [
codoc;
codoc_bin;
opamdoc;
])