From 44364295eeba250ab877dc7c2e5da1e60000c529 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Henry?= Date: Mon, 13 Nov 2017 23:47:13 +0100 Subject: [PATCH] Jbuilder: use `--dev` for running test and other minor improvments --- Makefile | 10 +++++---- src/client/jbuild | 5 +---- src/minutils/jbuild | 16 +++++++------- src/node/shell/jbuild | 2 +- src/proto/alpha/jbuild | 44 +++++++++++++++++++------------------- src/proto/genesis/jbuild | 46 ++++++++++++++++++++-------------------- 6 files changed, 61 insertions(+), 62 deletions(-) diff --git a/Makefile b/Makefile index 0303d0c67..adedcb579 100644 --- a/Makefile +++ b/Makefile @@ -1,18 +1,20 @@ +DEV ?= --dev + all: - @jbuilder build tezos.install --dev + @jbuilder build tezos.install ${DEV} @cp _build/default/src/node_main.exe tezos-node @cp _build/default/src/client_main.exe tezos-client @cp _build/default/src/compiler_main.exe tezos-protocol-compiler doc-html: - @jbuilder build @doc --dev + @jbuilder build @doc ${DEV} build-test: - @jbuilder build @buildtest --dev + @jbuilder build @buildtest ${DEV} test: - @jbuilder runtest + @jbuilder runtest ${DEV} build-deps: @./scripts/install_build_deps.sh diff --git a/src/client/jbuild b/src/client/jbuild index 076a5435a..c6b16f630 100644 --- a/src/client/jbuild +++ b/src/client/jbuild @@ -3,10 +3,7 @@ (library ((name client_lib) (public_name tezos.client) - (libraries (minutils - utils - cohttp - node_shell + (libraries (node_shell node_db node_updater tezos_protocol_compiler)) diff --git a/src/minutils/jbuild b/src/minutils/jbuild index 08b51baed..c50566fe0 100644 --- a/src/minutils/jbuild +++ b/src/minutils/jbuild @@ -1,11 +1,11 @@ (jbuild_version 1) (library - ((name minutils) - (public_name tezos.minutils) - (libraries (cstruct - lwt - ocplib-json-typed.bson - ocplib-resto.directory)) - (flags (:standard -w -9+27-30-32-40@8 -safe-string)) - (wrapped false))) + ((name minutils) + (public_name tezos.minutils) + (libraries (cstruct + lwt + ocplib-json-typed.bson + ocplib-resto.directory)) + (flags (:standard -w -9+27-30-32-40@8 -safe-string)) + (wrapped false))) diff --git a/src/node/shell/jbuild b/src/node/shell/jbuild index 6e5bdc320..72e107a4a 100644 --- a/src/node/shell/jbuild +++ b/src/node/shell/jbuild @@ -3,7 +3,7 @@ (library ((name node_shell) (public_name tezos.node.shell) - (libraries (utils minutils node_net node_db node_updater ezjsonm ocplib-json-typed.bson)) + (libraries (node_net node_db node_updater)) (flags (:standard -w -9+27-30-32-40@8 -safe-string -open Error_monad diff --git a/src/proto/alpha/jbuild b/src/proto/alpha/jbuild index 5098a9c19..44f3890ec 100644 --- a/src/proto/alpha/jbuild +++ b/src/proto/alpha/jbuild @@ -25,32 +25,32 @@ let () = } end) in ()")))) (library - ((name tezos_protocol_environment_alpha) - (public_name tezos.protocol_environment.alpha) - (library_flags (:standard -linkall -w -9 -safe-string)) - (libraries (node_updater)) - (modules (Environment)))) + ((name tezos_protocol_environment_alpha) + (public_name tezos.protocol_environment.alpha) + (library_flags (:standard -linkall -w -9 -safe-string)) + (libraries (node_updater)) + (modules (Environment)))) (library - ((name tezos_embedded_raw_protocol_alpha) - (public_name tezos.embedded_raw_protocol.alpha) - (libraries (tezos_protocol_environment_alpha)) - (library_flags (:standard -linkall)) - (flags (:standard -nopervasives -nostdlib -safe-string - -w +a-4-6-7-9-29-32-40..42-44-45-48 - -warn-error -a+8 - -open Tezos_protocol_environment_alpha__Environment - -open Error_monad - -open Hash - -open Tezos_data)) - (modules (:standard \ Environment Registerer)))) + ((name tezos_embedded_raw_protocol_alpha) + (public_name tezos.embedded_raw_protocol.alpha) + (libraries (tezos_protocol_environment_alpha)) + (library_flags (:standard -linkall)) + (flags (:standard -nopervasives -nostdlib -safe-string + -w +a-4-6-7-9-29-32-40..42-44-45-48 + -warn-error -a+8 + -open Tezos_protocol_environment_alpha__Environment + -open Error_monad + -open Hash + -open Tezos_data)) + (modules (:standard \ Environment Registerer)))) (library - ((name tezos_embedded_protocol_alpha) - (public_name tezos.embedded_protocol.alpha) - (library_flags (:standard -linkall -w -9-32 -safe-string)) - (libraries (tezos_embedded_raw_protocol_alpha node_shell)) - (modules (Registerer)))) + ((name tezos_embedded_protocol_alpha) + (public_name tezos.embedded_protocol.alpha) + (library_flags (:standard -linkall -w -9-32 -safe-string)) + (libraries (tezos_embedded_raw_protocol_alpha node_shell)) + (modules (Registerer)))) (alias ((name runtest_sandboxing) diff --git a/src/proto/genesis/jbuild b/src/proto/genesis/jbuild index be28681e5..297ea36dd 100644 --- a/src/proto/genesis/jbuild +++ b/src/proto/genesis/jbuild @@ -3,14 +3,14 @@ (rule ((targets (environment.ml)) (action - (write-file ${@} - "include Tezos_protocol_environment.Make(struct let name = \"genesis\" end)()")))) + (write-file ${@} + "include Tezos_protocol_environment.Make(struct let name = \"genesis\" end)()")))) (rule ((targets (registerer.ml)) (action - (write-file ${@} - "module Ignored = + (write-file ${@} + "module Ignored = State.Register_embedded_protocol (Tezos_protocol_environment_genesis.Environment) (Tezos_embedded_raw_protocol_genesis.Main) @@ -24,31 +24,31 @@ } end)")))) (library - ((name tezos_protocol_environment_genesis) - (public_name tezos.protocol_environment.genesis) + ((name tezos_protocol_environment_genesis) + (public_name tezos.protocol_environment.genesis) (libraries (node_updater)) (modules (Environment)))) (library - ((name tezos_embedded_raw_protocol_genesis) - (public_name tezos.embedded_raw_protocol.genesis) - (libraries (tezos_protocol_environment_genesis)) - (library_flags (:standard -linkall)) - (flags (:standard -nopervasives -nostdlib -safe-string - -w +a-4-6-7-9-29-32-40..42-44-45-48 - -warn-error -a+8 - -open Tezos_protocol_environment_genesis__Environment - -open Error_monad - -open Hash - -open Tezos_data)) - (modules (:standard \ Environment Registerer)))) + ((name tezos_embedded_raw_protocol_genesis) + (public_name tezos.embedded_raw_protocol.genesis) + (libraries (tezos_protocol_environment_genesis)) + (library_flags (:standard -linkall)) + (flags (:standard -nopervasives -nostdlib -safe-string + -w +a-4-6-7-9-29-32-40..42-44-45-48 + -warn-error -a+8 + -open Tezos_protocol_environment_genesis__Environment + -open Error_monad + -open Hash + -open Tezos_data)) + (modules (:standard \ Environment Registerer)))) (library - ((name tezos_embedded_protocol_genesis) - (public_name tezos.embedded_protocol.genesis) - (library_flags (:standard -linkall -w -9-32 -safe-string)) - (libraries (tezos_embedded_raw_protocol_genesis node_shell)) - (modules (Registerer)))) + ((name tezos_embedded_protocol_genesis) + (public_name tezos.embedded_protocol.genesis) + (library_flags (:standard -linkall -w -9-32 -safe-string)) + (libraries (tezos_embedded_raw_protocol_genesis node_shell)) + (modules (Registerer)))) (alias ((name runtest_sandboxing)