diff --git a/Makefile b/Makefile index a672b96..cbf4f08 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,24 @@ -PKGNAME = swh.$(shell basename `pwd` | sed 's/.*-//') +BASENAME := $(shell basename `pwd` | sed 's/.*-//') + +PKGNAME = swh.$(BASENAME) +PKGDIR = swh/$(BASENAME) +EXTRA_DIRS := $(shell test -d bin && echo bin) NOSE = nosetests3 NOSEFLAGS = -v +FLAKE = flake8 +FLAKEFLAGS = all: .PHONY: test test: $(NOSE) $(NOSEFLAGS) .PHONY: coverage coverage: $(NOSE) $(NOSEFLAGS) --with-coverage --cover-package $(PKGNAME) + +.PHONY: coverage +check: + $(FLAKE) $(FLAKEFLAGS) $(PKGDIR) $(EXTRA_DIRS)