forked from rabbitmq/rabbitmq-java-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
77 lines (60 loc) · 2.24 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
68
69
70
71
72
73
74
75
76
77
VERSION=0.0.0
PACKAGE_NAME=rabbitmq-java-client
JAVADOC_ARCHIVE=$(PACKAGE_NAME)-javadoc-$(VERSION)
SRC_ARCHIVE=$(PACKAGE_NAME)-$(VERSION)
SIGNING_KEY=056E8E56
GNUPG_PATH=~
WEB_URL=http://www.rabbitmq.com/
NEXUS_STAGE_URL=http://oss.sonatype.org/service/local/staging/deploy/maven2
MAVEN_NEXUS_VERSION=1.7
AMQP_CODEGEN_DIR=$(shell fgrep sibling.codegen.dir src/test/resources/build.properties | sed -e 's:sibling\.codegen\.dir=::')
[email protected]:/home/maven/rabbitmq-java-client/
ANT ?= ant
ANT_FLAGS ?=
all:
$(ANT) $(ANT_FLAGS) build
clean:
$(ANT) $(ANT_FLAGS) clean
distclean: clean
$(MAKE) -C $(AMQP_CODEGEN_DIR) clean
dist: distclean srcdist dist_all maven-bundle
dist_all: dist1.5 javadoc-archive
jar:
$(ANT) $(ANT_FLAGS) jar
maven-bundle:
$(ANT) $(ANT_FLAGS) -Dimpl.version=$(VERSION) maven-bundle
dist1.5:
$(ANT) $(ANT_FLAGS) -Ddist.out=build/$(PACKAGE_NAME)-bin-$(VERSION) -Dimpl.version=$(VERSION) dist
$(MAKE) post-dist TARBALL_NAME=$(PACKAGE_NAME)-bin-$(VERSION)
javadoc-archive:
$(ANT) $(ANT_FLAGS) javadoc
cp -Rp build/doc/api build/$(JAVADOC_ARCHIVE)
(cd build; tar -zcf $(JAVADOC_ARCHIVE).tar.gz $(JAVADOC_ARCHIVE))
(cd build; zip -q -r $(JAVADOC_ARCHIVE).zip $(JAVADOC_ARCHIVE))
(cd build; rm -rf $(JAVADOC_ARCHIVE))
post-dist:
@[ -n "$(TARBALL_NAME)" ] || (echo "Please set TARBALL_NAME."; false)
chmod a+x build/$(TARBALL_NAME)/*.sh
cp LICENSE* build/$(TARBALL_NAME)
(cd build; tar -zcf $(TARBALL_NAME).tar.gz $(TARBALL_NAME))
(cd build; zip -q -r $(TARBALL_NAME).zip $(TARBALL_NAME))
(cd build; rm -rf $(TARBALL_NAME))
srcdist: distclean
mkdir -p build/$(SRC_ARCHIVE)
cp -Rp `ls | grep -v '^\(build\|README.in\)$$'` build/$(SRC_ARCHIVE)
mkdir -p build/$(SRC_ARCHIVE)/codegen
cp -r $(AMQP_CODEGEN_DIR)/* build/$(SRC_ARCHIVE)/codegen/.
if [ -f README.in ]; then \
cp README.in build/$(SRC_ARCHIVE)/README; \
if [ -f "$(BUILD_DOC)" ]; then \
cat "$(BUILD_DOC)" \
>> build/$(SRC_ARCHIVE)/README; \
else \
elinks -dump -no-references -no-numbering \
$(WEB_URL)build-java-client.html \
>> build/$(SRC_ARCHIVE)/README; \
fi; \
fi
(cd build; tar -zcf $(SRC_ARCHIVE).tar.gz $(SRC_ARCHIVE))
(cd build; zip -q -r $(SRC_ARCHIVE).zip $(SRC_ARCHIVE))
(cd build; rm -rf $(SRC_ARCHIVE))