Skip to content

Commit 1685e18

Browse files
committed
Merge branch 'v8.20' into v8.19
2 parents 6d12528 + 7e50a21 commit 1685e18

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

Makefile

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -152,17 +152,26 @@ patch-for-js:
152152

153153
_LIBROOT=$(shell opam var lib)
154154

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+
155165
# Super-hack
156166
controller-js/coq-fs-core.js: COQVM = no
157167
controller-js/coq-fs-core.js: coq_boot
158168
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
160170
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 \
166175
$$(find $(_LIBROOT) -wholename '*/str/META' -printf "%p:/static/lib/%P ") \
167176
$$(find $(_LIBROOT) -wholename '*/seq/META' -printf "%p:/static/lib/%P ") \
168177
$$(find $(_LIBROOT) -wholename '*/uri/META' -printf "%p:/static/lib/%P ") \
@@ -187,7 +196,6 @@ controller-js/coq-fs-core.js: coq_boot
187196
$$(find $(_LIBROOT) -wholename '*/ppx_deriving_yojson/META' -printf "%p:/static/lib/%P ")
188197
# These libs are actually linked, so no cma is needed.
189198
# $$(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
191199

192200
# Serlib plugins require:
193201
# ppx_compare.runtime-lib

controller-js/dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
(package coq-stdlib))
5959
(action
6060
(bash
61-
"cd ../vendor/coq && js_of_ocaml build-fs -o ../../controller-js/coq-fs.js $(find theories user-contrib \\( -wholename 'theories/*.vo' -or -wholename 'theories/*.glob' -or -wholename 'theories/*.v' -or -wholename 'user-contrib/*.vo' -or -wholename 'user-contrib/*.v' -or -wholename 'user-contrib/*.glob' \\) -printf '%p:/static/coqlib/%p ')")))
61+
"export COQW=$(coqc -where) && js_of_ocaml build-fs -o coq-fs.js $(cd $COQW && find theories user-contrib \\( -wholename 'theories/*.vo' -or -wholename 'theories/*.glob' -or -wholename 'theories/*.v' -or -wholename 'user-contrib/*.vo' -or -wholename 'user-contrib/*.v' -or -wholename 'user-contrib/*.glob' \\) -printf \"$COQW/%p:/static/coqlib/%p \")")))
6262

6363
; for coq-fs-core.js
6464
; js_of_ocaml build-fs -o coq-fs-core.js $(find coq-core/ -wholename '*/plugins/*/*.cma' -or -wholename '*/META' -printf "%p:/lib/%p")

0 commit comments

Comments
 (0)