(executables
 (names main)
 (libraries toplevel_expect_test js_of_ocaml-ppx stdlib)
 (modes byte)
 (link_flags (-linkall)))

(rule
 (targets ppx.mlt.corrected)
 (enabled_if
  (>= %{ocaml_version} 5.2))
 (action
  (run %{exe:main.bc} %{dep:ppx.mlt})))

(rule
 (alias runtest)
 (package js_of_ocaml-ppx)
 (enabled_if
  (>= %{ocaml_version} 5.2))
 (action
  (diff ppx.mlt ppx.mlt.corrected)))
