1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
(executables
(names test_toplevel)
(libraries js_of_ocaml-compiler.dynlink compiler-libs.toplevel)
(flags
(:standard -linkall))
(js_of_ocaml
(flags :standard --toplevel))
(modes byte js))
(rule
(targets test_toplevel.js)
(action
(run %{bin:js_of_ocaml} --toplevel %{dep:test_toplevel.bc} -o %{targets})))
(rule
(target test_toplevel.referencejs)
(deps test_toplevel.js)
(enabled_if
(>= %{ocaml_version} 5.2))
(action
(with-stdout-to
%{target}
(run node ./test_toplevel.js))))
(rule
(target test_toplevel.referencebcjs)
(deps test_toplevel.bc.js)
(enabled_if
(>= %{ocaml_version} 5.2))
(action
(with-stdout-to
%{target}
(run node ./test_toplevel.bc.js))))
(rule
(alias runtest)
(enabled_if
(>= %{ocaml_version} 5.2))
(deps test_toplevel.reference test_toplevel.referencejs)
(action
(progn
(diff test_toplevel.reference test_toplevel.referencebcjs)
(diff test_toplevel.reference test_toplevel.referencejs))))
|