(library
 (name odoc_xref2)
 (public_name odoc.xref2)
 (instrumentation
  (backend landmarks --auto))
 (instrumentation
  (backend bisect_ppx))
 (libraries odoc_model))

(rule
 (with-stdout-to
  shape_tools.ml
  (run %{bin:cppo} -V OCAML:%{ocaml_version} %{dep:shape_tools.cppo.ml})))

(rule
 (with-stdout-to
  shape_tools.mli
  (run %{bin:cppo} -V OCAML:%{ocaml_version} %{dep:shape_tools.cppo.mli})))

(rule
 (alias runmdx)
 (deps
  (:x paths.md)
  (package odoc))
 (enabled_if
  (> %{ocaml_version} 4.08))
 (action
  (progn
   (run ocaml-mdx-test %{x})
   (diff? %{x} %{x}.corrected))))

(rule
 (alias runmdx)
 (deps
  (:x test.md)
  (package odoc))
 (enabled_if
  (> %{ocaml_version} 4.08))
 (action
  (progn
   (run ocaml-mdx-test %{x})
   (diff? %{x} %{x}.corrected))))

(rule
 (alias runmdx)
 (deps
  (:x notes.md)
  (package odoc))
 (enabled_if
  (> %{ocaml_version} 4.08))
 (action
  (progn
   (run ocaml-mdx-test %{x})
   (diff? %{x} %{x}.corrected))))

(rule
 (alias runmdx)
 (deps
  (:x scratch.md)
  (package odoc))
 (enabled_if
  (> %{ocaml_version} 4.08))
 (action
  (progn
   (run ocaml-mdx-test %{x})
   (diff? %{x} %{x}.corrected))))
