forked from jbn/ZigZag
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (44 loc) · 1.11 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
.PHONY: build_for_testing
build_for_testing:
python setup.py build_ext --inplace
.PHONY: clean
clean:
rm -f zigzag/*.so
rm -f zigzag/*.c
rm -f zigzag/*.html
.PHONY: test
test:
python setup.py nosetests
.PHONY: test_with_coverage
test_with_coverage:
CYTHON_DEBUG=1 coverage run setup.py nosetests
.PHONY: coverage
coverage: clean test_with_coverage
coverage html -i
open htmlcov/index.html
.PHONY: profile
profile: clean test_with_coverage
cython --annotate-coverage coverage.xml zigzag/*.pyx
open zigzag
.PHONY: analyze
analyze: clean test_with_coverage
coverage html -i
cython --annotate-coverage coverage.xml zigzag/*.pyx
open htmlcov/index.html
open zigzag
.PHONY: docs
docs: build_for_testing
cd docs && sphinx-apidoc -f -o source ../zigzag
$(MAKE) -C docs html
.PHONY: gh-pages
gh-pages: ensure_clean docs
git checkout gh-pages
cp -r docs/build/html/* ./
git add .
@-git commit -m 'Update documentation' # Don't fail if no changes.
git checkout master
.PHONY: ensure_clean
ensure_clean:
ifeq ($(shell git status | grep "working directory clean"), )
$(error Commit changes before generating docs)
endif