forked from basho/riak_pb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop-3.0-lower' into develop-3.0
* develop-3.0-lower: protobuffs should not be in riak_pb.app.src Fix eqc tests and rebar3 plugin Adapt code for gpb vs erlang_protobuff differences Switch to rebar3 and prepare for OTP20 update rebar/relnotes for 2.2.5 release Add `node_confirms` option to write messages (basho#228) Move deps back to branches for develop-2.2 add gsets support
- Loading branch information
Showing
17 changed files
with
212 additions
and
404 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,76 +1,24 @@ | ||
.PHONY: deps | ||
.PHONY: compile rel cover test dialyzer | ||
REBAR=./rebar3 | ||
|
||
all: deps compile_all | ||
compile: | ||
$(REBAR) compile | ||
|
||
deps: erl_deps | ||
clean: | ||
rm -rf include/*_pb.hrl | ||
rm -rf src/*_pb.erl | ||
$(REBAR) clean | ||
|
||
compile_all: erl_compile | ||
cover: test | ||
$(REBAR) cover | ||
|
||
clean: erl_clean | ||
test: compile | ||
$(REBAR) eunit | ||
|
||
distclean: clean | ||
rm -rf dist | ||
dialyzer: | ||
$(REBAR) dialyzer | ||
|
||
# Erlang-specific build steps | ||
DIALYZER_APPS = kernel stdlib erts crypto compiler hipe syntax_tools | ||
include tools.mk | ||
xref: | ||
$(REBAR) xref | ||
|
||
erl_deps: | ||
@${REBAR} get-deps | ||
|
||
erl_compile: | ||
@${REBAR} compile | ||
|
||
erl_clean: | ||
@${REBAR} clean | ||
|
||
compile: erl_compile # Hack for tools.mk | ||
|
||
release: compile | ||
ifeq ($(VERSION),) | ||
$(error VERSION must be set to build a release and deploy this package) | ||
endif | ||
ifeq ($(RELEASE_GPG_KEYNAME),) | ||
$(error RELEASE_GPG_KEYNAME must be set to build a release and deploy this package) | ||
endif | ||
@echo "==> Tagging version $(VERSION)" | ||
@bash ./build/publish $(VERSION) validate | ||
@git tag --sign -a "$(VERSION)" -m "riak_pb $(VERSION)" --local-user "$(RELEASE_GPG_KEYNAME)" | ||
@git push --tags | ||
@bash ./build/publish $(VERSION) | ||
|
||
# C specific build steps | ||
PROTOC = protoc-c | ||
PROTOS := $(wildcard src/*.proto) | ||
C_DIR = c | ||
C_FILES := $(patsubst src/%.proto,$(C_DIR)/%.pb-c.c,$(PROTOS)) | ||
H_FILES := $(patsubst src/%.proto,$(C_DIR)/%.pb-c.h,$(PROTOS)) | ||
C_PREFIX := /usr/local/riak_pb_c | ||
|
||
c_compile: c_announce c_protoc_check $(C_DIR) $(C_FILES) $(H_FILES) | ||
|
||
c_announce: | ||
@echo "==> C (compile)" | ||
@true | ||
|
||
c_protoc_check: PROTOC-exists | ||
PROTOC-exists: ; @which $(PROTOC) > /dev/null | ||
|
||
$(C_DIR): | ||
@mkdir -p $(C_DIR) | ||
|
||
$(C_DIR)/%.pb-c.c $(C_DIR)/%.pb-c.h: src/%.proto | ||
@echo "Generating $@ from $<" | ||
@$(PROTOC) -Isrc $< --c_out=$(C_DIR) | ||
|
||
c_clean: | ||
@echo "==> C (clean)" | ||
@rm -rf $(C_DIR) | ||
|
||
c_release: c_compile | ||
@echo "==> C (release)" | ||
@echo "Installing in $(C_PREFIX)" | ||
@mkdir -p $(C_PREFIX) | ||
@mkdir -p $(C_PREFIX)/include | ||
@cp -p $(C_DIR)/*.c $(C_PREFIX) | ||
@cp -p $(C_DIR)/*.h $(C_PREFIX)/include | ||
check: test dialyzer xref |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[]. |
Oops, something went wrong.