Makefile 1.53 KB
Newer Older
Luc Didry's avatar
Luc Didry committed
1
EXTRACTDIR=-D lib -D themes/default
Luc Didry's avatar
Luc Didry committed
2
POT=themes/default/lib/Lstu/I18N/lstu.pot
Luc Didry's avatar
Luc Didry committed
3
XGETTEXT=carton exec local/bin/xgettext.pl
Luc Didry's avatar
Luc Didry committed
4 5
CARTON=carton exec
REAL_LSTU=script/application
6
LSTU=script/lstu
Luc Didry's avatar
Luc Didry committed
7

8
minify:
Luc Didry's avatar
Luc Didry committed
9
	@echo "CSS concatenation"
10
	@cd ./themes/default/public/css/   && cat bootstrap.min.css lstu.css fontelico.css | csso > bootstrap-lstu.min.css
Luc Didry's avatar
Luc Didry committed
11
	@cd ./themes/milligram/public/css/ && cat milligram.min.css lstu.css ../../../default/public/css/fontelico.css | csso > milli-lstu.min.css
12

Luc Didry's avatar
Luc Didry committed
13
locales:
Luc Didry's avatar
Luc Didry committed
14
	$(XGETTEXT) $(EXTRACTDIR) -o $(POT) 2>/dev/null
Luc Didry's avatar
Luc Didry committed
15
	cd ./themes/milligram && make locales
Luc Didry's avatar
Luc Didry committed
16

Luc Didry's avatar
Luc Didry committed
17
push-locales:
18
	zanata-cli -q -B push
Luc Didry's avatar
Luc Didry committed
19 20

pull-locales:
21
	zanata-cli -q -B pull --min-doc-percent 40
22 23 24

stats-locales:
	zanata-cli -q stats
Luc Didry's avatar
Luc Didry committed
25

26 27 28
podcheck:
	podchecker lib/Lstu/DB/Ban.pm lib/Lstu/DB/Session.pm lib/Lstu/DB/URL.pm

29 30 31 32 33
cover:
	PERL5OPT='-Ilib/' HARNESS_PERL_SWITCHES='-MDevel::Cover' $(CARTON) cover --ignore_re '^local'

test:
	@PERL5OPT='-Ilib/' HARNESS_PERL_SWITCHES='-MDevel::Cover' $(CARTON) $(REAL_LSTU) test
34

35
test-sqlite:
36 37 38 39
	@rm -rf test1.db test1.db-journal cover_db/
	@echo 'MOJO_CONFIG=t/sqlite1.conf'
	@PERL5OPT='-Ilib/' HARNESS_PERL_SWITCHES='-MDevel::Cover' MOJO_CONFIG=t/sqlite1.conf $(CARTON) $(REAL_LSTU) test
	@PERL5OPT='-Ilib/' HARNESS_PERL_SWITCHES='-MDevel::Cover' $(CARTON) cover --ignore_re '^local'
40

41
dev: minify
Luc Didry's avatar
Luc Didry committed
42
	$(CARTON) morbo $(LSTU) --listen http://0.0.0.0:3000 --watch lib/ --watch script/ --watch themes/ --watch lstu.conf
Luc Didry's avatar
Luc Didry committed
43 44 45

devlog:
	multitail log/development.log
46

47 48 49
minion:
	$(CARTON) $(REAL_LSTU) minion worker

50 51 52 53 54
installdeps:
	carton install

updatedeps:
	carton update