2019-06-08 23:03:53 +04:00
|
|
|
# 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:
|
2019-06-08 09:16:55 +04:00
|
|
|
# Install ligo/tezos specific system-level dependencies
|
2019-06-08 23:03:53 +04:00
|
|
|
sudo scripts/install_native_dependencies.sh
|
2019-06-01 09:32:23 +04:00
|
|
|
|
|
|
|
build-deps:
|
2019-06-08 09:16:55 +04:00
|
|
|
# Create opam dev switch locally for use with Ligo, add merlin/etc
|
2019-06-09 06:04:59 +04:00
|
|
|
if [ -n "`opam switch show | grep -P ".+/ligo"`" ];
|
|
|
|
then exit; else scripts/setup_dev_switch.sh;
|
|
|
|
fi
|
2019-06-08 09:16:55 +04:00
|
|
|
# Set up the local ligo opam repository so that it can be built
|
2019-06-09 07:11:29 +04:00
|
|
|
if [ -n "`opam repo list --safe | grep -P "ligo-opam-repository"`" ];
|
|
|
|
then exit; else scripts/setup_ligo_opam_repository.sh;
|
|
|
|
fi
|
2019-06-08 09:16:55 +04:00
|
|
|
# Install OCaml build dependencies for Ligo
|
|
|
|
scripts/install_ligo_with_dependencies.sh
|
2019-06-01 09:32:23 +04:00
|
|
|
|
|
|
|
build: build-deps
|
2019-06-08 09:16:55 +04:00
|
|
|
# Build Ligo for local dev use
|
|
|
|
scripts/build_ligo_local.sh
|
2019-06-01 09:32:23 +04:00
|
|
|
|
2019-06-09 05:27:30 +04:00
|
|
|
.ONESHELL:
|
2019-06-01 09:32:23 +04:00
|
|
|
test: build
|
2019-06-02 07:07:16 +04:00
|
|
|
eval $(opam env)
|
2019-06-01 09:32:23 +04:00
|
|
|
dune build @ligo-test
|