File: dune

package info (click to toggle)
js-of-ocaml 6.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 37,932 kB
  • sloc: ml: 135,957; javascript: 58,364; ansic: 437; makefile: 422; sh: 12; perl: 4
file content (47 lines) | stat: -rw-r--r-- 911 bytes parent folder | download | duplicates (2)
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
(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
   -w
   no-missing-effects-backend
   %{dep:test_toplevel.bc}
   -o
   %{targets})))

(rule
 (target test_toplevel.bc.js.actual)
 (enabled_if
  (>= %{ocaml_version} 5.2))
 (action
  (with-stdout-to
   %{target}
   (run node %{dep:test_toplevel.bc.js}))))

(rule
 (target test_toplevel.js.actual)
 (enabled_if
  (>= %{ocaml_version} 5.2))
 (action
  (with-stdout-to
   %{target}
   (run node %{dep:test_toplevel.js}))))

(rule
 (alias runtest-js)
 (enabled_if
  (>= %{ocaml_version} 5.2))
 (action
  (progn
   (diff test_toplevel.expected test_toplevel.bc.js.actual)
   (diff test_toplevel.expected test_toplevel.js.actual))))