Daniel Veillard | 5e5c2d0 | 2002-02-09 18:03:01 +0000 | [diff] [blame] | 1 | # Makefile for libxml2 python library |
| 2 | AUTOMAKE_OPTIONS = 1.4 foreign |
| 3 | |
Daniel Richard G | d10a72c | 2012-08-14 12:50:25 +0800 | [diff] [blame] | 4 | SUBDIRS = . tests |
Daniel Veillard | 253aa2c | 2002-02-02 09:17:16 +0000 | [diff] [blame] | 5 | |
Daniel Veillard | 5ac8823 | 2008-02-19 07:54:52 +0000 | [diff] [blame] | 6 | docsdir = $(datadir)/doc/libxml2-python-$(LIBXML_VERSION) |
Daniel Veillard | 5ac8823 | 2008-02-19 07:54:52 +0000 | [diff] [blame] | 7 | dist_docs_DATA = TODO |
Daniel Veillard | c3e3944 | 2002-02-01 09:29:41 +0000 | [diff] [blame] | 8 | |
Daniel Veillard | 4cf998a | 2002-02-02 10:42:43 +0000 | [diff] [blame] | 9 | EXTRA_DIST = \ |
Daniel Veillard | a6d2e9e | 2002-03-09 10:22:50 +0000 | [diff] [blame] | 10 | setup.py \ |
Daniel Veillard | 4cf998a | 2002-02-02 10:42:43 +0000 | [diff] [blame] | 11 | generator.py \ |
Daniel Veillard | 4cf998a | 2002-02-02 10:42:43 +0000 | [diff] [blame] | 12 | libxml.py \ |
Daniel Richard G | d10a72c | 2012-08-14 12:50:25 +0800 | [diff] [blame] | 13 | libxml2-export.c \ |
| 14 | libxml2-python-api.xml \ |
| 15 | libxml2class.py \ |
| 16 | libxml2class.txt |
Daniel Veillard | d237901 | 2002-03-15 22:24:56 +0000 | [diff] [blame] | 17 | |
Daniel Veillard | f1d0e6b | 2002-01-31 23:42:44 +0000 | [diff] [blame] | 18 | if WITH_PYTHON |
Daniel Richard G | d10a72c | 2012-08-14 12:50:25 +0800 | [diff] [blame] | 19 | AM_CPPFLAGS = \ |
| 20 | -I$(top_builddir)/include \ |
| 21 | -I$(top_srcdir)/include \ |
| 22 | -I$(PYTHON_INCLUDES) |
Daniel Veillard | 5e5c2d0 | 2002-02-09 18:03:01 +0000 | [diff] [blame] | 23 | |
Daniel Veillard | d237901 | 2002-03-15 22:24:56 +0000 | [diff] [blame] | 24 | python_LTLIBRARIES = libxml2mod.la |
Daniel Veillard | 5e5c2d0 | 2002-02-09 18:03:01 +0000 | [diff] [blame] | 25 | |
Daniel Richard G | d10a72c | 2012-08-14 12:50:25 +0800 | [diff] [blame] | 26 | libxml2mod_la_SOURCES = libxml.c libxml_wrap.h libxml2-py.h libxml2-py.c types.c |
Daniel Veillard | c0a8dd1 | 2013-04-19 15:02:33 +0800 | [diff] [blame] | 27 | libxml2mod_la_LDFLAGS = $(CYGWIN_EXTRA_LDFLAGS) $(WIN32_EXTRA_LDFLAGS) -module -avoid-version \ |
| 28 | $(top_builddir)/libxml2.la $(CYGWIN_EXTRA_PYTHON_LIBADD) $(WIN32_EXTRA_PYTHON_LIBADD) $(PYTHON_LIBS) |
Daniel Veillard | 96c9af7 | 2002-02-01 00:06:44 +0000 | [diff] [blame] | 29 | |
Daniel Richard G | d10a72c | 2012-08-14 12:50:25 +0800 | [diff] [blame] | 30 | BUILT_SOURCES = libxml2-export.c libxml2-py.h libxml2-py.c |
Daniel Veillard | 5ac8823 | 2008-02-19 07:54:52 +0000 | [diff] [blame] | 31 | |
Daniel Richard G | d10a72c | 2012-08-14 12:50:25 +0800 | [diff] [blame] | 32 | # libxml.c #includes libxml2-export.c |
| 33 | libxml.$(OBJEXT): libxml2-export.c |
Daniel Veillard | 5ac8823 | 2008-02-19 07:54:52 +0000 | [diff] [blame] | 34 | |
William M. Brack | 106cad6 | 2004-12-23 15:56:12 +0000 | [diff] [blame] | 35 | libxml2.py: $(srcdir)/libxml.py libxml2class.py |
Daniel Richard G | d10a72c | 2012-08-14 12:50:25 +0800 | [diff] [blame] | 36 | cat $(srcdir)/libxml.py `test -f libxml2class.py || echo $(srcdir)/`libxml2class.py > $@ |
Daniel Veillard | f1d0e6b | 2002-01-31 23:42:44 +0000 | [diff] [blame] | 37 | |
Daniel Veillard | 5ac8823 | 2008-02-19 07:54:52 +0000 | [diff] [blame] | 38 | dist_python_DATA = \ |
Daniel Richard G | d10a72c | 2012-08-14 12:50:25 +0800 | [diff] [blame] | 39 | drv_libxml2.py \ |
| 40 | libxml2.py |
Daniel Veillard | 9ebb632 | 2008-01-11 07:19:24 +0000 | [diff] [blame] | 41 | |
Daniel Richard G | d10a72c | 2012-08-14 12:50:25 +0800 | [diff] [blame] | 42 | CLEANFILES = *.pyc |
| 43 | |
| 44 | MAINTAINERCLEANFILES = libxml2.py libxml2class.* |
| 45 | |
Daniel Veillard | 9589d45 | 2002-02-02 10:28:17 +0000 | [diff] [blame] | 46 | API_DESC = $(top_srcdir)/doc/libxml2-api.xml $(srcdir)/libxml2-python-api.xml |
Daniel Richard G | d10a72c | 2012-08-14 12:50:25 +0800 | [diff] [blame] | 47 | GENERATED = libxml2class.py libxml2class.txt $(BUILT_SOURCES) |
Daniel Veillard | f1d0e6b | 2002-01-31 23:42:44 +0000 | [diff] [blame] | 48 | |
Daniel Richard G | d10a72c | 2012-08-14 12:50:25 +0800 | [diff] [blame] | 49 | $(GENERATED): $(srcdir)/generator.py $(API_DESC) |
| 50 | $(PYTHON) $(srcdir)/generator.py $(srcdir) |
Daniel Veillard | 7db3871 | 2002-02-07 16:39:11 +0000 | [diff] [blame] | 51 | endif |
Daniel Veillard | 5ac8823 | 2008-02-19 07:54:52 +0000 | [diff] [blame] | 52 | |
Daniel Veillard | 5997aca | 2002-03-18 18:36:20 +0000 | [diff] [blame] | 53 | tests test: all |
Daniel Richard G | 5706b6d | 2012-08-06 11:32:54 +0800 | [diff] [blame] | 54 | cd tests && $(MAKE) tests |