-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmyocamlbuild.ml
31 lines (25 loc) · 1.26 KB
/
myocamlbuild.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
open Ocamlbuild_plugin
let _ = dispatch begin function
| After_options ->
Options.ocamlc := S[!Options.ocamlc ; A"-rectypes"];
Options.ocamlopt := S[!Options.ocamlopt; A"-rectypes"];
| After_rules ->
(* menhir & --explain/--trace/--table *)
flag ["ocaml"; "parser"; "menhir"; "menhir_explain"] & A"--explain";
flag ["ocaml"; "parser"; "menhir"; "menhir_trace" ] & A"--trace";
flag ["ocaml"; "parser"; "menhir"; "menhir_table" ] & A"--table";
(* Threads switches *)
flag ["ocaml"; "pkg_threads"; "compile"] (S[A "-thread"]);
flag ["ocaml"; "pkg_threads"; "link"] (S[A "-thread"]);
(* Bisect *)
flag ["ocaml"; "compile" ; "bisect"] & S[A"-package"; A"bisect"];
flag ["ocaml"; "compile" ; "bisect"] & S[A"-syntax" ; A"camlp4o"];
flag ["ocaml"; "compile" ; "bisect"] & S[A"-syntax" ; A"bisect_pp"];
flag ["ocaml"; "ocamldep"; "bisect"] & S[A"-package"; A"bisect"];
flag ["ocaml"; "ocamldep"; "bisect"] & S[A"-syntax" ; A"camlp4o"];
flag ["ocaml"; "ocamldep"; "bisect"] & S[A"-syntax" ; A"bisect_pp"];
flag ["ocaml"; "link" ; "bisect"] & S[A"-package"; A"bisect"];
(* src / tests *)
Pathname.define_context "src" ["libs"]
| _ -> ()
end