aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 572e6d6f1f449022059dbb13aedb7f039e170263 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
VERSION=$(shell python setup.py --version)
VERSION_TAG=v$(subst .,_,$(VERSION))
TARFILE=archivemail-$(VERSION).tar.gz
SVNROOT=https://archivemail.svn.sourceforge.net/svnroot/archivemail


default:
	@echo "no default target"

clean:
	rm -f *.pyc manpage.links manpage.refs manpage.log

test:
	python test_archivemail.py

clobber: clean
	rm -rf build dist


sdist: clobber doc
	cp archivemail.py archivemail
	python setup.py sdist
	rm archivemail

# FIXME: bdist_rpm chokes on the manpage. 
#        This is python/distutils bug #644744
#bdist_rpm: clobber doc
#	cp archivemail.py archivemail
#	python setup.py bdist_rpm
#	rm archivemail

tag:
	# Overwriting tags at least doesn't work with svn << 1.4, 
	# it silently creates a new subidr.  It *may* work with 
	# svn 1.4, I haven't tested it. See svn bug #2188.
	#cvs tag -F current
	@if svn list "$(SVNROOT)/tags" | grep -qx "$(VERSION_TAG)/\?"; then \
	    echo "Tag '$(VERSION_TAG)' already exists, aborting"; \
	else \
	    svn copy . "$(SVNROOT)/tags/$(VERSION_TAG)"; \
	fi

upload:
	(cd dist && lftp -c 'open upload.sf.net && cd incoming && put $(TARFILE)')

doc: archivemail.1 archivemail.html

archivemail.1: archivemail.sgml
	docbook2man archivemail.sgml
	chmod 644 archivemail.1

archivemail.html: archivemail.sgml db2html.dsl
	docbook2html --dsl db2html.dsl -u archivemail.sgml
	chmod 644 archivemail.html
	tidy -modify -indent -f /dev/null archivemail.html || true