# All files that should end up in the distribution archive.
DIST_FILES=Makefile rtar.py COPYING README.txt rtar-man.html default.css

VERSION=$(shell python -c "import rtar; print rtar.__version__")
DISTNAME=rtar-$(VERSION)

all: doc

doc: rtar-man.html

rtar-man.html: README.txt
	rst2html.py README.txt > rtar-man.html

epydoc: rtar.py
	epydoc --name rtar.py rtar.py

dist: clean $(DIST_FILES)
	mkdir $(DISTNAME)
	cp -a $(DIST_FILES) $(DISTNAME)
	tar cvzf $(DISTNAME).tar.gz $(DISTNAME)
	rm -rf $(DISTNAME)

clean:
	rm -rf html *~ *.bck *.pyc *.html *.tar.gz *.tar.bz2
