-
Notifications
You must be signed in to change notification settings - Fork 80
/
Makefile
62 lines (50 loc) · 1.89 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
54
55
56
57
58
59
60
61
62
BASEDIR=$(CURDIR)
DOCDIR=$(BASEDIR)/doc
DISTDIR=$(BASEDIR)/dist
PACKAGE='djangojs'
suite=$(or $(subst :, ,$(tests)), $(PACKAGE))
help:
@echo 'Makefile for Django.js '
@echo ' '
@echo 'Usage: '
@echo ' make serve Run the test server '
@echo ' make test Run the test suite '
@echo ' make coverage Run a caoverage report from the test suite '
@echo ' make pep8 Run the PEP8 report '
@echo ' make pylint Run the pylint report '
@echo ' make doc Generate the documentation '
@echo ' make minify Minify all JS files with yuglify '
@echo ' make dist Generate a distributable package '
@echo ' make clean Remove all temporary and generated artifacts'
@echo ' '
serve:
@echo 'Running test server'
@python manage.py runserver
test:
@echo 'Running test suite'
@python manage.py test $(suite)
coverage:
@echo 'Running test suite with coverage'
@coverage erase
@coverage run --rcfile=coverage.rc manage.py test $(suite)
@echo
@coverage report --rcfile=coverage.rc
pep8:
@pep8 $(PACKAGE) --config=pep8.rc
@echo 'PEP8: OK'
pylint:
@pylint --reports=n --rcfile=pylint.rc $(PACKAGE)
doc:
@echo 'Generating documentation'
@cd $(DOCDIR) && make html
@echo 'Done'
dist: minify
@echo 'Generating a distributable python package'
@python setup.py sdist
@echo 'Done'
minify:
@echo 'Minifying javascript'
@yuglify djangojs/static/js/djangojs/django.js
clean:
rm -fr $(DISTDIR)
.PHONY: doc help clean test dist release