]> code.delx.au - offlineimap/blob - Makefile
bddfd90ca24d85160ccedc011390a0a0967472d2
[offlineimap] / Makefile
1 # Copyright (C) 2002 - 2006 John Goerzen
2 # <jgoerzen@complete.org>
3 #
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17
18 VERSION=4.0.16
19 TARGZ=offlineimap_$(VERSION).tar.gz
20 SHELL=/bin/bash
21
22 clean:
23 -python2.3 setup.py clean --all
24 -rm -f `find . -name "*~"`
25 -rm -f `find . -name "*.tmp"`
26 -rm -f bin/offlineimapc
27 -rm -f `find . -name "*.pyc"`
28 -rm -f `find . -name "*.pygc"`
29 -rm -f `find . -name "*.class"`
30 -rm -f `find . -name "*.bak"`
31 -rm -f `find . -name ".cache*"`
32 -rm -f manpage.links manpage.refs
33 -find . -name auth -exec rm -vf {}/password {}/username \;
34
35 doc: faq
36 docbook2man offlineimap.sgml
37 docbook2man offlineimap.sgml
38 docbook2html -u offlineimap.sgml
39 mv offlineimap.html manual.html
40 man -t -l offlineimap.1 > manual.ps
41 ps2pdf manual.ps
42 groff -Tascii -man offlineimap.1 | sed $$'s/.\b//g' > manual.txt
43 -rm manpage.links manpage.refs manual.ps
44
45 faq:
46 curl -o FAQ.html http://software.complete.org/offlineimap/wiki/FrequentlyAskedQuestions
47
48 targz: ../$(TARGZ)
49 ../$(TARGZ):
50 if ! pwd | grep -q "/offlineimap-$(VERSION)$$"; then \
51 echo "Containing directory must be called offlineimap-$(VERSION)"; \
52 exit 1; \
53 fi; \
54 pwd && cd .. && pwd && tar -zhcv --exclude '_darcs' -f $(TARGZ) offlineimap-$(VERSION)
55
56 rpm: targz
57 cd .. && sudo rpmbuild -ta $(TARGZ)