Skip to content
Newer
Older
100644 120 lines (91 sloc) 3.29 KB
32ca65f [svn r993] allow overriding python executable in Makefile by passing …
scoder authored
1 PYTHON?=python
792c629 @scoder only use Cython for building when required or explicitly requested
scoder authored
2 PYTHON3?=python3
1f3da5b [svn r1] Initial import of lxml into subversion.
faassen authored
3 TESTFLAGS=-p -v
4 TESTOPTS=
5 SETUPFLAGS=
e4576f9 [svn r3559] r4003@delle: sbehnel | 2008-04-18 21:39:50 +0200
scoder authored
6 LXMLVERSION=`cat version.txt`
1f3da5b [svn r1] Initial import of lxml into subversion.
faassen authored
7
792c629 @scoder only use Cython for building when required or explicitly requested
scoder authored
8 PY2_WITH_CYTHON=$(shell $(PYTHON) -c 'import Cython.Compiler' >/dev/null 2>/dev/null && echo " --with-cython" || true)
9 PY3_WITH_CYTHON=$(shell $(PYTHON3) -c 'import Cython.Compiler' >/dev/null 2>/dev/null && echo " --with-cython" || true)
10
1f3da5b [svn r1] Initial import of lxml into subversion.
faassen authored
11 all: inplace
12
13 # Build in-place
14 inplace:
792c629 @scoder only use Cython for building when required or explicitly requested
scoder authored
15 $(PYTHON) setup.py $(SETUPFLAGS) build_ext -i $(PY2_WITH_CYTHON)
1f3da5b [svn r1] Initial import of lxml into subversion.
faassen authored
16
17 build:
792c629 @scoder only use Cython for building when required or explicitly requested
scoder authored
18 $(PYTHON) setup.py $(SETUPFLAGS) build $(PY2_WITH_CYTHON)
1f3da5b [svn r1] Initial import of lxml into subversion.
faassen authored
19
20 test_build: build
21 $(PYTHON) test.py $(TESTFLAGS) $(TESTOPTS)
22
23 test_inplace: inplace
24 $(PYTHON) test.py $(TESTFLAGS) $(TESTOPTS)
5c666fd [svn r4073] r4972@delle: sbehnel | 2009-02-06 17:46:15 +0100
scoder authored
25 PYTHONPATH=src:$(PYTHONPATH) $(PYTHON) selftest.py
26 PYTHONPATH=src:$(PYTHONPATH) $(PYTHON) selftest2.py
1f3da5b [svn r1] Initial import of lxml into subversion.
faassen authored
27
9eae7d0 [svn r3692] r4250@delle: sbehnel | 2008-05-20 21:57:20 +0200
scoder authored
28 test_inplace3: inplace
29 $(MAKE) clean
792c629 @scoder only use Cython for building when required or explicitly requested
scoder authored
30 $(PYTHON3) setup.py $(SETUPFLAGS) build_ext -i $(PY3_WITH_CYTHON)
9eae7d0 [svn r3692] r4250@delle: sbehnel | 2008-05-20 21:57:20 +0200
scoder authored
31 $(PYTHON3) test.py $(TESTFLAGS) $(TESTOPTS)
5c666fd [svn r4073] r4972@delle: sbehnel | 2009-02-06 17:46:15 +0100
scoder authored
32 PYTHONPATH=src:$(PYTHONPATH) $(PYTHON3) selftest.py
33 PYTHONPATH=src:$(PYTHONPATH) $(PYTHON3) selftest2.py
9eae7d0 [svn r3692] r4250@delle: sbehnel | 2008-05-20 21:57:20 +0200
scoder authored
34
c36711d [svn r2105] target 'valtest' to run tests in valgrind
scoder authored
35 valgrind_test_inplace: inplace
2a05a8a [svn r2879] longer stack traces from valgrind
scoder authored
36 valgrind --tool=memcheck --leak-check=full --num-callers=30 --suppressions=valgrind-python.supp \
ddb7cbf [svn r2154] run valgrind tests without verbose test output
scoder authored
37 $(PYTHON) test.py
c36711d [svn r2105] target 'valtest' to run tests in valgrind
scoder authored
38
63c43a2 [svn r3320] r3551@delle: sbehnel | 2008-02-19 21:51:25 +0100
scoder authored
39 gdb_test_inplace: inplace
40 @echo -e "file $(PYTHON)\nrun test.py" > .gdb.command
41 gdb -x .gdb.command -d src -d src/lxml
42
6413714 [svn r589] refactoring of benchmark setup, add 'bench' target to Make…
scoder authored
43 bench_inplace: inplace
1f5fcad [svn r3233] r3374@delle: sbehnel | 2008-02-01 10:16:04 +0100
scoder authored
44 $(PYTHON) benchmark/bench_etree.py -i
45 $(PYTHON) benchmark/bench_xpath.py -i
46 $(PYTHON) benchmark/bench_xslt.py -i
47 $(PYTHON) benchmark/bench_objectify.py -i
6413714 [svn r589] refactoring of benchmark setup, add 'bench' target to Make…
scoder authored
48
1f3da5b [svn r1] Initial import of lxml into subversion.
faassen authored
49 ftest_build: build
50 $(PYTHON) test.py -f $(TESTFLAGS) $(TESTOPTS)
51
52 ftest_inplace: inplace
53 $(PYTHON) test.py -f $(TESTFLAGS) $(TESTOPTS)
54
d309884 [svn r3575] r4037@delle: sbehnel | 2008-04-23 18:15:02 +0200
scoder authored
55 apihtml: inplace
082a6e9 [svn r2787] delete API docs only when regenerating them
scoder authored
56 rm -fr doc/html/api
8001da3 [svn r2675] do not print epydoc call in Makefile
scoder authored
57 @[ -x "`which epydoc`" ] \
58 && (cd src && echo "Generating API docs ..." && \
1b3d21a [svn r3284] r3469@delle: sbehnel | 2008-02-13 19:54:11 +0100
scoder authored
59 PYTHONPATH=. epydoc -v --docformat "restructuredtext en" \
bd1aead [svn r3640] r4153@delle: sbehnel | 2008-05-04 20:21:22 +0200
scoder authored
60 -o ../doc/html/api --exclude='[.]html[.]tests|[.]_' \
06e1da9 [svn r3592] r4062@delle: sbehnel | 2008-04-24 18:17:15 +0200
scoder authored
61 --exclude-introspect='[.]usedoctest' \
e339148 fix addresses for mailing list, web site, etc
Stefan Behnel authored
62 --name "lxml API" --url / lxml/) \
d309884 [svn r3575] r4037@delle: sbehnel | 2008-04-23 18:15:02 +0200
scoder authored
63 || (echo "not generating epydoc API documentation")
64
8a9e60a [svn r3871] r4579@delle: sbehnel | 2008-07-03 22:22:55 +0200
scoder authored
65 website: inplace
5c666fd [svn r4073] r4972@delle: sbehnel | 2009-02-06 17:46:15 +0100
scoder authored
66 PYTHONPATH=src:$(PYTHONPATH) $(PYTHON) doc/mkhtml.py doc/html . ${LXMLVERSION}
d309884 [svn r3575] r4037@delle: sbehnel | 2008-04-23 18:15:02 +0200
scoder authored
67
8a9e60a [svn r3871] r4579@delle: sbehnel | 2008-07-03 22:22:55 +0200
scoder authored
68 html: inplace website apihtml s5
69
3c75f80 [svn r3869] r4575@delle: sbehnel | 2008-07-03 16:49:53 +0200
scoder authored
70 s5:
1f78826 [svn r3865] r4565@delle: sbehnel | 2008-07-02 08:19:19 +0200
scoder authored
71 $(MAKE) -C doc/s5 slides
72
d309884 [svn r3575] r4037@delle: sbehnel | 2008-04-23 18:15:02 +0200
scoder authored
73 apipdf: inplace
74 rm -fr doc/pdf
75 mkdir -p doc/pdf
76 @[ -x "`which epydoc`" ] \
77 && (cd src && echo "Generating API docs ..." && \
78 PYTHONPATH=. epydoc -v --latex --docformat "restructuredtext en" \
bd1aead [svn r3640] r4153@delle: sbehnel | 2008-05-04 20:21:22 +0200
scoder authored
79 -o ../doc/pdf --exclude='([.]html)?[.]tests|[.]_' \
06e1da9 [svn r3592] r4062@delle: sbehnel | 2008-04-24 18:17:15 +0200
scoder authored
80 --exclude-introspect='html[.]clean|[.]usedoctest' \
e339148 fix addresses for mailing list, web site, etc
Stefan Behnel authored
81 --name "lxml API" --url / lxml/) \
970fb0a [svn r2631] use epydoc (if available) to generate API docs
scoder authored
82 || (echo "not generating epydoc API documentation")
7f09a63 [svn r1398] integrate publish.py from svn/lxml/www as doc/mkhtml.py, …
scoder authored
83
d309884 [svn r3575] r4037@delle: sbehnel | 2008-04-23 18:15:02 +0200
scoder authored
84 pdf: apipdf
e4576f9 [svn r3559] r4003@delle: sbehnel | 2008-04-18 21:39:50 +0200
scoder authored
85 $(PYTHON) doc/mklatex.py doc/pdf . ${LXMLVERSION}
147d25b [svn r3589] r4059@delle: sbehnel | 2008-04-24 16:49:37 +0200
scoder authored
86 (cd doc/pdf && pdflatex lxmldoc.tex \
87 && pdflatex lxmldoc.tex \
88 && pdflatex lxmldoc.tex)
6edfe7e [svn r3574] r4031@delle: sbehnel | 2008-04-22 23:53:08 +0200
scoder authored
89 @pdfopt doc/pdf/lxmldoc.pdf doc/pdf/lxmldoc-${LXMLVERSION}.pdf
6e9372e [svn r3564] r4015@delle: sbehnel | 2008-04-19 17:11:48 +0200
scoder authored
90 @echo "PDF available as doc/pdf/lxmldoc-${LXMLVERSION}.pdf"
e4576f9 [svn r3559] r4003@delle: sbehnel | 2008-04-18 21:39:50 +0200
scoder authored
91
92 # Two pdflatex runs are needed to build the correct Table of contents.
93
1f3da5b [svn r1] Initial import of lxml into subversion.
faassen authored
94 test: test_inplace
95
9eae7d0 [svn r3692] r4250@delle: sbehnel | 2008-05-20 21:57:20 +0200
scoder authored
96 test3: test_inplace3
97
c36711d [svn r2105] target 'valtest' to run tests in valgrind
scoder authored
98 valtest: valgrind_test_inplace
99
63c43a2 [svn r3320] r3551@delle: sbehnel | 2008-02-19 21:51:25 +0100
scoder authored
100 gdbtest: gdb_test_inplace
101
6413714 [svn r589] refactoring of benchmark setup, add 'bench' target to Make…
scoder authored
102 bench: bench_inplace
103
1f3da5b [svn r1] Initial import of lxml into subversion.
faassen authored
104 ftest: ftest_inplace
105
106 clean:
d532cc3 [svn r3178] r3270@delle: sbehnel | 2008-01-19 14:25:11 +0100
scoder authored
107 find . \( -name '*.o' -o -name '*.so' -o -name '*.py[cod]' -o -name '*.dll' \) -exec rm -f {} \;
082a6e9 [svn r2787] delete API docs only when regenerating them
scoder authored
108 rm -rf build
1f3da5b [svn r1] Initial import of lxml into subversion.
faassen authored
109
a21609f [svn r3387] r3699@delle: sbehnel | 2008-03-03 12:01:18 +0100
scoder authored
110 docclean:
1f78826 [svn r3865] r4565@delle: sbehnel | 2008-07-02 08:19:19 +0200
scoder authored
111 $(MAKE) -C doc/s5 clean
a21609f [svn r3387] r3699@delle: sbehnel | 2008-03-03 12:01:18 +0100
scoder authored
112 rm -f doc/html/*.html
113 rm -fr doc/html/api
6e9372e [svn r3564] r4015@delle: sbehnel | 2008-04-19 17:11:48 +0200
scoder authored
114 rm -fr doc/pdf
a21609f [svn r3387] r3699@delle: sbehnel | 2008-03-03 12:01:18 +0100
scoder authored
115
116 realclean: clean docclean
d532cc3 [svn r3178] r3270@delle: sbehnel | 2008-01-19 14:25:11 +0100
scoder authored
117 find . -name '*.c' -exec rm -f {} \;
1f3da5b [svn r1] Initial import of lxml into subversion.
faassen authored
118 rm -f TAGS
119 $(PYTHON) setup.py clean -a
Something went wrong with that request. Please try again.