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
|
CSS := $(shell find static/css -type f -name "*.css" -a -not -name "*.css.css")
JS := $(shell find static/js -type f -name "*.js" -a -not -name "*.js.js")
MIN_CSS = ${CSS:=.css}
MIN_JS = ${JS:=.js}
COMPRESSED_CSS = ${CSS:=.gz}
COMPRESSED_JS = ${JS:=.gz}
CLEANUP =
all: $(MIN_CSS) $(MIN_JS) $(COMPRESSED_JS) $(COMPRESSED_CSS) mofiles
%.css: %
yui-compressor -o $@ $<
%.js: %
yui-compressor -o $@ $<
%.gz: %.css
gzip --best < $< > $@
%.gz: %.js
gzip --best < $< > $@
pofiles:
cd libravatar && for l in en de fr ja ; do django-admin makemessages -l $$l -e html,txt ; done
mofiles:
cd libravatar && django-admin compilemessages
clean:
rm -f $(COMPRESSED_CSS) $(COMPRESSED_JS) $(MIN_CSS) $(MIN_JS)
find -name "*.pyc" -delete
( [ -h libravatar/settings.py ] && rm -f libravatar/settings.py ) || true
lint:
@echo Running pylint...
@( [ -d debian/libravatar-www ] && rm -rf debian/libravatar-www/ ) || true
@DJANGO_SETTINGS_MODULE=libravatar.settings find -type f -name "*.py" -exec pylint --rcfile=.pylintrc {} \;
pyflakes:
@echo Running pyflakes...
@pyflakes libravatar/
pep8:
@echo Running pep8...
@pep8 --ignore=E501 libravatar/
unittests:
@echo Running unit tests...
@python libravatar/manage.py test public tools
test: pep8 pyflakes lint unittests
package:
dpkg-buildpackage -us -uc
|