forked from naver/nbase-arc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
67 lines (61 loc) · 2.58 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Top level makefile
GIT_REFRESH:=$(shell git update-index --refresh)
# Note --match value is glob(7) pattern
VERSION:=$(shell git describe --tags --dirty --always --match=v[0-9]*\.[0-9]*\.[0-9]*)
RELEASE_DIR=release/nbase-arc
default: all
.DEFAULT:
cd smr && $(MAKE) $@
cd redis && $(MAKE) $@
cd gateway && $(MAKE) $@
cd api && $(MAKE) $@
cd confmaster && $(MAKE) $@
cd integration_test && $(MAKE) $@
cd tools && $(MAKE) $@
release: all
mkdir -p $(RELEASE_DIR)/bin
mkdir -p $(RELEASE_DIR)/confmaster
mkdir -p $(RELEASE_DIR)/mgmt/config
mkdir -p $(RELEASE_DIR)/api/c
mkdir -p $(RELEASE_DIR)/api/java
# Redis
cp -rf redis/src/redis-arc $(RELEASE_DIR)/bin/redis-arc-$(VERSION)
cp -rf redis/src/cluster-util $(RELEASE_DIR)/bin/cluster-util-$(VERSION)
# Confmaster
cp -rf confmaster/target/confmaster-1.0.0-SNAPSHOT-jar-with-dependencies.jar $(RELEASE_DIR)/confmaster/confmaster-$(VERSION).jar
cp -rf confmaster/target/cc.properties $(RELEASE_DIR)/confmaster
sed "1,1s/confmaster-1.0.0-SNAPSHOT-jar-with-dependencies.jar/confmaster-$(VERSION).jar/g" confmaster/script/confmaster.sh > $(RELEASE_DIR)/confmaster/confmaster-$(VERSION).sh
chmod +x $(RELEASE_DIR)/confmaster/confmaster-$(VERSION).sh
# Gateway
cp -rf gateway/redis-gateway $(RELEASE_DIR)/bin/redis-gateway-$(VERSION)
# SMR
cp -rf smr/smr/smr-logutil $(RELEASE_DIR)/bin/smr-logutil-$(VERSION)
cp -rf smr/replicator/smr-replicator $(RELEASE_DIR)/bin/smr-replicator-$(VERSION)
# Tools
cp -rf tools/mgmt/*.py $(RELEASE_DIR)/mgmt/
cp -rf tools/mgmt/config/*.py $(RELEASE_DIR)/mgmt/config
cp -rf tools/mgmt/bash.nbase-arc $(RELEASE_DIR)/mgmt/
cp -rf tools/local_proxy/release/local_proxy $(RELEASE_DIR)/bin/local_proxy-$(VERSION)
cp -rf tools/nbase-arc-cli/arc-cli $(RELEASE_DIR)/bin/arc-cli-$(VERSION)
cp -rf tools/nbase-arc-cli/arc-cli-admin $(RELEASE_DIR)/bin/arc-cli-admin-$(VERSION)
# C API
cp -rf api/arcci/release/arcci.h $(RELEASE_DIR)/api/c
cp -rf api/arcci/release/libarcci.* $(RELEASE_DIR)/api/c
# JAVA API
cp -rf api/java/target/nbase-arc-java-client-*-sources.jar $(RELEASE_DIR)/api/java
cp -rf api/java/target/nbase-arc-java-client-*.jar $(RELEASE_DIR)/api/java
.PHONY: release
release32:
cd api/arcci && $(MAKE) 32bit
cd tools/local_proxy && $(MAKE) 32bit
mkdir -p $(RELEASE_DIR)/bin
mkdir -p $(RELEASE_DIR)/api/c32
# C API
cp -rf api/arcci/release32/arcci.h $(RELEASE_DIR)/api/c32
cp -rf api/arcci/release32/libarcci.* $(RELEASE_DIR)/api/c32
# Tools
cp -rf tools/local_proxy/release32/local_proxy $(RELEASE_DIR)/bin/local_proxy32-$(VERSION)
distclean: clean
cd redis && $(MAKE) $@
rm -rf $(RELEASE_DIR)
rm -rf release