-
Notifications
You must be signed in to change notification settings - Fork 34
/
Makefile
48 lines (35 loc) · 1.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
CODEGEN_DIR=vendor/rabbitmq-codegen
AMQP_JSON_SPEC=$(CODEGEN_DIR)/amqp-rabbitmq-0.9.1.json
PYTHON=python
all: vendor/rabbitmq-codegen puka/spec.py puka/spec_exceptions.py tests
vendor/rabbitmq-codegen:
git submodule init
git submodule update
$(AMQP_JSON_SPEC):
@echo "You need '$(CODEGEN_DIR)' package."
@echo "Try one of the following:"
@echo " git submodule init && git submodule update"
@exit 1
puka/spec.py: codegen.py codegen_helpers.py \
$(CODEGEN_DIR)/amqp_codegen.py \
$(AMQP_JSON_SPEC) amqp-accepted-by-update.json
$(PYTHON) codegen.py spec $(AMQP_JSON_SPEC) puka/spec.py
puka/spec_exceptions.py: codegen.py codegen_helpers.py \
$(CODEGEN_DIR)/amqp_codegen.py \
$(AMQP_JSON_SPEC) amqp-accepted-by-update.json
$(PYTHON) codegen.py spec_exceptions $(AMQP_JSON_SPEC) puka/spec_exceptions.py
clean:
find . -name \*pyc|xargs --no-run-if-empty rm
rm -f tests/.coverage
rm -rf venv
distclean: clean
rm -f puka/spec.py puka/spec_exceptions.py
.PHONY: tests prerequisites
test: tests
tests: puka/spec.py
cd tests && AMQP_URL=amqp:/// PYTHONPATH=.. $(PYTHON) tests.py ../puka puka
venv:
virtualenv --no-site-packages venv
./venv/bin/easy_install coverage
./venv/bin/easy_install sphinx
./venv/bin/sphinx-build -b html . /tmp/html