X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;ds=sidebyside;f=Makefile;h=21100c9f800837d94020eb208d221eb670c39cad;hb=a3b781fb58670e6418c1b2d1afe497ee5846117c;hp=c27f3a27b88f219576ba0590c070df1712290bc1;hpb=6d44cf69f7543992b197d6e6ce1826e687beea63;p=mimedecode.git diff --git a/Makefile b/Makefile index c27f3a2..21100c9 100644 --- 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 \ @@ -13,21 +16,25 @@ mimedecode.html \ mimedecode.man \ mimedecode.txt -sdist: dist/mimedecode-2.1.0.tar.gz - touch sdist +.PHONY: sdist +sdist: dist/mimedecode-$(VERSION).tar.gz -dist/mimedecode-2.1.0.tar.gz: $(DISTFILES) - umask 022 && python setup.py sdist +.PHONY: dist +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 -include Makefile.4xslt +include Makefile.xsltproc -CLEANFILES = mimedecode.pyc MANIFEST sdist +CLEANFILES = *.py[co] MANIFEST +.PHONY: clean clean: rm -f $(CLEANFILES) +.PHONY: distclean distclean: clean - rm -rf dist sdist + rm -rf dist