forked from basho/riak_pb
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from SyncFree/feature/otp21
Add OTP21 support
- Loading branch information
Showing
10 changed files
with
489 additions
and
358 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
language: erlang | ||
notifications: | ||
webhooks: http://basho-engbot.herokuapp.com/travis?key=be744efd0a393f30d77d2e0076c8456be272e209 | ||
email: [email protected] | ||
otp_release: | ||
- R15B01 | ||
- R15B | ||
- R14B04 | ||
- R14B03 | ||
- 19.3 | ||
- 20.3 | ||
- 21.0 | ||
script: | ||
- rebar3 compile | ||
- rebar3 eunit | ||
notifications: | ||
email: [email protected] | ||
dist: trusty |
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,153 +1,7 @@ | ||
.PHONY: deps | ||
all: compile test | ||
|
||
all: deps compile_all | ||
compile: | ||
rebar3 compile | ||
|
||
deps: erl_deps | ||
|
||
compile_all: erl_compile python_compile python3_compile java_compile c_compile | ||
|
||
clean: erl_clean python_clean python3_clean java_clean c_clean | ||
|
||
distclean: clean | ||
rm -rf dist | ||
|
||
release: python_release python3_release java_release c_release | ||
|
||
# Erlang-specific build steps | ||
DIALYZER_APPS = kernel stdlib erts crypto compiler hipe syntax_tools | ||
include tools.mk | ||
|
||
erl_deps: | ||
@${REBAR} get-deps | ||
|
||
erl_compile: | ||
@${REBAR} compile | ||
|
||
erl_clean: | ||
@${REBAR} clean | ||
|
||
compile: erl_compile # Hack for tools.mk | ||
|
||
# Python 2.x specific build steps | ||
python_compile: | ||
@echo "==> Python (compile)" | ||
@protoc -Isrc --python_out=riak_pb src/*.proto | ||
@./setup.py build_messages build --build-base=python | ||
|
||
python_clean: | ||
@echo "==> Python (clean)" | ||
@./setup.py clean --build-base=python clean_messages | ||
@rm -rf *.pyc riak_pb/*_pb2.py riak_pb/*.pyc riak_pb.egg-info python | ||
|
||
python_release: python_clean | ||
ifeq ($(RELEASE_GPG_KEYNAME),) | ||
@echo "RELEASE_GPG_KEYNAME must be set to release/deploy" | ||
else | ||
@echo "==> Python (release)" | ||
@protoc -Isrc --python_out=riak_pb src/*.proto | ||
@python2.7 setup.py build_messages build --build-base=python | ||
@python2.7 setup.py build --build-base=python bdist_egg upload -s -i $(RELEASE_GPG_KEYNAME) | ||
@python2.7 setup.py clean --build-base=python clean_messages | ||
@rm -rf *.pyc riak_pb/*_pb2.py riak_pb/*.pyc riak_pb.egg-info python | ||
@protoc -Isrc --python_out=riak_pb src/*.proto | ||
@python2.7 setup.py build_messages build --build-base=python | ||
@python2.7 setup.py build --build-base=python sdist upload -s -i $(RELEASE_GPG_KEYNAME) | ||
@python2.6 setup.py clean --build-base=python clean_messages | ||
@rm -rf riak_pb/*_pb2.pyc *.pyc python_riak_pb.egg-info python | ||
@protoc -Isrc --python_out=riak_pb src/*.proto | ||
@python2.6 setup.py build_messages build --build-base=python | ||
@python2.6 setup.py build --build-base=python bdist_egg upload -s -i $(RELEASE_GPG_KEYNAME) | ||
endif | ||
|
||
python_install: python_compile | ||
@echo "==> Python (install)" | ||
@./setup.py build_messages build --build-base=python install | ||
|
||
# Python 3.x specific build steps | ||
python3_compile: | ||
@echo "==> Python 3 (compile)" | ||
@protoc -Isrc --python_out=riak_pb src/*.proto | ||
@python3 setup.py build_messages build --build-base=python3 | ||
|
||
python3_clean: | ||
@echo "==> Python 3 (clean)" | ||
@python3 setup.py clean --build-base=python3 clean_messages | ||
@rm -rf riak_pb/*_pb2.py riak_pb/__pycache__ __pycache__ python3_riak_pb.egg-info python3 | ||
|
||
python3_release: python3_clean | ||
ifeq ($(RELEASE_GPG_KEYNAME),) | ||
@echo "RELEASE_GPG_KEYNAME must be set to release/deploy" | ||
else | ||
@echo "==> Python 3 (release)" | ||
@protoc -Isrc --python_out=riak_pb src/*.proto | ||
@python3.4 setup.py build_messages build --build-base=python3 | ||
@python3.4 setup.py build --build-base=python3 bdist_egg upload -s -i $(RELEASE_GPG_KEYNAME) | ||
@python3.4 setup.py clean --build-base=python3 clean_messages | ||
@rm -rf riak_pb/*_pb2.py riak_pb/__pycache__ __pycache__ python3_riak_pb.egg-info python3 | ||
@protoc -Isrc --python_out=riak_pb src/*.proto | ||
@python3.4 setup.py build_messages build --build-base=python3 | ||
@python3.4 setup.py build --build-base=python3 sdist upload -s -i $(RELEASE_GPG_KEYNAME) | ||
@python3.4 setup.py clean --build-base=python3 clean_messages | ||
@rm -rf riak_pb/*_pb2.py riak_pb/__pycache__ __pycache__ python3_riak_pb.egg-info python3 | ||
@protoc -Isrc --python_out=riak_pb src/*.proto | ||
@python3.3 setup.py build_messages build --build-base=python3 | ||
@python3.3 setup.py build --build-base=python3 bdist_egg upload -s -i $(RELEASE_GPG_KEYNAME) | ||
endif | ||
|
||
python3_install: python3_compile | ||
@echo "==> Python 3 (install)" | ||
@python3 setup.py build_messages build --build-base=python3 install | ||
|
||
# Java specific build steps | ||
java_compile: | ||
@echo "==> Java (compile)" | ||
@mvn install | ||
|
||
java_clean: | ||
@echo "==> Java (clean)" | ||
@mvn clean | ||
|
||
java_release: | ||
@echo "==> Java" | ||
ifeq ($(RELEASE_GPG_KEYNAME),) | ||
@echo "RELEASE_GPG_KEYNAME must be set to release/deploy" | ||
else | ||
@mvn clean | ||
@mvn deploy | ||
endif | ||
|
||
# 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 | ||
test: | ||
rebar3 eunit |
Oops, something went wrong.