1 # Makefile for libxml2 python library
2 AUTOMAKE_OPTIONS = 1.4 foreign
8 -I$(top_srcdir)/include \
9 -I$(top_builddir)/include \
10 -I$(top_builddir)/$(subdir)
12 docsdir = $(datadir)/doc/libxml2-python-$(LIBXML_VERSION)
13 # libxml2class.txt is generated
22 libxml2-python-api.xml
24 libxml2mod_la_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@ @WIN32_EXTRA_LDFLAGS@ -module -avoid-version
28 $(top_builddir)/libxml2.la
30 python_LTLIBRARIES = libxml2mod.la
32 libxml2mod_la_SOURCES = $(srcdir)/libxml.c $(srcdir)/types.c
33 nodist_libxml2mod_la_SOURCES = libxml2-py.c
34 libxml2mod_la_LIBADD = $(mylibs) @CYGWIN_EXTRA_PYTHON_LIBADD@ @WIN32_EXTRA_PYTHON_LIBADD@ @PYTHON_LIBS@
36 $(srcdir)/libxml.c: libxml2-py.h # to generate before to compile
39 libxml2.py: $(srcdir)/libxml.py libxml2class.py
40 cat $(srcdir)/libxml.py libxml2class.py > $@
48 GENERATE = generator.py
49 API_DESC = $(top_srcdir)/doc/libxml2-api.xml $(srcdir)/libxml2-python-api.xml
50 GENERATED= libxml2class.py \
56 CLEANFILES= $(GENERATED) gen_prog libxml2.py
58 $(GENERATED): gen_prog
60 gen_prog: $(srcdir)/$(GENERATE) $(API_DESC)
61 $(PYTHON) $(srcdir)/$(GENERATE) $(srcdir)
66 cd tests && $(MAKE) MAKEFLAGS+=--silent tests