(rule
 (with-stdout-to
  version.ml
  (echo "let v = \"%{version:ocp-indent}\"")))

(executable
 (name main)
 (public_name ocp-indent-gen-rules)
 (libraries cmdliner))

;; Auto indent files with `dune build @fmt`

(subdir
 run
 (dynamic_include ../rules/dune.ocp-indent))

(subdir
 rules
 (rule
  (deps
   (glob_files ../*.{ml,mli}))
  (target dune.ocp-indent)
  (action
   (run ocp-indent-gen-rules -o %{target}))))
