-
Notifications
You must be signed in to change notification settings - Fork 91
/
Copy pathMakefile
109 lines (73 loc) · 2.18 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# Building
RABBIT_DIR=rabbitmq-c
RABBIT_DIST=librabbitmq
# Distribuition tools
PYTHON=python
all: build manylinux2014
add-submodules:
-git submodule add -b v0.8.0 https://github.com/alanxz/rabbitmq-c.git
submodules:
git submodule init
git submodule update
rabbitmq-c: submodules
(cd $(RABBIT_DIR); test -f configure || autoreconf -i)
(cd $(RABBIT_DIR); test -f Makefile || automake --add-missing)
rabbitmq-clean:
-(rm -rf $(RABBIT_DIR)/build || true)
-(cd $(RABBIT_DIR) && make clean || echo "warning... rabbitmq-clean failed")
rabbitmq-distclean:
-(cd $(RABBIT_DIR) && make distclean || echo "warning... rabbitmq-distclean failed")
clean-build:
-rm -rf build
build: clean-build dist
$(PYTHON) setup.py build
install: build
$(PYTHON) setup.py install
develop: build
$(PYTHON) setup.py develop
pyclean:
-$(PYTHON) setup.py clean
-rm -rf build
-rm -f _librabbitmq.so
clean: pyclean rabbitmq-clean
distclean: pyclean rabbitmq-distclean removepyc
-rm -rf dist
-rm -rf clib
-rm -f erl_crash.dump
$(RABBIT_TARGET):
(test -f config.h || cd $(RABBIT_DIR); ./configure --disable-tools --disable-docs)
(cd $(RABBIT_DIR); make)
dist: rabbitmq-c $(RABBIT_TARGET)
manylinux2014: manylinux2014_x86_64 manylinux2014_aarch64
manylinux2014_x86_64: dist
docker run --rm -v `pwd`:/workspace:z quay.io/pypa/manylinux2014_x86_64 /workspace/build-manylinux1-wheels.sh
qemu-user-static:
docker run --rm --privileged hypriot/qemu-register
manylinux2014_aarch64: qemu-user-static
docker run --rm -v `pwd`:/workspace:z quay.io/pypa/manylinux2014_aarch64 /workspace/build-manylinux1-wheels.sh
rebuild:
$(PYTHON) setup.py build
$(PYTHON) setup.py install
# Distro tools
flakecheck:
flake8 librabbitmq setup.py
flakediag:
-$(MAKE) flakecheck
flakepluscheck:
flakeplus librabbitmq
flakeplusdiag:
-$(MAKE) flakepluscheck
flakes: flakediag flakeplusdiag
test: build
$(PYTHON) setup.py test
cov: build
coverage run --source=librabbitmq setup.py test
coverage report
removepyc:
-find . -type f -a \( -name "*.pyc" -o -name "*$$py.class" \) | xargs rm
-find . -type d -name "__pycache__" | xargs rm -r
gitclean:
git clean -xdn
gitcleanforce:
git clean -xdf
distcheck: flakecheck test gitclean