Code cleanups
[grml2usb.git] / Makefile
1 all: doc
2
3 doc: doc_man doc_html
4
5 doc_html: html-stamp
6
7 html-stamp: grml2usb.8.txt grml2iso.8.txt
8         asciidoc -b xhtml11 -a icons -a toc -a numbered grml2usb.8.txt
9         asciidoc -b xhtml11 -a icons -a toc -a numbered grml2iso.8.txt
10         touch html-stamp
11
12 doc_man: man-stamp
13
14 man-stamp: grml2usb.8.txt grml2iso.8.txt
15         # grml2usb:
16         asciidoc -d manpage -b docbook grml2usb.8.txt
17         sed -i 's/<emphasis role="strong">/<emphasis role="bold">/' grml2usb.8.xml
18         xsltproc --novalid --nonet /usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl grml2usb.8.xml
19         # ugly hack to avoid duplicate empty lines in manpage
20         # notice: docbook-xsl 1.71.0.dfsg.1-1 is broken! make sure you use 1.68.1.dfsg.1-0.2!
21         cp grml2usb.8 grml2usb.8.tmp
22         uniq grml2usb.8.tmp > grml2usb.8
23         rm grml2usb.8.tmp
24         # grml2iso:
25         asciidoc -d manpage -b docbook grml2iso.8.txt
26         sed -i 's/<emphasis role="strong">/<emphasis role="bold">/' grml2iso.8.xml
27         xsltproc --novalid --nonet /usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl grml2iso.8.xml
28         # ugly hack to avoid duplicate empty lines in manpage
29         # notice: docbook-xsl 1.71.0.dfsg.1-1 is broken! make sure you use 1.68.1.dfsg.1-0.2!
30         cp grml2iso.8 grml2iso.8.tmp
31         uniq grml2iso.8.tmp > grml2iso.8
32         rm grml2iso.8.tmp
33         # we're done
34         touch man-stamp
35
36 online: all
37         scp grml2usb.8.html grml:/var/www/grml/grml2usb/index.html
38         scp images/icons/*          grml:/var/www/grml/grml2usb/images/icons/
39         scp images/screenshot.png   grml:/var/www/grml/grml2usb/images/
40
41 tarball: all
42         ./tarball.sh
43
44 prepare-release:
45         ./tarball.sh --no-gpg
46
47 clean:
48         rm -rf grml2usb.8.html grml2usb.8.xml grml2usb.8
49         rm -rf grml2iso.8.html grml2iso.8.xml grml2iso.8
50         rm -rf html-stamp man-stamp grml2usb.tar.gz grml2usb.tgz grml2usb.tgz.md5.asc
51
52 codecheck:
53         pyflakes grml2usb
54         pylint --include-ids=y --max-line-length=120 grml2usb
55         # pylint --include-ids=y --disable-msg-cat=C0301 --disable-msg-cat=W0511 grml2usb
56         # pylint --reports=n --include-ids=y --disable-msg-cat=C0301 grml2usb
57         pep8 --repeat --ignore E125,E126,E127,E128,E501 grml2usb
58
59 # graph:
60 #       sudo pycallgraph grml2usb /grml/isos/grml-small_2008.11.iso /dev/sdb1