]> git.phdru.name Git - mimedecode.git/blobdiff - Makefile
all is also a .PHONY target
[mimedecode.git] / Makefile
index 1a84be3763197c4732f8ad5472fc943bf7cece2c..21100c9f800837d94020eb208d221eb670c39cad 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,7 @@
 
+VERSION=$(shell python -c "from mimedecode import __version__; print __version__")
+
+.PHONY: all
 all: docs sdist
 
 DISTFILES = mimedecode.py \
@@ -14,11 +17,11 @@ mimedecode.man \
 mimedecode.txt
 
 .PHONY: sdist
-sdist: dist/mimedecode-2.1.0.tar.gz
+sdist: dist/mimedecode-$(VERSION).tar.gz
 
 .PHONY: dist
-dist/mimedecode-2.1.0.tar.gz: $(DISTFILES)
-       umask 022 && chmod a+rX $(DISTFILES) && python setup.py sdist
+dist/mimedecode-$(VERSION).tar.gz: $(DISTFILES)
+       umask 022 && chmod a+rX $(DISTFILES) && python setup.py sdist --formats=bztar
 
 .PHONY: docs
 docs: mimedecode.man mimedecode.txt mimedecode.html