From a405eb2d0e34e905494ac0cb427db6c882d1a060 Mon Sep 17 00:00:00 2001 From: Milo Davis Date: Sun, 4 Mar 2018 16:51:25 -0500 Subject: [PATCH] Fixes for jbuilder.1.0.0-beta18 --- src/lib_protocol_compiler/jbuild | 2 +- .../jbuild_embedded_protocol_template | 5 +++- .../jbuild_protocol_template | 30 +++++++++++-------- src/proto_alpha/lib_baking/jbuild | 2 +- vendors/ocplib-resto/lib_resto/jbuild | 2 +- 5 files changed, 24 insertions(+), 17 deletions(-) diff --git a/src/lib_protocol_compiler/jbuild b/src/lib_protocol_compiler/jbuild index 5cb529c50..03c481fd5 100644 --- a/src/lib_protocol_compiler/jbuild +++ b/src/lib_protocol_compiler/jbuild @@ -26,7 +26,7 @@ (libraries (tezos-base tezos-protocol-environment-sigs tezos-stdlib-unix - compiler-libs + compiler-libs.common lwt.unix ocplib-endian ocplib-ocamlres diff --git a/src/lib_protocol_compiler/jbuild_embedded_protocol_template b/src/lib_protocol_compiler/jbuild_embedded_protocol_template index 5c1b31d02..02a8bd0ad 100644 --- a/src/lib_protocol_compiler/jbuild_embedded_protocol_template +++ b/src/lib_protocol_compiler/jbuild_embedded_protocol_template @@ -22,7 +22,9 @@ let () = Format.kasprintf Jbuild_plugin.V1.send {| ((targets (environment.ml)) (action (write-file ${@@} - "include Tezos_protocol_environment_shell.MakeV1(struct let name = \"%s\" end)()")))) + "include Tezos_protocol_environment_shell.MakeV1(struct let name = \"%s\" end)() + module CamlinternalFormatBasics = struct include CamlinternalFormatBasics end +")))) (rule ((targets (registerer.ml)) @@ -42,6 +44,7 @@ let () = Format.kasprintf Jbuild_plugin.V1.send {| ((name tezos_embedded_raw_protocol_%s) (public_name tezos-embedded-protocol-%s.raw) (libraries (tezos_embedded_protocol_environment_%s)) + (flags (:standard)) (library_flags (:standard -linkall)) (flags (:standard -nopervasives -nostdlib -safe-string -w +a-4-6-7-9-29-32-40..42-44-45-48 diff --git a/src/lib_protocol_compiler/jbuild_protocol_template b/src/lib_protocol_compiler/jbuild_protocol_template index d9456fedd..72571dbf5 100644 --- a/src/lib_protocol_compiler/jbuild_protocol_template +++ b/src/lib_protocol_compiler/jbuild_protocol_template @@ -55,14 +55,14 @@ let () = Format.kasprintf Jbuild_plugin.V1.send {| (rule ((targets (tezos_protocol_%s.cmo - tezos_protocol_%s.cmi tezos_protocol_%s_dummy_byte.ml)) (deps ((glob_files src/*.ml*) src/TEZOS_PROTOCOL)) - (locks (tezos_protocol_%s.cmi)) (action (with-stdout-to ${path-no-dep:tezos_protocol_%s_dummy_byte.ml} - (chdir ${ROOT} - (run ${bin:tezos-protocol-compiler-byte} -static -output-dep ${path-no-dep:tezos_protocol_%s} ${path-no-dep:src})))))) + (progn + (chdir ${ROOT} + (run ${bin:tezos-protocol-compiler-byte} -static -output-dep ${path-no-dep:.tezos_protocol_%s_byte.objs/tezos_protocol_%s} ${path-no-dep:src})) + (run ln -s .tezos_protocol_%s_byte.objs/tezos_protocol_%s.cmo tezos_protocol_%s.cmo)))))) (rule ((targets (tezos_protocol_%s.o @@ -71,10 +71,12 @@ let () = Format.kasprintf Jbuild_plugin.V1.send {| (deps ((glob_files src/*.ml) (glob_files src/*.mli) src/TEZOS_PROTOCOL)) - (locks (tezos_protocol_%s.cmi)) (action (with-stdout-to ${path-no-dep:tezos_protocol_%s_dummy.ml} - (chdir ${ROOT} - (run ${bin:tezos-protocol-compiler} -static -output-dep ${path-no-dep:tezos_protocol_%s} ${path-no-dep:src})))))) + (progn + (chdir ${ROOT} + (run ${bin:tezos-protocol-compiler} -static -output-dep ${path-no-dep:.tezos_protocol_%s.objs/tezos_protocol_%s} ${path-no-dep:src})) + (run ln -s .tezos_protocol_%s.objs/tezos_protocol_%s.o tezos_protocol_%s.o) + (run ln -s .tezos_protocol_%s.objs/tezos_protocol_%s.cmx tezos_protocol_%s.cmx)))))) (library ((name tezos_protocol_%s) @@ -96,7 +98,7 @@ let () = Format.kasprintf Jbuild_plugin.V1.send {| (install ((section lib) - (files ("tezos_protocol_%s.cmx" "tezos_protocol_%s.cmi")) + (files (tezos_protocol_%s.cmx tezos_protocol_%s.cmi)) (package tezos-protocol-%s))) (alias @@ -112,11 +114,13 @@ let () = Format.kasprintf Jbuild_plugin.V1.send {| version version version version version version version version version version version version - version version - path version - version version version - path version - version version version + version version version version + version version version version + version version version version + path + version version version version + path + version version version version version version Format.(pp_print_list (fun ppf -> Format.fprintf ppf "%S")) sources diff --git a/src/proto_alpha/lib_baking/jbuild b/src/proto_alpha/lib_baking/jbuild index 3cc1f957d..979131540 100644 --- a/src/proto_alpha/lib_baking/jbuild +++ b/src/proto_alpha/lib_baking/jbuild @@ -12,7 +12,7 @@ tezos-client-commands tezos-rpc)) (library_flags (:standard -linkall)) - (modules (:standard \ client_baking_commands client_baking_commands_registration main_alpha_baker)) + (modules (:standard \ client_baking_commands client_baking_commands_registration)) (flags (:standard -w -9+27-30-32-40@8 -safe-string -open Tezos_base__TzPervasives diff --git a/vendors/ocplib-resto/lib_resto/jbuild b/vendors/ocplib-resto/lib_resto/jbuild index c3b842fb1..8d0f8b2d2 100644 --- a/vendors/ocplib-resto/lib_resto/jbuild +++ b/vendors/ocplib-resto/lib_resto/jbuild @@ -4,5 +4,5 @@ ((name resto) (public_name ocplib-resto) (flags (-w -30 -safe-string)) - (libraries ("uri")) + (libraries (uri)) (wrapped false)))