~libravatar/libravatar/master

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
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)

%.css: %
	yui-compressor -o $@ $<
%.js: %
	yui-compressor -o $@ $<

%.gz: %.css
	gzip --best < $< > $@
%.gz: %.js
	gzip --best < $< > $@

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:
	( [ -d debian/libravatar-www ] && rm -rf debian/libravatar-www/ ) || true
	DJANGO_SETTINGS_MODULE=libravatar.settings find -type f -name "*.py" -exec pylint --rcfile=.pylintrc {} \;

unittests:
	python libravatar/manage.py test public tools

test: lint unittests

package:
	dpkg-buildpackage -us -uc