1VERSION=`cat VERSION` 2 3.PHONY: all 4all: 5 6.PHONY: doc 7doc: man html 8 9.PHONY: man 10man: 11 (cd doc && make man && mkdir -p man && cp _build/man/zkg.1 man) 12 13.PHONY: html 14html: 15 (cd doc && make html) 16 17.PHONY: livehtml 18livehtml: 19 (cd doc && make livehtml) 20 21.PHONY: test 22test: 23 @( cd testing && make ) 24 25.PHONY: dist 26dist: 27 python3 setup.py bdist_wheel 28 29.PHONY: upload 30upload: twine-check dist 31 twine upload -u zeek dist/zkg-$(VERSION)-py2.py3-none-any.whl 32 33.PHONY: twine-check 34twine-check: 35 @type twine > /dev/null 2>&1 || \ 36 { \ 37 echo "Uploading to PyPi requires 'twine' and it's not found in PATH."; \ 38 echo "Install it and/or make sure it is in PATH."; \ 39 echo "E.g. you could use the following command to install it:"; \ 40 echo "\tpip3 install twine"; \ 41 echo ; \ 42 exit 1; \ 43 } 44