Skip to content

Commit ebcbcf5

Browse files
committed
Fix toplevel compilation (missing runtime file)
1 parent a1a71c2 commit ebcbcf5

File tree

1 file changed

+22
-0
lines changed
  • toplevel/examples/lwt_toplevel

1 file changed

+22
-0
lines changed

toplevel/examples/lwt_toplevel/dune

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,27 @@
145145
%{target}
146146
(run ./effects_flags.exe txt %{profile}))))
147147

148+
(rule
149+
(target javascript_files.txt)
150+
(enabled_if
151+
(and %{oxcaml_supported} %{lib-available:js_of_ocaml-ppx}))
152+
(action
153+
(with-stdout-to
154+
%{target}
155+
(pipe-stdout
156+
(run ocamlfind query -format "%+(jsoo_runtime)" -r ppxlib)
157+
(run grep -v ^$)))))
158+
159+
(rule
160+
(target javascript_files.txt)
161+
(enabled_if
162+
(not
163+
(and %{oxcaml_supported} %{lib-available:js_of_ocaml-ppx})))
164+
(action
165+
(with-stdout-to
166+
%{target}
167+
(echo ""))))
168+
148169
(rule
149170
(targets toplevel.js)
150171
(action
@@ -169,6 +190,7 @@
169190
--toplevel
170191
--disable
171192
shortvar
193+
%{read-strings:javascript_files.txt}
172194
%{dep:toplevel.bc}
173195
-o
174196
%{targets})))

0 commit comments

Comments
 (0)