-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (37 loc) · 1.11 KB
/
Makefile
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
48
49
50
SHELL := bash
.PHONY: build release test test_update coverage clean fmt doc dep install uninstall upgrade_quickjs
build:
opam exec dune -- build @install --profile=dev
release:
opam exec dune -- build @install --profile=release
test:
OCAMLRUNPARAM=b opam exec dune -- runtest
test_update:
-opam exec dune -- runtest --auto-promote
coverage:
opam exec dune -- clean
OCAMLRUNPARAM=b opam exec dune -- runtest --instrument-with bisect_ppx
opam exec bisect-ppx-report -- coveralls _coverage/coverage.json
opam exec bisect-ppx-report -- html
opam exec bisect-ppx-report -- summary
clean:
opam exec dune -- clean
rm -rf ./_coverage
fmt:
-opam exec dune -- build @fmt --auto-promote
doc:
opam exec dune -- build @doc
dep:
opam depext -yt conf-pkg-config
opam install . --deps-only --with-test
install: release
opam install .
uninstall: release
opam remove .
upgrade_quickjs:
cd ./vendor/quickjs && git pull
sed -i.bak -E \
-e "s/-DCONFIG_VERSION=\\\\\"[-0-9]+\\\\\"/-DCONFIG_VERSION=\\\\\"$(shell cat vendor/quickjs/VERSION)\\\\\"/" \
vendor/dune gen/constants.ml
rm vendor/dune.bak
rm gen/constants.ml.bak