Skip to content

Commit

Permalink
Merge branch 'v8.18' into v8.17
Browse files Browse the repository at this point in the history
  • Loading branch information
ejgallego committed Sep 29, 2024
2 parents 1cc07a0 + 61bb80e commit ce72a62
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
22 changes: 15 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -152,17 +152,26 @@ patch-for-js:

_LIBROOT=$(shell opam var lib)

# At some point this may be the better idea
# Not true in this branch
# VENDORED_SETUP:=true

ifdef VENDORED_SETUP
_CCROOT=_build/install/default/lib/coq-core
else
_CCROOT=$(shell coqc -where)/../coq-core
endif

# Super-hack
controller-js/coq-fs-core.js: COQVM = no
controller-js/coq-fs-core.js: coq_boot
dune build --profile=release --display=quiet $(PKG_SET) etc/META.threads
for i in $$(find _build/install/default/lib/coq-core/plugins -name *.cma); do js_of_ocaml --dynlink $$i; done
for i in $$(find $(_CCROOT)/plugins -name *.cma); do js_of_ocaml --dynlink $$i; done
for i in $$(find _build/install/default/lib/coq-lsp/serlib -wholename */*.cma); do js_of_ocaml --dynlink $$i; done
cd _build/install/default/lib && \
js_of_ocaml build-fs -o coq-fs-core.js \
$$(find coq-core/ \( -wholename '*/plugins/*/*.js' -or -wholename '*/META' \) -printf "%p:/static/lib/%p ") \
$$(find coq-lsp/ \( -wholename '*/serlib/*/*.js' -or -wholename '*/META' \) -printf "%p:/static/lib/%p ") \
../../../../etc/META.threads:/static/lib/threads/META \
js_of_ocaml build-fs -o controller-js/coq-fs-core.js \
$$(find $(_CCROOT)/ \( -wholename '*/plugins/*/*.js' -or -wholename '*/META' \) -printf "%p:/static/lib/%p ") \
$$(find _build/install/default/lib/coq-lsp/ \( -wholename '*/serlib/*/*.js' -or -wholename '*/META' \) -printf "%p:/static/lib/%p ") \
./etc/META.threads:/static/lib/threads/META \
$$(find $(_LIBROOT) -wholename '*/str/META' -printf "%p:/static/lib/%P ") \
$$(find $(_LIBROOT) -wholename '*/seq/META' -printf "%p:/static/lib/%P ") \
$$(find $(_LIBROOT) -wholename '*/uri/META' -printf "%p:/static/lib/%P ") \
Expand All @@ -187,7 +196,6 @@ controller-js/coq-fs-core.js: coq_boot
$$(find $(_LIBROOT) -wholename '*/ppx_deriving_yojson/META' -printf "%p:/static/lib/%P ")
# These libs are actually linked, so no cma is needed.
# $$(find $(_LIBROOT) -wholename '*/zarith/*.cma' -printf "%p:/static/lib/%P " -or -wholename '*/zarith/META' -printf "%p:/static/lib/%P ")
cp _build/install/default/lib/coq-fs-core.js controller-js

# Serlib plugins require:
# ppx_compare.runtime-lib
Expand Down
2 changes: 1 addition & 1 deletion controller-js/dune
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
(package coq-stdlib))
(action
(bash
"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 ')")))
"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 \")")))

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

0 comments on commit ce72a62

Please sign in to comment.