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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
# This file modified from Zope3/Makefile
# Licensed under the ZPL, (c) Zope Corporation and contributors.
PYTHON=python2.3
PYTHONPATH:=$(shell pwd)/lib:${PYTHONPATH}
CONFFILE=launchpad.conf
STARTSCRIPT=runlaunchpad.py
TESTFLAGS=-p -v
TESTOPTS=
SETUPFLAGS=
Z3LIBPATH=$(shell pwd)/sourcecode/zope/src
HERE:=$(shell pwd)
# DO NOT ALTER : this should just build by default
default: inplace
check:
$(MAKE) -C sourcecode build
# Run all tests. test_on_merge.py takes care of setting up the
# database.
./test_on_merge.py canonical
pagetests:
$(MAKE) -C sourcecode build
python test.py test_pages
XXXcheck: build
$(MAKE) -C sourcecode check
PYTHONPATH=$(HERE)/lib ./test.py
debugging-on:
ln -s ../lib/canonical/canonical.apidoc-configure.zcml ./package-includes/+canonical.apidoc-configure.zcml
debugging-off:
rm -f ./package-includes/+canonical.apidoc-configure.zcml
# backwards compatibility for old style
rm -f ./package-includes/+canonical.debugskin-configure.zcml
rm -f ./package-includes/canonical.debugskin-configure.zcml
rm -f ./package-includes/canonical.apidoc-configure.zcml
.PHONY: check debugging-on debugging-off
# XXX What should the default be?
all: inplace runners
# Build in-place
##inplace:
## $(PYTHON) setup.py $(SETUPFLAGS) build_ext -i
##
##build:
## $(PYTHON) setup.py $(SETUPFLAGS) build
inplace: build
build:
$(MAKE) -C sourcecode build
runners:
echo "#!/bin/sh" > bin/runzope;
echo "exec $(PYTHON) $(STARTSCRIPT) -C $(CONFFILE)" >> bin/runzope;
chmod +x bin/runzope
echo "#!/bin/sh" > bin/zopectl;
echo "$(PYTHON) $(PWD)/src/zdaemon/zdctl.py \
-S schema.xml \
-C zdaemon.conf -d \$$*" >> bin/zopectl
chmod +x bin/zopectl
test_build: build
$(PYTHON) test.py $(TESTFLAGS) $(TESTOPTS)
test_inplace: inplace
$(PYTHON) test.py $(TESTFLAGS) $(TESTOPTS)
ftest_build: build
env PYTHONPATH=$(PYTHONPATH) \
$(PYTHON) test.py -f $(TESTFLAGS) $(TESTOPTS)
ftest_inplace: inplace
env PYTHONPATH=$(PYTHONPATH) \
$(PYTHON) test.py -f $(TESTFLAGS) $(TESTOPTS)
### SteveA says these should be ripped
#test:
#test_inplace
#ftest: ftest_inplace
run: inplace
PYTHONPATH=$(Z3LIBPATH):$(PYTHONPATH) $(PYTHON) \
$(STARTSCRIPT) -C $(CONFFILE)
debug: principals.zcml
PYTHONPATH=$(Z3LIBPATH):$(PYTHONPATH) $(PYTHON) -i -c \
"from zope.app import Application;\
app = Application('Data.fs', 'site.zcml')()"
clean:
find . \( -name '*.o' -o -name '*.so' -o -name '*.py[co]' -o -name '*.dll' \) -exec rm -f {} \;
rm -rf build
realclean: clean
rm -f TAGS tags
$(PYTHON) setup.py clean -a
zcmldocs:
PYTHONPATH=`pwd`/src:$(PYTHONPATH) $(PYTHON) \
./src/zope/configuration/stxdocs.py \
-f ./src/zope/app/meta.zcml -o ./doc/zcml/namespaces.zope.org
#
# Naughty, naughty! How many Zope3 developers are going to have
# that directory structure? The 'ctags' package is capable of generating
# both emacs-sytle and vi-style tags files from python source; can the
# emacs-provided 'etags' not read Python?
#
TAGS:
python ~/trunk/Tools/scripts/eptags.py `find . -name \*.py`
# etags `find . -name \*.py -print`
tags:
ctags -R
|