~ogra/xdiagnose/py3port

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Bryce Harrington
  • Date: 2012-04-15 17:44:44 UTC
  • Revision ID: bryce@canonical.com-20120415174444-945f4xfzv6dz51ki
Add Makefile to generate api docs

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
APPNAME=xdiagnose
 
2
APPURL=http://launchpad.net/xdiagnose
 
3
 
 
4
# Run all the tests
 
5
check:
 
6
        ./run-tests
 
7
 
 
8
clean:
 
9
        rm -rf doc/api
 
10
        find . -name '*.pyc' -print0 | xargs -0 rm -f
 
11
        find . -name '*~' -print0 | xargs -0 rm -f
 
12
 
 
13
# Check for common & easily catchable Python mistakes.
 
14
pyflakes:
 
15
        pyflakes $(APPNAME)
 
16
 
 
17
# Check for coding standard violations.
 
18
pep8:
 
19
        find . -name '*.py' -print0 | xargs -0 pep8 --ignore E221,E222
 
20
        find . -name '*.py' -print0 | xargs -0 pep8 --ignore E221,E222 --repeat | wc -l
 
21
 
 
22
apidocs:
 
23
        pydoctor --add-package $(APPNAME) \
 
24
                --make-html --html-output=doc/api \
 
25
                --project-name=$(APPNAME) \
 
26
                --project-url=$(APPURL)
 
27
 
 
28
lint: pyflakes pep8
 
29
 
 
30
.PHONY: check lint pyflakes pep8 apidocs clean
 
31
 
 
32
# Ignore pyflakes exit code so pep8 will run for 'make lint'
 
33
.IGNORE: pyflakes