I'm using camlp4.macro to enable conditional compilation. I'm having problems informing OCamlbuild that certain files tagged with "use_jscore" must be preprocessed with a given camlp4 option. Here's what I have currently:
let _ = dispatch begin function
| After_rules ->
flag ["ocaml"; "use_jscore"] (S[A"-package"; A"camlp4.macro"; A"-syntax"; A"camlp4o"; A"-ppopt"; A"-DUSE_JSCORE"]);
But this gets escaped all wrong by OCamlbuild. I'm using ocamlfind, so basically what I want to tell OCamlbuild is that all OCaml files tagged with "use_jscore" must be preprocessed by camlp4.macro which is also given the -DUSE_JSCORE option.