1 | # Makefile for libxml2 python library
|
---|
2 |
|
---|
3 | # We use a rule with multiple output files which creates problems with
|
---|
4 | # parallel builds.
|
---|
5 | .NOTPARALLEL:
|
---|
6 |
|
---|
7 | SUBDIRS = . tests
|
---|
8 |
|
---|
9 | EXTRA_DIST = \
|
---|
10 | generator.py \
|
---|
11 | libxml.py \
|
---|
12 | libxml2-python-api.xml \
|
---|
13 | pyproject.toml \
|
---|
14 | meson.build
|
---|
15 |
|
---|
16 | if WITH_PYTHON
|
---|
17 | AM_CPPFLAGS = \
|
---|
18 | -I$(top_builddir)/include \
|
---|
19 | -I$(top_srcdir)/include \
|
---|
20 | $(PYTHON_CFLAGS)
|
---|
21 |
|
---|
22 | pyexec_LTLIBRARIES = libxml2mod.la
|
---|
23 |
|
---|
24 | libxml2mod_la_SOURCES = libxml.c libxml_wrap.h types.c
|
---|
25 | nodist_libxml2mod_la_SOURCES = libxml2-py.h libxml2-py.c
|
---|
26 | libxml2mod_la_LDFLAGS = $(AM_LDFLAGS) $(PYTHON_LDFLAGS) -module -avoid-version
|
---|
27 | libxml2mod_la_LIBADD = $(top_builddir)/libxml2.la $(PYTHON_LIBS)
|
---|
28 |
|
---|
29 | BUILT_SOURCES = libxml2-export.c libxml2-py.h libxml2-py.c
|
---|
30 |
|
---|
31 | python_PYTHON = drv_libxml2.py
|
---|
32 | nodist_python_PYTHON = libxml2.py
|
---|
33 |
|
---|
34 | API_DESC = $(top_srcdir)/doc/libxml2-api.xml $(srcdir)/libxml2-python-api.xml
|
---|
35 | GENERATED = libxml2class.py libxml2class.txt $(BUILT_SOURCES)
|
---|
36 | CLEANFILES = libxml2.py $(GENERATED)
|
---|
37 |
|
---|
38 | all-local: libxml2.py
|
---|
39 |
|
---|
40 | $(GENERATED): $(srcdir)/generator.py $(API_DESC)
|
---|
41 | $(PYTHON) $(srcdir)/generator.py $(srcdir)
|
---|
42 |
|
---|
43 | # libxml.c #includes libxml2-export.c
|
---|
44 | libxml.$(OBJEXT): libxml2-export.c
|
---|
45 |
|
---|
46 | libxml2.py: $(srcdir)/libxml.py libxml2class.py
|
---|
47 | cat $(srcdir)/libxml.py `test -f libxml2class.py || echo $(srcdir)/`libxml2class.py > $@
|
---|
48 |
|
---|
49 | clean-local:
|
---|
50 | rm -rf __pycache__ *.pyc
|
---|
51 |
|
---|
52 | endif
|
---|