New tests are working well eniugh that we can flush the old ones.
[super-star-trek.git] / Makefile
1 # Makefile for the SST2K project
2
3 VERS=$(shell sed <sst.py -n -e '/version *= \"*\(.*\)\"/s//\1/p')
4
5 MANDIR=/usr/share/man/man1
6 BINDIR=/usr/bin
7
8 DOCS    = README COPYING NEWS doc/HACKING doc/sst-doc.xml doc/sst-layer.xsl doc/sst.xml
9 SOURCES = sst.py Makefile replay doc/makehelp.py control $(DOCS)
10
11 all: super-star-trek-$(VERS).tar.gz
12
13 install: sst.6
14         cp sst.py $(BINDIR)
15         gzip <sst.6 >$(MANDIR)/sst.6.gz
16
17 sst.6: doc/sst.xml
18         cd doc; xmlto man sst.xml; mv sst.6 ..
19
20 sst.html: doc/sst.xml
21         cd doc; xmlto html-nochunks sst.xml; mv sst.html ..
22
23 sst-doc.html: doc/sst-doc.xml
24         xmlto xhtml-nochunks doc/sst-doc.xml
25
26 super-star-trek-$(VERS).tar.gz: $(SOURCES) sst.6
27         tar --transform='s:^:super-star-trek-$(VERS)/:' --show-transformed-names -cvzf super-star-trek-$(VERS).tar.gz $(SOURCES) sst.6
28
29 dist: sst-$(VERS).tar.gz
30
31 check: #pylint
32         cd test; make --quiet
33
34 COMMON_PYLINT = --rcfile=/dev/null --reports=n \
35         --msg-template="{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}" \
36         --dummy-variables-rgx='^_'
37 PYLINTOPTS = $(COMMON_PYLINT) --disable=C0103,C0111,C0113,C1001,C0301,C0302,C0321,C0325,C0326,C0410,C1801,E1120,R0101,R0902,R0903,R0911,R0912,R0914,R0915,R0916,R1705,R1706,R1710,W0110,W0123,W0141,W0312,W0603,W0611
38 pylint:
39         @pylint --output-format=parseable $(PYLINTOPTS) sst.py
40
41 clean:
42         rm -f sst.6 sst.html
43         rm -f *.6 MANIFEST index.html
44
45 SHIPPER = version=$(VERS) bkgimage=lpt.jpg
46
47 release: super-star-trek-$(VERS).tar.gz sst.html sst-doc.html
48         shipper $(SHIPPER) | sh -e -x
49
50 refresh: sst.html
51         shipper -N -w $(SHIPPER)  | sh -e -x