X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=Makefile;h=21100c9f800837d94020eb208d221eb670c39cad;hb=5cf0e627783e9e4ddd4e3e7efd9346f873c73eee;hp=cc1ddb8a274557d2f18820cc9f5817045b01e794;hpb=06204515308656fb4f08ebb96e636610ab7b7902;p=mimedecode.git diff --git a/Makefile b/Makefile index cc1ddb8..21100c9 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,10 @@ +VERSION=$(shell python -c "from mimedecode import __version__; print __version__") + +.PHONY: all all: docs sdist DISTFILES = mimedecode.py \ -mimedecode1.py \ setup.py \ Makefile \ Makefile.sgmlt \ @@ -14,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