Skip to content

Instantly share code, notes, and snippets.

@hcarty
Created May 9, 2013 15:21
Show Gist options
  • Save hcarty/5548144 to your computer and use it in GitHub Desktop.
Save hcarty/5548144 to your computer and use it in GitHub Desktop.
myocamlbuild.ml for atdgen support. Taken from https://github.com/mjambon/atdgen-tutorial/issues/1
open Ocamlbuild_plugin
let () = dispatch begin function
| After_rules ->
rule "atdgen: .atd -> _t.ml*, _j.ml*, _v.ml*"
~prods:["%_t.ml";"%_t.mli";"%_j.ml";"%_j.mli";"%_v.ml";"%_v.mli";]
~dep:"%.atd"
(begin fun env build ->
let atdgen = "atdgen" in
Seq [
Cmd (S [A atdgen; A "-t"; P (env "%.atd")]);
Cmd (S [A atdgen; A "-j"; A "-j-std"; P (env "%.atd")]);
Cmd (S [A atdgen; A "-v"; P (env "%.atd")]);
]
end);
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment