Makefile: use active_protocol_versions

This commit is contained in:
Benjamin Canou 2018-07-18 23:15:53 +02:00 committed by Grégoire Henry
parent 572bcf12fc
commit 152134947b

View File

@ -2,6 +2,9 @@
DEV ?= --dev DEV ?= --dev
PACKAGES:=$(patsubst %.opam,%,$(notdir $(shell find src vendors -name \*.opam -print))) 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) current_opam_version := $(shell opam --version)
include scripts/version.sh include scripts/version.sh
@ -21,17 +24,19 @@ endif
src/bin_client/main_admin.exe \ src/bin_client/main_admin.exe \
src/bin_signer/main_signer.exe \ src/bin_signer/main_signer.exe \
src/lib_protocol_compiler/main_native.exe \ src/lib_protocol_compiler/main_native.exe \
src/proto_alpha/bin_baker/main_baker_alpha.exe \ $(foreach p, $(active_protocol_directories), src/proto_$(p)/bin_baker/main_baker_$(p).exe) \
src/proto_alpha/bin_endorser/main_endorser_alpha.exe \ $(foreach p, $(active_protocol_directories), src/proto_$(p)/bin_endorser/main_endorser_$(p).exe) \
src/proto_alpha/bin_accuser/main_accuser_alpha.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_node/main.exe tezos-node
@cp _build/default/src/bin_client/main_client.exe tezos-client @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_client/main_admin.exe tezos-admin-client
@cp _build/default/src/bin_signer/main_signer.exe tezos-signer @cp _build/default/src/bin_signer/main_signer.exe tezos-signer
@cp _build/default/src/lib_protocol_compiler/main_native.exe tezos-protocol-compiler @cp _build/default/src/lib_protocol_compiler/main_native.exe tezos-protocol-compiler
@cp _build/default/src/proto_alpha/bin_baker/main_baker_alpha.exe tezos-alpha-baker @for p in $(active_protocol_directories) ; do \
@cp _build/default/src/proto_alpha/bin_endorser/main_endorser_alpha.exe tezos-alpha-endorser cp _build/default/src/proto_$$p/bin_baker/main_baker_$$p.exe tezos-`echo $$p | tr -- _ -`-baker ; \
@cp _build/default/src/proto_alpha/bin_accuser/main_accuser_alpha.exe tezos-alpha-accuser cp _build/default/src/proto_$$p/bin_endorser/main_endorser_$$p.exe tezos-`echo $$p | tr -- _ -`-endorser ; \
cp _build/default/src/proto_$$p/bin_accuser/main_accuser_$$p.exe tezos-`echo $$p | tr -- _ -`-accuser ; \
done
all.pkg: all.pkg:
@jbuilder build ${DEV} \ @jbuilder build ${DEV} \
@ -85,11 +90,10 @@ clean:
@-rm -f \ @-rm -f \
tezos-node \ tezos-node \
tezos-client \ tezos-client \
tezos-signer \
tezos-admin-client \ tezos-admin-client \
tezos-protocol-compiler \ tezos-protocol-compiler \
tezos-alpha-baker \ $(foreach p, $(active_protocol_versions), tezos-$(p)-baker tezos-$(p)-endorser tezos-$(p)-accuser)
tezos-alpha-endorser \
tezos-alpha-accuser
@-${MAKE} -C docs clean @-${MAKE} -C docs clean
.PHONY: all test build-deps docker-image clean .PHONY: all test build-deps docker-image clean