0a7f9a39a9
This is a rewrite of the build system with `jbuilder`, with just a minimal toplevel Makefile for backward compatibility. This first patch preserves the project architecture, we only gain proper dependencies handling and always up-to-date `.merlin` files. A latter patch may split the project in smaller "sub-package", i.e. multiple `.opam` files. The embedded versions of the economic protocol are now compiled with `jbuilder` instead of `tezos-protocol-compiler`, potentially allowing proper inlining at the cost of slightly-less-stricter sandboxing. Nevertheless, dynamically loaded protocol are still compiled with the `tezos-protocol-compiler` and thus strictly sandboxed ; and a CI rule also checks the proper sandboxing of embedded protocols. This patch is coauthored with @hnrgrgr
32 lines
845 B
Bash
Executable File
32 lines
845 B
Bash
Executable File
#! /bin/sh
|
|
|
|
script_dir="$(cd "$(dirname "$0")" && echo "$(pwd -P)/")"
|
|
src_dir="$(dirname "$script_dir")"
|
|
|
|
. "$script_dir/version.sh"
|
|
|
|
if [ "$(ocaml -vnum)" != "$ocaml_version" ]; then
|
|
echo ;
|
|
echo " Unexpected compiler version ($(ocaml -vnum))";
|
|
echo " You should use ocaml-$ocaml_version.";
|
|
echo ;
|
|
exit 1;
|
|
fi
|
|
|
|
set -e
|
|
set -x
|
|
|
|
opam pin --yes add --no-action --dev-repo sodium
|
|
opam pin --yes add --no-action --dev-repo ocp-ocamlres
|
|
opam pin --yes add --no-action --dev-repo ocplib-json-typed
|
|
opam pin --yes add --no-action --dev-repo ocplib-resto
|
|
opam pin --yes add --no-action --dev-repo jbuilder
|
|
## Force opam to take account of the new `tezos-deps.opam`
|
|
opam pin --yes remove tezos
|
|
opam pin --yes add --no-action tezos $src_dir
|
|
|
|
opam list --installed depext || opam install depext
|
|
opam depext tezos
|
|
|
|
opam install tezos --deps-only
|