Skip to content

Commit daf3105

Browse files
authored
Merge pull request #6 from SyncFree/feature/otp21
Add OTP21 support
2 parents a0d45fd + 393f269 commit daf3105

File tree

10 files changed

+489
-358
lines changed

10 files changed

+489
-358
lines changed

.travis.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
language: erlang
2-
notifications:
3-
webhooks: http://basho-engbot.herokuapp.com/travis?key=be744efd0a393f30d77d2e0076c8456be272e209
4-
email: eng@basho.com
52
otp_release:
6-
- R15B01
7-
- R15B
8-
- R14B04
9-
- R14B03
3+
- 19.3
4+
- 20.3
5+
- 21.0
6+
script:
7+
- rebar3 compile
8+
- rebar3 eunit
9+
notifications:
10+
email: bieniusa@gmail.com
11+
dist: trusty

Makefile

Lines changed: 5 additions & 151 deletions
Original file line numberDiff line numberDiff line change
@@ -1,153 +1,7 @@
1-
.PHONY: deps
1+
all: compile test
22

3-
all: deps compile_all
3+
compile:
4+
rebar3 compile
45

5-
deps: erl_deps
6-
7-
compile_all: erl_compile python_compile python3_compile java_compile c_compile
8-
9-
clean: erl_clean python_clean python3_clean java_clean c_clean
10-
11-
distclean: clean
12-
rm -rf dist
13-
14-
release: python_release python3_release java_release c_release
15-
16-
# Erlang-specific build steps
17-
DIALYZER_APPS = kernel stdlib erts crypto compiler hipe syntax_tools
18-
include tools.mk
19-
20-
erl_deps:
21-
@${REBAR} get-deps
22-
23-
erl_compile:
24-
@${REBAR} compile
25-
26-
erl_clean:
27-
@${REBAR} clean
28-
29-
compile: erl_compile # Hack for tools.mk
30-
31-
# Python 2.x specific build steps
32-
python_compile:
33-
@echo "==> Python (compile)"
34-
@protoc -Isrc --python_out=riak_pb src/*.proto
35-
@./setup.py build_messages build --build-base=python
36-
37-
python_clean:
38-
@echo "==> Python (clean)"
39-
@./setup.py clean --build-base=python clean_messages
40-
@rm -rf *.pyc riak_pb/*_pb2.py riak_pb/*.pyc riak_pb.egg-info python
41-
42-
python_release: python_clean
43-
ifeq ($(RELEASE_GPG_KEYNAME),)
44-
@echo "RELEASE_GPG_KEYNAME must be set to release/deploy"
45-
else
46-
@echo "==> Python (release)"
47-
@protoc -Isrc --python_out=riak_pb src/*.proto
48-
@python2.7 setup.py build_messages build --build-base=python
49-
@python2.7 setup.py build --build-base=python bdist_egg upload -s -i $(RELEASE_GPG_KEYNAME)
50-
@python2.7 setup.py clean --build-base=python clean_messages
51-
@rm -rf *.pyc riak_pb/*_pb2.py riak_pb/*.pyc riak_pb.egg-info python
52-
@protoc -Isrc --python_out=riak_pb src/*.proto
53-
@python2.7 setup.py build_messages build --build-base=python
54-
@python2.7 setup.py build --build-base=python sdist upload -s -i $(RELEASE_GPG_KEYNAME)
55-
@python2.6 setup.py clean --build-base=python clean_messages
56-
@rm -rf riak_pb/*_pb2.pyc *.pyc python_riak_pb.egg-info python
57-
@protoc -Isrc --python_out=riak_pb src/*.proto
58-
@python2.6 setup.py build_messages build --build-base=python
59-
@python2.6 setup.py build --build-base=python bdist_egg upload -s -i $(RELEASE_GPG_KEYNAME)
60-
endif
61-
62-
python_install: python_compile
63-
@echo "==> Python (install)"
64-
@./setup.py build_messages build --build-base=python install
65-
66-
# Python 3.x specific build steps
67-
python3_compile:
68-
@echo "==> Python 3 (compile)"
69-
@protoc -Isrc --python_out=riak_pb src/*.proto
70-
@python3 setup.py build_messages build --build-base=python3
71-
72-
python3_clean:
73-
@echo "==> Python 3 (clean)"
74-
@python3 setup.py clean --build-base=python3 clean_messages
75-
@rm -rf riak_pb/*_pb2.py riak_pb/__pycache__ __pycache__ python3_riak_pb.egg-info python3
76-
77-
python3_release: python3_clean
78-
ifeq ($(RELEASE_GPG_KEYNAME),)
79-
@echo "RELEASE_GPG_KEYNAME must be set to release/deploy"
80-
else
81-
@echo "==> Python 3 (release)"
82-
@protoc -Isrc --python_out=riak_pb src/*.proto
83-
@python3.4 setup.py build_messages build --build-base=python3
84-
@python3.4 setup.py build --build-base=python3 bdist_egg upload -s -i $(RELEASE_GPG_KEYNAME)
85-
@python3.4 setup.py clean --build-base=python3 clean_messages
86-
@rm -rf riak_pb/*_pb2.py riak_pb/__pycache__ __pycache__ python3_riak_pb.egg-info python3
87-
@protoc -Isrc --python_out=riak_pb src/*.proto
88-
@python3.4 setup.py build_messages build --build-base=python3
89-
@python3.4 setup.py build --build-base=python3 sdist upload -s -i $(RELEASE_GPG_KEYNAME)
90-
@python3.4 setup.py clean --build-base=python3 clean_messages
91-
@rm -rf riak_pb/*_pb2.py riak_pb/__pycache__ __pycache__ python3_riak_pb.egg-info python3
92-
@protoc -Isrc --python_out=riak_pb src/*.proto
93-
@python3.3 setup.py build_messages build --build-base=python3
94-
@python3.3 setup.py build --build-base=python3 bdist_egg upload -s -i $(RELEASE_GPG_KEYNAME)
95-
endif
96-
97-
python3_install: python3_compile
98-
@echo "==> Python 3 (install)"
99-
@python3 setup.py build_messages build --build-base=python3 install
100-
101-
# Java specific build steps
102-
java_compile:
103-
@echo "==> Java (compile)"
104-
@mvn install
105-
106-
java_clean:
107-
@echo "==> Java (clean)"
108-
@mvn clean
109-
110-
java_release:
111-
@echo "==> Java"
112-
ifeq ($(RELEASE_GPG_KEYNAME),)
113-
@echo "RELEASE_GPG_KEYNAME must be set to release/deploy"
114-
else
115-
@mvn clean
116-
@mvn deploy
117-
endif
118-
119-
# C specific build steps
120-
PROTOC = protoc-c
121-
PROTOS := $(wildcard src/*.proto)
122-
C_DIR = c
123-
C_FILES := $(patsubst src/%.proto,$(C_DIR)/%.pb-c.c,$(PROTOS))
124-
H_FILES := $(patsubst src/%.proto,$(C_DIR)/%.pb-c.h,$(PROTOS))
125-
C_PREFIX := /usr/local/riak_pb_c
126-
127-
c_compile: c_announce c_protoc_check $(C_DIR) $(C_FILES) $(H_FILES)
128-
129-
c_announce:
130-
@echo "==> C (compile)"
131-
@true
132-
133-
c_protoc_check: PROTOC-exists
134-
PROTOC-exists: ; @which $(PROTOC) > /dev/null
135-
136-
$(C_DIR):
137-
@mkdir -p $(C_DIR)
138-
139-
$(C_DIR)/%.pb-c.c $(C_DIR)/%.pb-c.h: src/%.proto
140-
@echo "Generating $@ from $<"
141-
@$(PROTOC) -Isrc $< --c_out=$(C_DIR)
142-
143-
c_clean:
144-
@echo "==> C (clean)"
145-
@rm -rf $(C_DIR)
146-
147-
c_release: c_compile
148-
@echo "==> C (release)"
149-
@echo "Installing in $(C_PREFIX)"
150-
@mkdir -p $(C_PREFIX)
151-
@mkdir -p $(C_PREFIX)/include
152-
@cp -p $(C_DIR)/*.c $(C_PREFIX)
153-
@cp -p $(C_DIR)/*.h $(C_PREFIX)/include
6+
test:
7+
rebar3 eunit

0 commit comments

Comments
 (0)