Makefile 1.16 KB
Newer Older
1
prefix=/usr/local/
2
3
4
LIBDIR=$(prefix)/lib
BINDIR=$(prefix)/bin
DATADIR=$(prefix)/share
mathieui's avatar
mathieui committed
5
DOCDIR=$(DATADIR)/doc
6
7
LOCALEDIR=$(DATADIR)/locale
MANDIR=$(DATADIR)/man
8
TMPDIR=/tmp/
9

10
all: Makefile
mathieui's avatar
mathieui committed
11
	python3 setup.py build_ext --inplace
12

13
14
clean:
	find ./ -name \*.pyc -delete
mathieui's avatar
mathieui committed
15
	find ./ -name \*.pyo -delete
16
	find ./ -name \*~ -delete
17
	find ./ -name "#*#" -delete
18
19
	rm -rf doc/build/
	rm -rf build
20

mathieui's avatar
mathieui committed
21
install: all
mathieui's avatar
mathieui committed
22
	python3 setup.py install --root=$(DESTDIR) --optimize=1
mathieui's avatar
mathieui committed
23
	mkdir -p $(DESTDIR)$(prefix)  $(DESTDIR)$(DOCDIR)/poezio/ $(DESTDIR)$(LOCALEDIR) $(DESTDIR)$(BINDIR)
mathieui's avatar
mathieui committed
24
	cp -R doc/* $(DESTDIR)$(DOCDIR)/poezio/
mathieui's avatar
mathieui committed
25
	cp README CHANGELOG COPYING $(DESTDIR)$(DOCDIR)/poezio/
26
27

uninstall:
28
	rm -f $(DESTDIR)$(BINDIR)/poezio
mathieui's avatar
mathieui committed
29
	rm -rf $(DESTDIR)$(DOCDIR)/poezio/
30
	rm -rf $(DESTDIR)$(MANDIR)/man1/poezio.1
31

32
doc:
mathieui's avatar
mathieui committed
33
	make -C doc/ html
34
35
pot:
	xgettext src/*.py --from-code=utf-8 --keyword=_ -o locale/poezio.pot
36

37
38
39
40
41
42
43
44
45
46
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)

47
.PHONY : doc