Make sure the documentation build works.
[irker.git] / Makefile
1 # Makefile for the irker relaying tool
2
3 VERS=$(shell irkerd -V | sed 's/irkerd version //')
4
5 docs: irkerd.html irkerd.8 irkerhook.html irkerhook.1
6
7 irkerd.8: irkerd.xml
8         xmlto man irkerd.xml
9 irkerd.html: irkerd.xml
10         xmlto html-nochunks irkerd.xml
11
12 irkerhook.1: irkerhook.xml
13         xmlto man irkerhook.xml
14 irkerhook.html: irkerhook.xml
15         xmlto html-nochunks irkerhook.xml
16
17 security.html: security.txt
18         asciidoc -o security.html security.txt
19 hacking.html: hacking.txt
20         asciidoc -o hacking.html hacking.txt
21
22 install: irkerd.8 irkerhook.1 uninstall
23         install -m 755 -o 0 -g 0 -d $(ROOT)/usr/bin/
24         install -m 755 -o 0 -g 0 irkerd $(ROOT)/usr/bin/irkerd
25         install -m 755 -o 0 -g 0 -d $(ROOT)/usr/share/man/man1/
26         install -m 755 -o 0 -g 0 irkerd.8 $(ROOT)/usr/share/man/man1/irkerd.8
27         install -m 755 -o 0 -g 0 -d $(ROOT)/usr/share/man/man8/
28         install -m 755 -o 0 -g 0 irkerd.8 $(ROOT)/usr/share/man/man1/irkerhook.1
29
30 uninstall:
31         rm -f ${ROOT}/usr/bin/irkerd 
32         rm -f ${ROOT}/usr/share/man/man1/irkerd.8
33         rm -f ${ROOT}/usr/share/man/man1/irkerhook.1
34
35 clean:
36         rm -f irkerd.8 irker-*.tar.gz *~
37         rm -f SHIPPER.* *.html
38
39 PYLINTOPTS = --rcfile=/dev/null --reports=n --include-ids=y --disable="C0103,C0111,C0301,R0201,R0902,R0903,R0912,E1101,W0201,W0621,W0702,F0401"
40 pylint:
41         @pylint --output-format=parseable $(PYLINTOPTS) irkerd
42         @pylint --output-format=parseable $(PYLINTOPTS) irkerhook.py
43
44
45 SOURCES = README COPYING NEWS BUGS install.txt security.txt hacking.txt \
46         irkerd irkerhook.py Makefile irkerd.xml irkerhook.xml irker-logo.png
47
48 version:
49         @echo $(VERS)
50
51 irker-$(VERS).tar.gz: $(SOURCES) irkerd.8 irkerhook.1
52         tar --transform='s:^:irker-$(VERS)/:' --show-transformed-names -cvzf irker-$(VERS).tar.gz $(SOURCES)
53
54 dist: irker-$(VERS).tar.gz
55
56 release: irker-$(VERS).tar.gz irkerd.html irkerhook.html security.html hacking.html
57         shipper -u -m -t; make clean