Makefile 1.05 KB
Newer Older
1 2
SHELL := /bin/bash

Őry Máté committed
3 4 5
jsfiles += one/static/script/cloud.min.js
jsfiles += one/static/script/util.min.js
jsfiles += one/static/script/store.min.js
6

7
default: migrate generatestatic collectstatic mo restart
Őry Máté committed
8

Őry Máté committed
9 10
pulldef: pull default
pull:
Őry Máté committed
11 12 13 14
	git pull

po:
	for i in */; do cd $$i; ../manage.py makemessages --all || true; cd ..; done
15
	for i in */; do cd $$i; ../manage.py makemessages --all -d djangojs || true; cd ..; done
16 17

migrate:
18
	./manage.py syncdb || true
19 20
	./manage.py migrate

21
generatestatic: $(jsfiles) one/static/style/style.css
Őry Máté committed
22

23 24 25 26
collectstatic:
	./manage.py collectstatic --noinput

mo:
Őry Máté committed
27
	for i in */locale/*/*/*.po;    do echo -ne "$$i:\t"; msgfmt --statistics $$i;done
28
	for i in */; do cd $$i; ls locale &>/dev/null && ../manage.py compilemessages || true; cd ..; done
29 30

restart:
31
	sudo /etc/init.d/apache2 reload || sudo restart django
32

Őry Máté committed
33 34
%.min.js: %.js
	uglifyjs $< > $@
35

36
one/static/style/style.css:
Őry Máté committed
37
	lessc one/static/style/style.less > one/static/style/style.css
38 39

.PHONY: default pulldef pull po migrate generatestatic collectstatic mo restart one/static/style/style.css