-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
62 lines (51 loc) · 1.64 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
51
52
53
54
55
56
57
58
59
60
61
62
# last refactor: 2021-05-05
.ONESHELL:
all: test
# Use install-deps instead of 'install' because usually 'make install' adds a
# binary to the system path and we don't want to confuse users
install-deps:
# Install ligo/tezos specific system-level dependencies
sudo scripts/install_native_dependencies.sh
scripts/install_build_environment.sh # TODO: or scripts/install_opam.sh ?
build-deps:
export PATH="/usr/local/bin$${PATH:+:}$${PATH:-}"
# Create opam dev switch locally for use with Ligo, add merlin/etc
if [ ! -d "./_opam" ];
then scripts/setup_switch.sh;
fi
eval $$(opam config env)
# NEW-PROTOCOL-TEMPORARY
git submodule sync --recursive
git submodule update --init --recursive --remote
# NEW-PROTOCOL-TEMPORARY
# Install OCaml build dependencies for Ligo
scripts/install_vendors_deps.sh
build: build-deps
export PATH="/usr/local/bin$${PATH:+:}$${PATH:-}"
eval $$(opam config env)
# Build Ligo for local dev use
scripts/build_ligo_local.sh
test: build
scripts/check_duplicate_filenames.sh || exit
export PATH="/usr/local/bin$${PATH:+:}$${PATH:-}"
eval $$(opam config env)
scripts/test_ligo.sh
clean:
dune clean
rm -fr _coverage_all _coverage_cli _coverage_ligo
coverage:
eval $$(opam config env)
find . -name '*.coverage' | xargs rm -f
dune runtest --instrument-with bisect_ppx --force
bisect-ppx-report html -o ./_coverage_all --title="LIGO overall test coverage"
bisect-ppx-report summary --per-file
install:
cp _build/install/default/bin/ligo /usr/local/bin/ligo
install-vscode:
$(MAKE) -C tools/vscode install-vscode
run-vscode:
$(MAKE) -C tools/vscode run-vscode
.PHONY: lock
lock:
opam exec -- dune build ligo.opam
opam lock .