(* -*- tuareg -*- *)

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

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

(library
 (name odoc_parser)
 (public_name odoc.parser)
    |} ^ preprocess ^ {|
 (libraries astring odoc_compat odoc_model))
    |}
