Packages
kafka_protocol
2.3.4
4.3.4
4.3.3
4.3.2
4.3.1
4.3.0
4.2.9
4.2.8
4.2.7
4.2.6
4.2.5
4.2.4
4.2.3
4.2.2
4.2.1
4.2.0
4.1.10
4.1.9
4.1.8
4.1.7
4.1.6
4.1.5
4.1.4
4.1.3
4.1.2
4.1.1
4.1.0
4.0.3
4.0.2
4.0.1
3.0.1
3.0.0
2.4.1
2.3.6
2.3.5
2.3.4
2.3.3
2.3.2
2.3.1
2.3.0
2.2.9
2.2.8
2.2.7
2.2.6
2.2.5
2.2.4
2.2.3
2.2.2
2.2.1
2.2.0
2.1.2
2.1.1
2.1.0
2.0.1
2.0.0
1.1.3
1.1.2
1.1.1
1.1.0
1.0.0
0.9.2
0.9.1
0.9.0
0.8.0
0.7.8
0.7.7
0.7.6
0.7.5
0.7.4
0.7.3
0.7.2
0.7.1
0.7.0
0.6.0
0.4.0
0.3.2
0.3.1
0.2.3
Kafka protocol library for Erlang/Elixir
Current section
Files
Jump to
Current section
Files
kafka_protocol
Makefile
Makefile
KAFKA_VERSION ?= 1.1
all: compile
rebar ?= $(shell which rebar3)
rebar_cmd = $(rebar) $(profile:%=as %)
GEN_INPUT = include/*.hrl priv/kpro_gen.escript priv/kafka.bnf priv/kpro_scanner.xrl priv/kpro_parser.yrl
GEN_CODE = src/kpro_schema.erl
# results of this target are to be committed in this repo
.PHONY: kafka-bnf
kafka-bnf:
@cd priv/kafka_protocol_bnf && gradle run
@cat priv/kafka.bnf | grep "#.*ApiKey" | awk '{print "{"$$2" "$$3"}."}' | sed -r 's/([A-Z])/_\L\1/g' | sed 's/{_/{/' | sort -hk2 > priv/api-keys.eterm
$(GEN_CODE): $(GEN_INPUT)
@priv/kpro_gen.escript
$(PROJECT).d: $(GEN_CODE)
.PHONY: gen-code
gen-code: $(GEN_CODE)
@$(verbose) :
.PHONY: gen-clean
gen-clean:
@rm -f priv/*.beam priv/*.erl
.PHONY: clean
clean: gen-clean
@$(rebar_cmd) clean
.PHONY: xref
xref:
@$(rebar_cmd) xref
.PHONY: eunit
eunit:
@$(rebar_cmd) eunit -v --cover_export_name $(KAFKA_VERSION)
.PHONY: compile
compile:
@$(rebar_cmd) compile
.PHONY: distclean
distclean: clean
@rm -rf _build deps
@rm -f rebar.lock
.PHONY: edoc
edoc: profile=edown
edoc:
@$(rebar_cmd) edoc
.PHONY: dialyze
dialyze: compile
@$(rebar_cmd) dialyzer
.PHONY: hex-publish
hex-publish: distclean
$(verbose) rebar3 hex publish
$(verbose) rebar3 hex docs
.PHONY: testbed
testbed:
@$(verbose) ./scripts/setup-testbed.sh $(KAFKA_VERSION)
.PHONY: cover
cover:
@rebar3 cover -v