(documentation
 (package odoc)
 (mld_files
  driver
  dune
  features
  index
  interface
  ocamldoc_differences
  odoc_for_authors
  parent_child_spec))

; Uncomment to run mdx on the documentation's code blocks.
; (mdx
;  (files
;   driver.mld
;   dune.mld
;   features.mld
;   index.mld
;   interface.mld
;   ocamldoc_differences.mld
;   odoc_for_authors.mld
;   parent_child_spec.mld))

(rule
 (alias docgen)
 (deps
  (:x driver.mld)
  (glob_files *.ml*)
  (glob_files *.png)
  (glob_files library_mlds/*.mld)
  (package odoc))
 (enabled_if
  (> %{ocaml_version} 4.11))
 (action
  (progn
   (run ocaml-mdx-test %{x})
   (diff? %{x} %{x}.corrected))))
