(jbuild_version 1) ;; Build a functorized version of the protocol with the `tezos-protocol-compiler` ;; This is bit hackish... ;; ;; AFAIK the current version of jbuilder (1.0+beta16) does not allow to compile ;; with a custom `rule` the `(modules)` of a library. ;; ;; A trick is to provide the `.cmx` through the `(library_flags)` and to generate ;; a empty `.ml` to correctly handle the dependencies... (rule ((targets (tezos_protocol_genesis.o tezos_protocol_genesis.cmx tezos_protocol_genesis.cmi tezos_protocol_genesis_dummy.ml)) (deps ((glob_files src/*.ml) (glob_files src/*.mli) src/TEZOS_PROTOCOL)) (action (with-stdout-to ${path-no-dep:tezos_protocol_genesis_dummy.ml} (chdir ${ROOT} (run ${bin:tezos-protocol-compiler} -static ${path-no-dep:tezos_protocol_genesis} ${path-no-dep:src})))))) (library ((name tezos_protocol_genesis) (public_name tezos-protocol-genesis) (library_flags (:standard -linkall lib_embedded_protocol_genesis/tezos_protocol_genesis.cmx)) (wrapped false) (modes (native)) (modules (Tezos_protocol_genesis_dummy)))) (alias ((name runtest_sandbox) (deps (tezos_protocol_genesis.cmx)))) (alias ((name runtest_indent) (deps ((glob_files src/*.ml) (glob_files src/*.mli))) (action (run bash ${libexec:tezos-stdlib:test-ocp-indent.sh} ${<}))))