From 78d838059fe9bcb6efd575cd3c1c3923bbae0d7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Henry?= Date: Mon, 27 Nov 2017 06:13:12 +0100 Subject: [PATCH] Jbuilder: move `protocol-compiler` in its own OPAM package --- Makefile | 4 +-- .../embedded_cmis.mli | 0 .../compiler => lib_protocol_compiler}/jbuild | 14 ++++++++-- .../main.ml | 0 .../native.ml | 0 .../native.mli | 0 .../packer.ml | 0 .../packer.mli | 0 .../registerer.ml | 0 .../registerer.mli | 0 .../tezos-protocol-compiler.opam | 26 +++++++++++++++++++ src/client/jbuild | 2 +- src/jbuild | 10 ------- src/node/updater/jbuild | 2 +- 14 files changed, 42 insertions(+), 16 deletions(-) rename {src/compiler => lib_protocol_compiler}/embedded_cmis.mli (100%) rename {src/compiler => lib_protocol_compiler}/jbuild (73%) rename src/compiler_main.ml => lib_protocol_compiler/main.ml (100%) rename {src/compiler => lib_protocol_compiler}/native.ml (100%) rename {src/compiler => lib_protocol_compiler}/native.mli (100%) rename {src/compiler => lib_protocol_compiler}/packer.ml (100%) rename {src/compiler => lib_protocol_compiler}/packer.mli (100%) rename {src/compiler => lib_protocol_compiler}/registerer.ml (100%) rename {src/compiler => lib_protocol_compiler}/registerer.mli (100%) create mode 100644 lib_protocol_compiler/tezos-protocol-compiler.opam diff --git a/Makefile b/Makefile index 11a293050..f6e52137a 100644 --- a/Makefile +++ b/Makefile @@ -5,10 +5,10 @@ all: @jbuilder build ${DEV} \ src/node_main.exe \ src/client_main.exe \ - src/compiler_main.exe + lib_protocol_compiler/main.exe @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 + @cp _build/default/lib_protocol_compiler/main.exe tezos-protocol-compiler doc-html: @jbuilder build @doc ${DEV} diff --git a/src/compiler/embedded_cmis.mli b/lib_protocol_compiler/embedded_cmis.mli similarity index 100% rename from src/compiler/embedded_cmis.mli rename to lib_protocol_compiler/embedded_cmis.mli diff --git a/src/compiler/jbuild b/lib_protocol_compiler/jbuild similarity index 73% rename from src/compiler/jbuild rename to lib_protocol_compiler/jbuild index e482f111c..5dab49c54 100644 --- a/src/compiler/jbuild +++ b/lib_protocol_compiler/jbuild @@ -11,7 +11,7 @@ (library ((name tezos_protocol_compiler) - (public_name tezos.protocol_compiler) + (public_name tezos-protocol-compiler) (libraries (tezos-base tezos-protocol-environment-sigs compiler-libs @@ -23,7 +23,17 @@ (flags (:standard -w -9+27-30-32-40@8 -safe-string -opaque - -open Tezos_base__TzPervasives)))) + -open Tezos_base__TzPervasives)) + (modules (:standard \ Main)))) + +(executable + ((name main) + (public_name tezos-protocol-compiler) + (package tezos-protocol-compiler) + (modes (native)) + (libraries (tezos-protocol-compiler)) + (flags (:standard -linkall)) + (modules (Main)))) (alias ((name runtest_indent) diff --git a/src/compiler_main.ml b/lib_protocol_compiler/main.ml similarity index 100% rename from src/compiler_main.ml rename to lib_protocol_compiler/main.ml diff --git a/src/compiler/native.ml b/lib_protocol_compiler/native.ml similarity index 100% rename from src/compiler/native.ml rename to lib_protocol_compiler/native.ml diff --git a/src/compiler/native.mli b/lib_protocol_compiler/native.mli similarity index 100% rename from src/compiler/native.mli rename to lib_protocol_compiler/native.mli diff --git a/src/compiler/packer.ml b/lib_protocol_compiler/packer.ml similarity index 100% rename from src/compiler/packer.ml rename to lib_protocol_compiler/packer.ml diff --git a/src/compiler/packer.mli b/lib_protocol_compiler/packer.mli similarity index 100% rename from src/compiler/packer.mli rename to lib_protocol_compiler/packer.mli diff --git a/src/compiler/registerer.ml b/lib_protocol_compiler/registerer.ml similarity index 100% rename from src/compiler/registerer.ml rename to lib_protocol_compiler/registerer.ml diff --git a/src/compiler/registerer.mli b/lib_protocol_compiler/registerer.mli similarity index 100% rename from src/compiler/registerer.mli rename to lib_protocol_compiler/registerer.mli diff --git a/lib_protocol_compiler/tezos-protocol-compiler.opam b/lib_protocol_compiler/tezos-protocol-compiler.opam new file mode 100644 index 000000000..9954d902c --- /dev/null +++ b/lib_protocol_compiler/tezos-protocol-compiler.opam @@ -0,0 +1,26 @@ +opam-version: "1.2" +version: "dev" +maintainer: "contact@tezos.com" +authors: [ "Tezos devteam" ] +homepage: "https://www.tezos.com/" +bug-reports: "https://gitlab.com/tezos/tezos/issues" +dev-repo: "https://gitlab.com/tezos/tezos.git" +license: "unreleased" +depends: [ + "ocamlfind" { build } + "jbuilder" { build & >= "1.0+beta15" } + "tezos-base" + "tezos-protocol-environment-sigs" + "compiler-libs" + "compiler-libs.optcomp" + "lwt.unix" + "ocplib-endian" + "ocplib-ocamlres" + "unix" +] +build: [ + [ "jbuilder" "build" "-p" name "-j" jobs ] +] +build-test: [ + [ "jbuilder" "runtest" "-p" name "-j" jobs ] +] diff --git a/src/client/jbuild b/src/client/jbuild index b7848d9b7..131e308d6 100644 --- a/src/client/jbuild +++ b/src/client/jbuild @@ -7,7 +7,7 @@ node_shell node_db node_updater - tezos_protocol_compiler)) + tezos-protocol-compiler)) (flags (:standard -w -9+27-30-32-40@8 -safe-string -open Tezos_base__TzPervasives)) diff --git a/src/jbuild b/src/jbuild index 032618754..9612824c5 100644 --- a/src/jbuild +++ b/src/jbuild @@ -1,15 +1,5 @@ (jbuild_version 1) -(executable - ((name compiler_main) - (public_name tezos-protocol-compiler) - (package tezos) - (libraries (tezos_protocol_compiler)) - (flags (:standard -w -9+27-30-32-40@8 - -safe-string - -linkall)) - (modules (Compiler_main)))) - (executable ((name node_main) (public_name tezos-node) diff --git a/src/node/updater/jbuild b/src/node/updater/jbuild index 14ad22efd..b516645cf 100644 --- a/src/node/updater/jbuild +++ b/src/node/updater/jbuild @@ -5,7 +5,7 @@ (public_name tezos.node.updater) (libraries (tezos-base tezos-micheline - tezos_protocol_compiler + tezos-protocol-compiler node_net node_db dynlink))