(* -*- tuareg -*- *)

let preprocess =
   match Sys.getenv "BISECT_ENABLE" with
   | "yes" -> "(preprocess (pps bisect_ppx))"
   | _ -> ""
   | exception _ -> ""

let () = Jbuild_plugin.V1.send @@ {|

(rule
 (targets lwt_react.ml)
 (deps (:ml lwt_react.cppo.ml))
 (action
  (chdir %{project_root}
   (run %{bin:cppo} -V OCAML:%{ocaml_version} %{ml} -o %{targets}))))

(library
 (public_name lwt_react)
 (synopsis "Reactive programming helpers for Lwt")
 (wrapped false)
 (libraries lwt react)
 |} ^ preprocess ^ {|
 (flags (:standard -w +A)))

|}
