Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: aba30530d3
Fetching contributors…

Cannot retrieve contributors at this time

28 lines (23 sloc) 0.853 kb
(* OASIS_START *)
(* OASIS_STOP *)
let env = BaseEnvLight.load() (* setup.data *)
let has_compiler_libs =
try
Scanf.sscanf (BaseEnvLight.var_get "ocaml_version" env)
"%i" (fun maj -> maj >= 4)
with _ -> false
let my_dispatch = function
| After_rules ->
if has_compiler_libs then
(* <src/app/*.ml{,i}>: pkg_compiler-libs.toplevel *)
let files = ["src/app/code.cmo"; "src/app/code.cmx";
"src/app/build.byte"; "src/app/build.native"] in
List.iter (fun f -> tag_file f ["pkg_compiler-libs.toplevel"]) files
else (
ocaml_lib ~extern:true "toplevellib";
tag_file "src/app/build.byte" ["use_toplevellib"];
)
| _ -> ()
let () =
Ocamlbuild_plugin.dispatch (MyOCamlbuildBase.dispatch_combine
[ dispatch_default; my_dispatch])
Jump to Line
Something went wrong with that request. Please try again.