ligo/Makefile

100 lines
3.4 KiB
Makefile
Raw Normal View History

DEV ?= --dev
PACKAGES:=$(patsubst %.opam,%,$(notdir $(shell find src vendors -name \*.opam -print)))
active_protocol_versions := $(shell cat active_protocol_versions)
active_protocol_directories := $(shell tr -- - _ < active_protocol_versions)
current_opam_version := $(shell opam --version)
2018-01-18 19:18:55 +04:00
include scripts/version.sh
ifneq (${current_opam_version},${opam_version})
$(error Unexpected opam version (found: ${current_opam_version}, expected: ${opam_version}))
endif
2018-01-18 19:18:55 +04:00
current_ocaml_version := $(shell opam exec -- ocamlc -version)
all:
ifneq (${current_ocaml_version},${ocaml_version})
$(error Unexpected ocaml version (found: ${current_ocaml_version}, expected: ${ocaml_version}))
endif
@jbuilder build ${DEV} \
src/bin_node/main.exe \
src/bin_client/main_client.exe \
src/bin_client/main_admin.exe \
src/bin_signer/main_signer.exe \
src/lib_protocol_compiler/main_native.exe \
$(foreach p, $(active_protocol_directories), src/proto_$(p)/bin_baker/main_baker_$(p).exe) \
$(foreach p, $(active_protocol_directories), src/proto_$(p)/bin_endorser/main_endorser_$(p).exe) \
$(foreach p, $(active_protocol_directories), src/proto_$(p)/bin_accuser/main_accuser_$(p).exe)
@cp _build/default/src/bin_node/main.exe tezos-node
@cp _build/default/src/bin_client/main_client.exe tezos-client
@cp _build/default/src/bin_client/main_admin.exe tezos-admin-client
@cp _build/default/src/bin_signer/main_signer.exe tezos-signer
2018-01-30 19:30:22 +04:00
@cp _build/default/src/lib_protocol_compiler/main_native.exe tezos-protocol-compiler
@for p in $(active_protocol_directories) ; do \
cp _build/default/src/proto_$$p/bin_baker/main_baker_$$p.exe tezos-baker-`echo $$p | tr -- _ -` ; \
cp _build/default/src/proto_$$p/bin_endorser/main_endorser_$$p.exe tezos-endorser-`echo $$p | tr -- _ -` ; \
cp _build/default/src/proto_$$p/bin_accuser/main_accuser_$$p.exe tezos-accuser-`echo $$p | tr -- _ -` ; \
done
2018-02-05 23:08:28 +04:00
all.pkg:
@jbuilder build ${DEV} \
$(patsubst %.opam,%.install, $(shell find src vendors -name \*.opam -print))
2018-02-05 23:08:28 +04:00
$(addsuffix .pkg,${PACKAGES}): %.pkg:
@jbuilder build ${DEV} \
$(patsubst %.opam,%.install, $(shell find src vendors -name $*.opam -print))
2018-02-05 23:08:28 +04:00
$(addsuffix .test,${PACKAGES}): %.test:
@jbuilder build ${DEV} \
@$(patsubst %/$*.opam,%,$(shell find src vendors -name $*.opam))/runtest
doc-html: all
@jbuilder build @doc ${DEV}
@./tezos-client -protocol ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK man -verbosity 3 -format html | sed "s/$HOME/\$HOME/g" > docs/api/tezos-client.html
@./tezos-admin-client man -verbosity 3 -format html | sed "s/$HOME/\$HOME/g" > docs/api/tezos-admin-client.html
@mkdir -p $$(pwd)/docs/_build/api/odoc
@rm -rf $$(pwd)/docs/_build/api/odoc/*
@cp -r $$(pwd)/_build/default/_doc/* $$(pwd)/docs/_build/api/odoc/
@${MAKE} -C docs
build-test:
@jbuilder build @buildtest ${DEV}
test:
@jbuilder runtest ${DEV}
2018-01-29 04:26:41 +04:00
@./scripts/check_opam_test.sh
2018-01-27 14:21:41 +04:00
test-indent:
@jbuilder build @runtest_indent ${DEV}
2018-02-22 14:07:26 +04:00
fix-indent:
@src/lib_stdlib/test-ocp-indent.sh fix
build-deps:
@./scripts/install_build_deps.sh
docker-image:
@./scripts/create_docker_image.sh
2018-01-26 19:28:13 +04:00
install:
@jbuilder build @install
@jbuilder install
uninstall:
@jbuilder uninstall
clean:
@-jbuilder clean
@-rm -f \
tezos-node \
tezos-client \
tezos-signer \
tezos-admin-client \
tezos-protocol-compiler \
$(foreach p, $(active_protocol_versions), tezos-baker-$(p) tezos-endorser-$(p) tezos-accuser-$(p))
@-${MAKE} -C docs clean
.PHONY: all test build-deps docker-image clean