FILES=Makefile mkplaylist.py COPYING README.txt mkplaylist-man.html

VERSION=$(shell python mkplaylist.py --version)
DISTNAME=mkplaylist-$(VERSION)

all:
	# Nothing to do...

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

doc:
	epydoc --name mkplaylist --show-imports mkplaylist.py

dist: clean mkplaylist-man.html
	mkdir $(DISTNAME)
	cp -a $(FILES) $(DISTNAME)
	tar cvzf $(DISTNAME).tar.gz $(DISTNAME)
	rm -rf $(DISTNAME)

clean:
	rm -rf html/ *.bck *~ *.pyc *.pyo *-man.html *.m3u *.tar.gz
