forked from confluentinc/confluent-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCommon.mk
44 lines (34 loc) · 838 Bytes
/
Common.mk
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
PACKAGE_NAME ?= confluent-cli
VERSION ?= 5.0.0-SNAPSHOT
PLATFORM = $(shell uname -s)
INSTALL_FLAGS = -D
ifeq ($(PLATFORM),Linux)
INSTALL_FLAGS = -D
endif
ifeq ($(PLATFORM),Darwin)
INSTALL_FLAGS =
endif
.PHONY:
all: build
install: build
ifndef CONFLUENT_HOME
$(error Cannot install. CONFLUENT_HOME is not set)
endif
install $(INSTALL_FLAGS) -m 755 bin/confluent $(CONFLUENT_HOME)/bin/confluent
build: oss
prep:
mkdir -p bin/
oss: prep
cp -f src/oss/confluent.sh bin/confluent
chmod 755 bin/confluent
platform: prep
cp -f src/platform/confluent.sh bin/confluent
chmod 755 bin/confluent
clean:
rm -rf bin/
distclean: clean
archive:
git archive --prefix=$(PACKAGE_NAME)-$(VERSION)/ \
-o $(PACKAGE_NAME)-$(VERSION).tar.gz HEAD
git archive --prefix=$(PACKAGE_NAME)-$(VERSION)/ \
-o $(PACKAGE_NAME)-$(VERSION).zip HEAD