Makefile 783 Bytes
Newer Older
1
TMPDIR=/tmp/
2

3 4
PYTHON ?= python3

5
all: Makefile
6
	$(PYTHON) setup.py build_ext --inplace
7

8 9
clean:
	find ./ -name \*.pyc -delete
mathieui's avatar
mathieui committed
10
	find ./ -name \*.pyo -delete
11
	find ./ -name \*~ -delete
mathieui's avatar
mathieui committed
12
	find ./ -type d -name __pycache__ -delete
13
	find ./ -name "#*#" -delete
14
	rm -rf doc/build/
mathieui's avatar
mathieui committed
15 16
	rm -rf poezio.egg-info
	rm -rf dist
17
	rm -rf build
18
	rm -f poezio/*.so
19

mathieui's avatar
mathieui committed
20
install: all
21
	$(PYTHON) setup.py install --root=$(DESTDIR) --optimize=1
22

23
doc:
mathieui's avatar
mathieui committed
24
	make -C doc/ html
mathieui's avatar
mathieui committed
25 26

test:
27
	py.test test/
mathieui's avatar
mathieui committed
28

29 30 31 32 33 34 35 36 37 38
release:
	rm -fr $(TMPDIR)/poezio-$(version)
	git clone $(PWD) $(TMPDIR)/poezio-$(version)
	cd $(TMPDIR)/poezio-$(version) && \
	 git checkout v$(version) && \
	 make doc && \
	 cd .. && \
	 tar cJf poezio-$(version).tar.xz poezio-$(version) && \
	 tar czf poezio-$(version).tar.gz poezio-$(version)

mathieui's avatar
mathieui committed
39
.PHONY : doc test