~aelkner/schooltool/schooltool.lyceum.journal_october_release

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Ignas Mikalajūnas
  • Date: 2008-01-14 23:18:29 UTC
  • Revision ID: ignas@pov.lt-20080114231829-qhhxzokl8tppirru
Update lyceum checkout into a buildout.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/make
 
2
#
 
3
# Makefile for lyceum Buildout
 
4
#
 
5
 
 
6
BOOTSTRAP_PYTHON=python2.4
 
7
 
 
8
.PHONY: all
 
9
all: build
 
10
 
 
11
.PHONY: build
 
12
build:
 
13
        test -d python || $(MAKE) BOOTSTRAP_PYTHON=$(BOOTSTRAP_PYTHON) bootstrap
 
14
        test -f bin/test || $(MAKE) buildout
 
15
 
 
16
.PHONY: bootstrap
 
17
bootstrap:
 
18
        $(BOOTSTRAP_PYTHON) bootstrap.py
 
19
 
 
20
.PHONY: buildout
 
21
buildout:
 
22
        bin/buildout
 
23
 
 
24
.PHONY: update
 
25
update: build
 
26
        svn up
 
27
        bin/buildout -n
 
28
 
 
29
.PHONY: test
 
30
test: build
 
31
        bin/test -u
 
32
 
 
33
.PHONY: testall
 
34
testall: build
 
35
        bin/test
 
36
 
 
37
.PHONY: ftest
 
38
ftest: build
 
39
        bin/test -f
 
40
 
 
41
.PHONY: release
 
42
release:
 
43
         bin/buildout setup setup.py sdist
 
44
 
 
45
.PHONY: move-release
 
46
move-release:
 
47
         mv dist/lyceum-*.tar.gz /home/ftp/pub/schooltool/releases/nightly
 
48
 
 
49
.PHONY: coverage
 
50
coverage: build
 
51
        test -d coverage || rm -rf coverage
 
52
        bin/test -u --coverage=coverage
 
53
        mv parts/test/coverage .
 
54
        @cd coverage && ls | grep -v tests | xargs grep -c '^>>>>>>' | grep -v ':0$$'
 
55
 
 
56
.PHONY: coverage-reports-html
 
57
coverage-reports-html:
 
58
        test -d coverage/reports || rm -rf coverage/reports
 
59
        mkdir coverage/reports
 
60
        bin/coverage
 
61
        ln -s lyceum.html coverage/reports/index.html
 
62
 
 
63
.PHONY: ubuntu-environment
 
64
ubuntu-environment:
 
65
        @if [ `whoami` != "root" ]; then { \
 
66
         echo "You must be root to create an environment."; \
 
67
         echo "I am running as $(shell whoami)"; \
 
68
         exit 3; \
 
69
        } else { \
 
70
         apt-get install subversion build-essential python-all python-all-dev libc6-dev libicu-dev; \
 
71
         apt-get build-dep python-imaging; \
 
72
         apt-get build-dep python-libxml2 libxml2; \
 
73
         echo "Installation Complete: Next... Run 'make'."; \
 
74
        } fi