@@ -152,17 +152,26 @@ patch-for-js:
152
152
153
153
_LIBROOT =$(shell opam var lib)
154
154
155
+ # At some point this may be the better idea
156
+ # Not true in this branch
157
+ # VENDORED_SETUP:=true
158
+
159
+ ifdef VENDORED_SETUP
160
+ _CCROOT =_build/install/default/lib/coq-core
161
+ else
162
+ _CCROOT =$(shell coqc -where) /../coq-core
163
+ endif
164
+
155
165
# Super-hack
156
166
controller-js/coq-fs-core.js : COQVM = no
157
167
controller-js/coq-fs-core.js : coq_boot
158
168
dune build --profile=release --display=quiet $(PKG_SET ) etc/META.threads
159
- for i in $$ (find _build/install/default/lib/coq-core /plugins -name * .cma); do js_of_ocaml --dynlink $$ i; done
169
+ for i in $$ (find $( _CCROOT ) /plugins -name * .cma); do js_of_ocaml --dynlink $$ i; done
160
170
for i in $$ (find _build/install/default/lib/coq-lsp/serlib -wholename * /* .cma); do js_of_ocaml --dynlink $$ i; done
161
- cd _build/install/default/lib && \
162
- js_of_ocaml build-fs -o coq-fs-core.js \
163
- $$(find coq-core/ \( -wholename '*/plugins/*/*.js' -or -wholename '*/META' \ ) -printf " %p:/static/lib/%p " ) \
164
- $$(find coq-lsp/ \( -wholename '*/serlib/*/*.js' -or -wholename '*/META' \ ) -printf " %p:/static/lib/%p " ) \
165
- ../../../../etc/META.threads:/static/lib/threads/META \
171
+ js_of_ocaml build-fs -o controller-js/coq-fs-core.js \
172
+ $$(find $(_CCROOT ) / \( -wholename '*/plugins/*/*.js' -or -wholename '*/META' \ ) -printf " %p:/static/lib/%p " ) \
173
+ $$(find _build/install/default/lib/coq-lsp/ \( -wholename '*/serlib/*/*.js' -or -wholename '*/META' \ ) -printf " %p:/static/lib/%p " ) \
174
+ ./etc/META.threads:/static/lib/threads/META \
166
175
$$(find $(_LIBROOT ) -wholename '*/str/META' -printf "%p:/static/lib/%P " ) \
167
176
$$(find $(_LIBROOT ) -wholename '*/seq/META' -printf "%p:/static/lib/%P " ) \
168
177
$$(find $(_LIBROOT ) -wholename '*/uri/META' -printf "%p:/static/lib/%P " ) \
@@ -187,7 +196,6 @@ controller-js/coq-fs-core.js: coq_boot
187
196
$$(find $(_LIBROOT ) -wholename '*/ppx_deriving_yojson/META' -printf "%p:/static/lib/%P " )
188
197
# These libs are actually linked, so no cma is needed.
189
198
# $$(find $(_LIBROOT) -wholename '*/zarith/*.cma' -printf "%p:/static/lib/%P " -or -wholename '*/zarith/META' -printf "%p:/static/lib/%P ")
190
- cp _build/install/default/lib/coq-fs-core.js controller-js
191
199
192
200
# Serlib plugins require:
193
201
# ppx_compare.runtime-lib
0 commit comments