forked from lxml/lxml
/
Makefile
64 lines (48 loc) · 1.54 KB
/
Makefile
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
PYTHON?=python
TESTFLAGS=-p -v
TESTOPTS=
SETUPFLAGS=
all: inplace
# Build in-place
inplace:
$(PYTHON) setup.py $(SETUPFLAGS) build_ext -i
build:
$(PYTHON) setup.py $(SETUPFLAGS) build
test_build: build
$(PYTHON) test.py $(TESTFLAGS) $(TESTOPTS)
test_inplace: inplace
$(PYTHON) test.py $(TESTFLAGS) $(TESTOPTS)
PYTHONPATH=src $(PYTHON) selftest.py
PYTHONPATH=src $(PYTHON) selftest2.py
valgrind_test_inplace: inplace
valgrind --tool=memcheck --leak-check=full --num-callers=30 --suppressions=valgrind-python.supp \
$(PYTHON) test.py
bench_inplace: inplace
$(PYTHON) benchmark/bench_etree.py -i
$(PYTHON) benchmark/bench_xpath.py -i
$(PYTHON) benchmark/bench_xslt.py -i
$(PYTHON) benchmark/bench_objectify.py -i
ftest_build: build
$(PYTHON) test.py -f $(TESTFLAGS) $(TESTOPTS)
ftest_inplace: inplace
$(PYTHON) test.py -f $(TESTFLAGS) $(TESTOPTS)
html: inplace
mkdir -p doc/html
PYTHONPATH=src $(PYTHON) doc/mkhtml.py doc/html . `cat version.txt`
rm -fr doc/html/api
@[ -x "`which epydoc`" ] \
&& (cd src && echo "Generating API docs ..." && \
PYTHONPATH=. epydoc -v -o ../doc/html/api --name lxml --url http://codespeak.net/lxml/ lxml/) \
|| (echo "not generating epydoc API documentation")
# XXX What should the default be?
test: test_inplace
valtest: valgrind_test_inplace
bench: bench_inplace
ftest: ftest_inplace
clean:
find . \( -name '*.o' -o -name '*.so' -o -name '*.py[cod]' -o -name '*.dll' \) -exec rm -f {} \;
rm -rf build
realclean: clean
find . -name '*.c' -exec rm -f {} \;
rm -f TAGS
$(PYTHON) setup.py clean -a