diff --git a/Makefile.python b/Makefile.python index 122acb7..acb9ed0 100644 --- a/Makefile.python +++ b/Makefile.python @@ -1,32 +1,36 @@ # -*- mode: Makefile -*- PYMODULE := $(shell basename `pwd` | sed 's/-/./g') PYTHON_BIN := $(shell test -d bin/ && find bin/ -type f -executable | xargs egrep -H '^\#.*python' | cut -f 1 -d :) TEST_DIRS := $(shell find . -name tests -type d) NOSE = python3 -m nose NOSEFLAGS = -sv FLAKE = python3 -m flake8 FLAKEFLAGS = all: .PHONY: test test: $(NOSE) $(NOSEFLAGS) $(TEST_DIRS) .PHONY: coverage coverage: $(NOSE) $(NOSEFLAGS) --with-coverage --cover-package $(PYMODULE) --cover-inclusive --cover-branches $(TEST_DIRS) .PHONY: check check: $(FLAKE) $(FLAKEFLAGS) swh $(PYTHON_BIN) +.PHONY: doc +doc: + make -C docs html + .PHONY: distclean # clean up Python bytecode files. Also consider random *.pyc files, in case # Python 2.x has been run by mistake distclean: find . -type d -name __pycache__ | xargs rm -rf find . -type f -name '*.pyc' -delete