Make: add make build-dev-deps
This commit is contained in:
parent
fbd97da7b4
commit
14656a288b
3
Makefile
3
Makefile
@ -81,6 +81,9 @@ fix-indent:
|
||||
build-deps:
|
||||
@./scripts/install_build_deps.sh
|
||||
|
||||
build-dev-deps:
|
||||
@./scripts/install_build_deps.sh --dev
|
||||
|
||||
docker-image:
|
||||
@./scripts/create_docker_image.sh
|
||||
|
||||
|
@ -152,6 +152,14 @@ Install the OCaml compiler and the libraries which Tezos depends on:
|
||||
|
||||
make build-deps
|
||||
|
||||
Alternatively, if you want to be able to install extra packages
|
||||
(development packages such as `merlin`), you may use the following
|
||||
command instead:
|
||||
|
||||
::
|
||||
|
||||
make build-dev-deps
|
||||
|
||||
This command creates a local opam switch ``_opam`` where the right
|
||||
version of OCaml is compiled and installed (this takes a while but
|
||||
it's only done once).
|
||||
@ -174,11 +182,3 @@ Lastly you can also add Tezos binaries to your ``PATH`` variable,
|
||||
activate bash autocompletion and after reading the Disclaimer a few
|
||||
hundred times you are allowed to disable it with
|
||||
``TEZOS_CLIENT_UNSAFE_DISABLE_DISCLAIMER=Y``.
|
||||
|
||||
To add the default opam repository at a lower priority (for example to
|
||||
install merlin or test other opam packages), you can use the following
|
||||
command:
|
||||
|
||||
::
|
||||
|
||||
opam repo add default --rank=-1
|
||||
|
@ -7,4 +7,10 @@ src_dir="$(dirname "$script_dir")"
|
||||
|
||||
opams=$(find "$src_dir/vendors" "$src_dir/src" -name \*.opam -print)
|
||||
|
||||
opam install $opams --deps-only --with-test -y --criteria="-notuptodate,-changed,-removed"
|
||||
export OPAMYES=${OPAMYES:=true}
|
||||
|
||||
## In an ideal world, `--with-test` should be present only when using
|
||||
## `--dev`. But this would probably break the CI, so we postponed this
|
||||
## change until someone have some spare time. (@pirbo, @hnrgrgr)
|
||||
|
||||
opam install $opams --deps-only --with-test --criteria="-notuptodate,-changed,-removed"
|
||||
|
@ -5,6 +5,12 @@ src_dir="$(dirname "$script_dir")"
|
||||
|
||||
. "$script_dir"/version.sh
|
||||
|
||||
if [ "$1" = "--dev" ]; then
|
||||
dev=yes
|
||||
else
|
||||
dev=
|
||||
fi
|
||||
|
||||
opam repository set-url tezos --dont-select $opam_repository || \
|
||||
opam repository add tezos --dont-select $opam_repository > /dev/null 2>&1
|
||||
|
||||
@ -21,6 +27,10 @@ fi
|
||||
|
||||
eval $(opam env --shell=sh)
|
||||
|
||||
if [ -n "$dev" ]; then
|
||||
opam repository remove default > /dev/null 2>&1 || true
|
||||
fi
|
||||
|
||||
if [ "$(ocaml -vnum)" != "$ocaml_version" ]; then
|
||||
opam install --unlock-base ocaml-base-compiler.$ocaml_version
|
||||
fi
|
||||
@ -28,3 +38,8 @@ fi
|
||||
opam list --installed opam-depext || opam --yes install opam-depext
|
||||
|
||||
"$script_dir"/install_build_deps.raw.sh
|
||||
|
||||
if [ -n "$dev" ]; then
|
||||
opam repository add default --rank=-1 > /dev/null 2>&1 || true
|
||||
opam install merlin
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user