martin f. krafft | bea29d1 | 2013-07-05 08:35:19 +0200 | [diff] [blame] | 1 | # |
| 2 | # This file is part of reclass (http://github.com/madduck/reclass) |
| 3 | # |
| 4 | # Copyright © 2007–13 martin f. krafft <madduck@madduck.net> |
| 5 | # Released under the terms of the Artistic Licence 2.0 |
| 6 | # |
| 7 | PYFILES = $(shell find -name .git -o -name dist -o -name build -prune -o -name '*.py' -print) |
| 8 | |
martin f. krafft | ce821e0 | 2013-07-06 20:58:04 +0200 | [diff] [blame] | 9 | tests: |
martin f. krafft | 59cf02a | 2013-07-09 15:28:28 +0200 | [diff] [blame] | 10 | python ./run_tests.py |
martin f. krafft | ce821e0 | 2013-07-06 20:58:04 +0200 | [diff] [blame] | 11 | .PHONY: tests |
| 12 | |
martin f. krafft | bea29d1 | 2013-07-05 08:35:19 +0200 | [diff] [blame] | 13 | lint: |
| 14 | @echo pylint --rcfile=.pylintrc $(ARGS) … |
| 15 | @pylint --rcfile=.pylintrc $(ARGS) $(PYFILES) |
| 16 | .PHONY: lint |
| 17 | |
| 18 | lint-errors: ARGS=--errors-only |
| 19 | lint-errors: lint |
| 20 | .PHONY: lint-errors |
| 21 | |
| 22 | lint-report: ARGS=--report=y |
| 23 | lint-report: lint |
| 24 | .PHONY: lint-report |
martin f. krafft | b17a7b7 | 2013-07-05 08:45:35 +0200 | [diff] [blame] | 25 | |
| 26 | coverage: .coverage |
| 27 | python-coverage -r -m |
| 28 | .PHONY: coverage |
| 29 | .coverage: $(PYFILES) |
| 30 | python-coverage -x setup.py nosetests |
martin f. krafft | 8acd49d | 2013-08-26 21:22:25 +0200 | [diff] [blame] | 31 | |
| 32 | docs: |
| 33 | $(MAKE) -C doc man html |
martin f. krafft | 3276910 | 2013-08-26 21:35:28 +0200 | [diff] [blame] | 34 | |
| 35 | docspub: BRANCH=gh-pages |
| 36 | docspub: HTMLDIR=doc/build/html |
| 37 | docspub: docs |
| 38 | git checkout $(BRANCH) |
| 39 | git rm -rf . || : |
| 40 | echo '/doc/build/html/.buildinfo' > .gitignore |
martin f. krafft | 60a28a3 | 2013-08-26 21:58:19 +0200 | [diff] [blame] | 41 | touch .nojekyll |
| 42 | git add $(HTMLDIR) .gitignore .nojekyll |
martin f. krafft | 3276910 | 2013-08-26 21:35:28 +0200 | [diff] [blame] | 43 | git mv $(HTMLDIR)/* . |
| 44 | if git commit -m'Webpage update' -s; then \ |
| 45 | git push $(shell git config --get branch.$(BRANCH).remote) $(BRANCH); \ |
| 46 | fi |
| 47 | git checkout '@{-1}' |
martin f. krafft | 9c6a0f2 | 2013-08-26 22:23:21 +0200 | [diff] [blame^] | 48 | |
| 49 | docsclean: |
| 50 | $(MAKE) -C doc clean |