370112f9b8
This patch is co-authored with: cagdas.bozman@ocamlpro.com With this patch the economic protocol is now compiled as as "functor-pack", parameterized over the environment. This will ease the protocol reusability outside of the tezos source tree (e.g. for a michelson Web IDE) and will allow proper unit testing of the economic protocol. This functorization allows to break the dependency of the 'tezos-protocol-compiler' on various '.mli' of the node, and hence we don't need anymore the unusual compilation schema: a.mli -> b.mli -> b.ml -> a.ml where 'A' is linked after 'B' but 'a.mli' should still be compiled before 'b.mli'. This will simplify a switch to 'ocp-build' or 'jbuiler'.
75 lines
1.4 KiB
Makefile
75 lines
1.4 KiB
Makefile
|
|
SRCDIR=../../src
|
|
|
|
TESTS := \
|
|
store \
|
|
state \
|
|
context \
|
|
|
|
include ../Makefile.shared
|
|
|
|
SOURCE_DIRECTORIES := ${NODE_SOURCE_DIRECTORIES} ../lib
|
|
|
|
LIB := ${PACKERLIB} ${MINUTILSLIB} ${UTILSLIB} ${COMPILERLIB} ${NODELIB} ${EMBEDDED_NODE_PROTOCOLS} ${TESTLIB}
|
|
|
|
PACKAGES := \
|
|
${NODE_PACKAGES} \
|
|
kaputt \
|
|
|
|
OPENED_MODULES := ${NODE_OPENED_MODULES}
|
|
|
|
############################################################################
|
|
## Store
|
|
|
|
.PHONY:run-test-store
|
|
run-test-store:
|
|
@echo
|
|
./test-store
|
|
|
|
TEST_STORE_IMPLS := \
|
|
test_store.ml
|
|
|
|
test-store: ${LIB} ${TEST_STORE_IMPLS:.ml=.cmx}
|
|
@echo LINK $(notdir $@)
|
|
@${OCAMLOPT} -linkall -linkpkg ${OCAMLFLAGS} -o $@ $^
|
|
|
|
clean::
|
|
rm -f test-store
|
|
|
|
############################################################################
|
|
## State
|
|
|
|
.PHONY:run-test-state
|
|
run-test-state:
|
|
@echo
|
|
./test-state
|
|
|
|
TEST_STATE_IMPLS := \
|
|
test_state.ml
|
|
|
|
test-state: ${LIB} ${TEST_STATE_IMPLS:.ml=.cmx}
|
|
@echo LINK $(notdir $@)
|
|
@${OCAMLOPT} -linkall -linkpkg ${OCAMLFLAGS} -o $@ $^
|
|
|
|
clean::
|
|
rm -f test-state
|
|
|
|
############################################################################
|
|
## Context
|
|
|
|
.PHONY:run-test-context
|
|
run-test-context:
|
|
@echo
|
|
./test-context
|
|
|
|
TEST_CONTEXT_IMPLS := \
|
|
test_context.ml
|
|
|
|
test-context: ${LIB} ${TEST_CONTEXT_IMPLS:.ml=.cmx}
|
|
@echo LINK $(notdir $@)
|
|
@${OCAMLOPT} -linkall -linkpkg ${OCAMLFLAGS} -o $@ $^
|
|
|
|
clean::
|
|
rm -f test-context
|
|
|