|
version 1.1.1.1, 2012/02/21 23:38:00
|
version 1.1.1.3, 2014/06/15 19:53:33
|
|
Line 1
|
Line 1
|
| # Makefile for libxml2 python library |
# Makefile for libxml2 python library |
| AUTOMAKE_OPTIONS = 1.4 foreign |
AUTOMAKE_OPTIONS = 1.4 foreign |
| |
|
| SUBDIRS= . tests | SUBDIRS = . tests |
| |
|
| INCLUDES = \ |
|
| -I$(PYTHON_INCLUDES) \ |
|
| -I$(top_srcdir)/include \ |
|
| -I$(top_builddir)/include \ |
|
| -I$(top_builddir)/$(subdir) |
|
| |
|
| docsdir = $(datadir)/doc/libxml2-python-$(LIBXML_VERSION) |
docsdir = $(datadir)/doc/libxml2-python-$(LIBXML_VERSION) |
| # libxml2class.txt is generated |
|
| dist_docs_DATA = TODO |
dist_docs_DATA = TODO |
| |
|
| EXTRA_DIST = \ |
EXTRA_DIST = \ |
| setup.py \ |
setup.py \ |
| setup.py.in \ |
|
| generator.py \ |
generator.py \ |
| libxml_wrap.h \ |
|
| libxml.py \ |
libxml.py \ |
| libxml2-python-api.xml | libxml2-export.c \ |
| | libxml2-python-api.xml \ |
| | libxml2class.py \ |
| | libxml2class.txt |
| |
|
| libxml2mod_la_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@ @WIN32_EXTRA_LDFLAGS@ -module -avoid-version |
|
| |
|
| if WITH_PYTHON |
if WITH_PYTHON |
| mylibs = \ | AM_CPPFLAGS = \ |
| $(top_builddir)/libxml2.la | -I$(top_builddir)/include \ |
| | -I$(top_srcdir)/include \ |
| | -I$(PYTHON_INCLUDES) |
| |
|
| python_LTLIBRARIES = libxml2mod.la |
python_LTLIBRARIES = libxml2mod.la |
| |
|
| libxml2mod_la_SOURCES = $(srcdir)/libxml.c $(srcdir)/types.c | libxml2mod_la_SOURCES = libxml.c libxml_wrap.h libxml2-py.h libxml2-py.c types.c |
| nodist_libxml2mod_la_SOURCES = libxml2-py.c | libxml2mod_la_LDFLAGS = $(CYGWIN_EXTRA_LDFLAGS) $(WIN32_EXTRA_LDFLAGS) -module -avoid-version \ |
| libxml2mod_la_LIBADD = $(mylibs) @CYGWIN_EXTRA_PYTHON_LIBADD@ @WIN32_EXTRA_PYTHON_LIBADD@ @PYTHON_LIBS@ | $(top_builddir)/libxml2.la $(CYGWIN_EXTRA_PYTHON_LIBADD) $(WIN32_EXTRA_PYTHON_LIBADD) $(PYTHON_LIBS) |
| |
|
| $(srcdir)/libxml.c: libxml2-py.h # to generate before to compile | BUILT_SOURCES = libxml2-export.c libxml2-py.h libxml2-py.c |
| |
|
| |
# libxml.c #includes libxml2-export.c |
| |
libxml.$(OBJEXT): libxml2-export.c |
| |
|
| libxml2.py: $(srcdir)/libxml.py libxml2class.py |
libxml2.py: $(srcdir)/libxml.py libxml2class.py |
| cat $(srcdir)/libxml.py libxml2class.py > $@ | cat $(srcdir)/libxml.py `test -f libxml2class.py || echo $(srcdir)/`libxml2class.py > $@ |
| |
|
| python_DATA = \ |
|
| libxml2.py |
|
| |
|
| dist_python_DATA = \ |
dist_python_DATA = \ |
| drv_libxml2.py | drv_libxml2.py \ |
| | libxml2.py |
| |
|
| GENERATE = generator.py | CLEANFILES = *.pyc |
| API_DESC = $(top_srcdir)/doc/libxml2-api.xml $(srcdir)/libxml2-python-api.xml | |
| GENERATED= libxml2class.py \ | |
| libxml2-export.c \ | |
| libxml2class.txt \ | |
| libxml2-py.c \ | |
| libxml2-py.h | |
| |
|
| CLEANFILES= $(GENERATED) gen_prog libxml2.py | MAINTAINERCLEANFILES = libxml2.py libxml2class.* |
| |
|
| $(GENERATED): gen_prog | API_DESC = $(top_srcdir)/doc/libxml2-api.xml $(srcdir)/libxml2-python-api.xml |
| | GENERATED = libxml2class.py libxml2class.txt $(BUILT_SOURCES) |
| |
|
| gen_prog: $(srcdir)/$(GENERATE) $(API_DESC) | $(GENERATED): $(srcdir)/generator.py $(API_DESC) |
| $(PYTHON) $(srcdir)/$(GENERATE) $(srcdir) | $(PYTHON) $(srcdir)/generator.py $(srcdir) |
| touch gen_prog | |
| endif |
endif |
| |
|
| tests test: all |
tests test: all |
| cd tests && $(MAKE) MAKEFLAGS+=--silent tests | cd tests && $(MAKE) tests |
| |