2002-04-12 14:46:09 +00:00
|
|
|
|
2006-10-14 20:59:14 +00:00
|
|
|
VERSION=$(shell python setup.py --version)
|
2002-04-13 11:36:32 +00:00
|
|
|
VERSION_TAG=v$(subst .,_,$(VERSION))
|
2002-04-19 07:12:49 +00:00
|
|
|
TARFILE=archivemail-$(VERSION).tar.gz
|
2007-11-07 23:59:45 +00:00
|
|
|
HTDOCS=htdocs-$(VERSION)
|
2002-04-12 14:46:09 +00:00
|
|
|
|
2010-12-29 00:03:09 +00:00
|
|
|
# Path to XSLT stylesheet. Adapt to your needs.
|
|
|
|
XSLT_MAN=/usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl
|
|
|
|
|
2002-04-12 14:46:09 +00:00
|
|
|
default:
|
|
|
|
@echo "no default target"
|
|
|
|
|
|
|
|
clean:
|
2010-07-29 19:35:58 +00:00
|
|
|
rm -f manpage.links manpage.refs manpage.log
|
2007-11-07 23:59:45 +00:00
|
|
|
rm -rf $(HTDOCS)
|
2002-04-12 14:46:09 +00:00
|
|
|
|
2002-04-17 06:26:31 +00:00
|
|
|
test:
|
2010-07-29 18:49:39 +00:00
|
|
|
python test_archivemail
|
2002-04-17 06:26:31 +00:00
|
|
|
|
2002-04-12 14:46:09 +00:00
|
|
|
clobber: clean
|
|
|
|
rm -rf build dist
|
2007-11-07 23:59:45 +00:00
|
|
|
rm -f $(HTDOCS).tgz
|
2002-04-12 14:46:09 +00:00
|
|
|
|
2002-04-23 03:01:26 +00:00
|
|
|
|
2002-04-17 06:26:31 +00:00
|
|
|
sdist: clobber doc
|
2006-10-14 20:30:14 +00:00
|
|
|
python setup.py sdist
|
2002-05-07 12:14:29 +00:00
|
|
|
|
2006-10-14 20:57:29 +00:00
|
|
|
# FIXME: bdist_rpm chokes on the manpage.
|
2007-11-06 23:45:21 +00:00
|
|
|
# This is python/distutils bug #644744
|
2006-10-14 20:57:29 +00:00
|
|
|
#bdist_rpm: clobber doc
|
|
|
|
# python setup.py bdist_rpm
|
2002-05-07 12:14:29 +00:00
|
|
|
|
2002-04-12 14:46:09 +00:00
|
|
|
tag:
|
2009-11-06 16:13:34 +00:00
|
|
|
git tag -a $(VERSION_TAG)
|
2002-04-13 11:36:32 +00:00
|
|
|
|
2002-04-19 07:12:49 +00:00
|
|
|
upload:
|
|
|
|
(cd dist && lftp -c 'open upload.sf.net && cd incoming && put $(TARFILE)')
|
|
|
|
|
2002-04-23 03:01:26 +00:00
|
|
|
doc: archivemail.1 archivemail.html
|
|
|
|
|
2007-11-08 18:23:15 +00:00
|
|
|
htdocs: $(HTDOCS).tgz
|
|
|
|
$(HTDOCS).tgz: index.html archivemail.html RELNOTES style.css manpage.css
|
2007-11-07 23:59:45 +00:00
|
|
|
install -d -m 775 $(HTDOCS)
|
|
|
|
install -m 664 $^ $(HTDOCS)
|
|
|
|
cd $(HTDOCS) && mv archivemail.html manpage.html
|
|
|
|
tar czf $(HTDOCS).tgz $(HTDOCS)
|
|
|
|
|
2010-12-29 00:03:09 +00:00
|
|
|
archivemail.1: archivemail.xml
|
|
|
|
xsltproc $(XSLT_MAN) archivemail.xml
|
2002-04-13 11:36:32 +00:00
|
|
|
|
2010-12-29 00:03:09 +00:00
|
|
|
archivemail.html: archivemail.xml db2html.xsl
|
|
|
|
xsltproc --output archivemail.html \
|
|
|
|
db2html.xsl archivemail.xml
|
2007-11-06 23:49:47 +00:00
|
|
|
tidy -modify -indent -f /dev/null archivemail.html || true
|
2007-11-08 18:09:45 +00:00
|
|
|
|
|
|
|
.PHONY: clean test clobber sdist tag upload doc htdocs
|