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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
(executables
(names a b)
(modes byte)
(libraries js_of_ocaml))
(rule
(target a.js)
(action
(run
%{bin:js_of_ocaml}
%{dep:./a.bc}
--wrap-with-fun
implemA
-o
a.js
--pretty
--target-env
browser
--no-extern-fs)))
(rule
(target a-iife.js)
(action
(run
%{bin:js_of_ocaml}
%{dep:./a.bc}
-o
a-iife.js
--target-env
browser
--no-extern-fs)))
(rule
(target b.js)
(action
(run
%{bin:js_of_ocaml}
%{dep:./b.bc}
--wrap-with-fun
implemB
-o
b.js
--pretty
--target-env
browser
--no-extern-fs)))
(alias
(name default)
(deps a.js b.js a-iife.js index.html))
(rule
(target for-node.actual)
(deps a.js b.js a-iife.js for-node.js)
(action
(with-outputs-to
%{target}
(run node for-node.js))))
(rule
(alias runtest)
(action
(diff %{dep:for-node.expected} %{dep:for-node.actual})))
|