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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
#!/usr/bin/make
#
# Makefile for schooltool.lyceum.journal Buildout
#
BOOTSTRAP_PYTHON=python2.4
.PHONY: all
all: build
.PHONY: build
build:
test -d python || $(MAKE) BOOTSTRAP_PYTHON=$(BOOTSTRAP_PYTHON) bootstrap
test -f bin/test || $(MAKE) buildout
.PHONY: bootstrap
bootstrap:
$(BOOTSTRAP_PYTHON) bootstrap.py
.PHONY: buildout
buildout:
bin/buildout
.PHONY: update
update: build
bzr up
bin/buildout -n
.PHONY: test
test: build
bin/test -u
.PHONY: testall
testall: build
bin/test
.PHONY: ftest
ftest: build
bin/test -f
.PHONY: release
release: compile-translations
echo -n `sed -e 's/\n//' version.txt.in` > version.txt
echo -n "_r" >> version.txt
bzr revno >> version.txt
bin/buildout setup setup.py sdist
.PHONY: move-release
move-release:
mv dist/schooltool.lyceum.journal-*.tar.gz /home/ftp/pub/schooltool/releases/nightly
.PHONY: coverage
coverage: build
rm -rf coverage
bin/test -u --coverage=coverage
mv parts/test/coverage .
@cd coverage && ls | grep -v tests | xargs grep -c '^>>>>>>' | grep -v ':0$$'
.PHONY: coverage-reports-html
coverage-reports-html:
rm -rf coverage/reports
mkdir coverage/reports
bin/coverage
ln -s schooltool.lyceum.journal.html coverage/reports/index.html
.PHONY: extract-translations
extract-translations: build
bin/i18nextract --egg schooltool.lyceum.journal --domain schooltool.lyceum.journal --zcml schooltool/lyceum/journal/translation.zcml --output-file src/schooltool/lyceum/journal/locales/schooltool.lyceum.journal.pot
.PHONY: compile-translations
compile-translations:
set -e; \
locales=src/schooltool/lyceum/journal/locales; \
for f in $${locales}/*/LC_MESSAGES/schooltool.lyceum.journal.po; do \
msgfmt -o $${f%.po}.mo $$f;\
done
.PHONY: update-translations
update-translations: extract-translations
set -e; \
locales=src/schooltool/lyceum/journal/locales; \
for f in $${locales}/*/LC_MESSAGES/schooltool.lyceum.journal.po; do \
msgmerge -qU $$f $${locales}/schooltool.lyceum.journal.pot ;\
done
$(MAKE) PYTHON=$(PYTHON) compile-translations
.PHONY: ubuntu-environment
ubuntu-environment:
@if [ `whoami` != "root" ]; then { \
echo "You must be root to create an environment."; \
echo "I am running as $(shell whoami)"; \
exit 3; \
} else { \
apt-get install subversion build-essential python-all python-all-dev libc6-dev libicu-dev; \
apt-get build-dep python-imaging; \
apt-get build-dep python-libxml2 libxml2; \
echo "Installation Complete: Next... Run 'make'."; \
} fi
|