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 Veillard | 253aa2c | 2002-02-02 09:17:16 +0000 | [diff] [blame] | 4 | SUBDIRS= . tests |
| 5 | |
Daniel Veillard | 5e5c2d0 | 2002-02-09 18:03:01 +0000 | [diff] [blame] | 6 | INCLUDES = \ |
Daniel Veillard | 5e5c2d0 | 2002-02-09 18:03:01 +0000 | [diff] [blame] | 7 | -I$(PYTHON_INCLUDES) \ |
Daniel Veillard | 43b8e57 | 2004-10-12 22:20:10 +0000 | [diff] [blame] | 8 | -I$(top_srcdir)/include \ |
William M. Brack | 106cad6 | 2004-12-23 15:56:12 +0000 | [diff] [blame] | 9 | -I$(top_builddir)/include \ |
| 10 | -I$(top_builddir)/$(subdir) |
Daniel Veillard | 253aa2c | 2002-02-02 09:17:16 +0000 | [diff] [blame] | 11 | |
Daniel Veillard | 5ac8823 | 2008-02-19 07:54:52 +0000 | [diff] [blame] | 12 | docsdir = $(datadir)/doc/libxml2-python-$(LIBXML_VERSION) |
Daniel Veillard | d237901 | 2002-03-15 22:24:56 +0000 | [diff] [blame] | 13 | # libxml2class.txt is generated |
Daniel Veillard | 5ac8823 | 2008-02-19 07:54:52 +0000 | [diff] [blame] | 14 | dist_docs_DATA = TODO |
Daniel Veillard | c3e3944 | 2002-02-01 09:29:41 +0000 | [diff] [blame] | 15 | |
Daniel Veillard | 4cf998a | 2002-02-02 10:42:43 +0000 | [diff] [blame] | 16 | EXTRA_DIST = \ |
Daniel Veillard | a6d2e9e | 2002-03-09 10:22:50 +0000 | [diff] [blame] | 17 | setup.py \ |
| 18 | setup.py.in \ |
Daniel Veillard | 4cf998a | 2002-02-02 10:42:43 +0000 | [diff] [blame] | 19 | generator.py \ |
| 20 | libxml_wrap.h \ |
| 21 | libxml.py \ |
Daniel Veillard | 5ac8823 | 2008-02-19 07:54:52 +0000 | [diff] [blame] | 22 | libxml2-python-api.xml |
Daniel Veillard | c3e3944 | 2002-02-01 09:29:41 +0000 | [diff] [blame] | 23 | |
Daniel Veillard | 04db684 | 2006-10-11 09:27:56 +0000 | [diff] [blame] | 24 | libxml2mod_la_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@ @WIN32_EXTRA_LDFLAGS@ -module -avoid-version |
Daniel Veillard | d237901 | 2002-03-15 22:24:56 +0000 | [diff] [blame] | 25 | |
Daniel Veillard | f1d0e6b | 2002-01-31 23:42:44 +0000 | [diff] [blame] | 26 | if WITH_PYTHON |
Daniel Veillard | 5e5c2d0 | 2002-02-09 18:03:01 +0000 | [diff] [blame] | 27 | mylibs = \ |
| 28 | $(top_builddir)/libxml2.la |
| 29 | |
Daniel Veillard | d237901 | 2002-03-15 22:24:56 +0000 | [diff] [blame] | 30 | python_LTLIBRARIES = libxml2mod.la |
Daniel Veillard | 5e5c2d0 | 2002-02-09 18:03:01 +0000 | [diff] [blame] | 31 | |
Paul Smith | 38af74f | 2010-03-15 10:22:25 +0100 | [diff] [blame] | 32 | libxml2mod_la_SOURCES = $(srcdir)/libxml.c $(srcdir)/types.c |
Daniel Veillard | 5ac8823 | 2008-02-19 07:54:52 +0000 | [diff] [blame] | 33 | nodist_libxml2mod_la_SOURCES = libxml2-py.c |
Pacho Ramos | 1ea6b14 | 2012-05-15 19:36:02 +0800 | [diff] [blame] | 34 | libxml2mod_la_LIBADD = $(mylibs) @CYGWIN_EXTRA_PYTHON_LIBADD@ @WIN32_EXTRA_PYTHON_LIBADD@ @PYTHON_LIBS@ -lpython$(PYTHON_VERSION) |
Daniel Veillard | 96c9af7 | 2002-02-01 00:06:44 +0000 | [diff] [blame] | 35 | |
Paul Smith | 38af74f | 2010-03-15 10:22:25 +0100 | [diff] [blame] | 36 | $(srcdir)/libxml.c: libxml2-py.h # to generate before to compile |
Daniel Veillard | 5ac8823 | 2008-02-19 07:54:52 +0000 | [diff] [blame] | 37 | |
| 38 | |
William M. Brack | 106cad6 | 2004-12-23 15:56:12 +0000 | [diff] [blame] | 39 | libxml2.py: $(srcdir)/libxml.py libxml2class.py |
Daniel Veillard | 5ac8823 | 2008-02-19 07:54:52 +0000 | [diff] [blame] | 40 | cat $(srcdir)/libxml.py libxml2class.py > $@ |
Daniel Veillard | f1d0e6b | 2002-01-31 23:42:44 +0000 | [diff] [blame] | 41 | |
Daniel Veillard | 5ac8823 | 2008-02-19 07:54:52 +0000 | [diff] [blame] | 42 | python_DATA = \ |
| 43 | libxml2.py |
Daniel Veillard | f1d0e6b | 2002-01-31 23:42:44 +0000 | [diff] [blame] | 44 | |
Daniel Veillard | 5ac8823 | 2008-02-19 07:54:52 +0000 | [diff] [blame] | 45 | dist_python_DATA = \ |
| 46 | drv_libxml2.py |
Daniel Veillard | 9ebb632 | 2008-01-11 07:19:24 +0000 | [diff] [blame] | 47 | |
Daniel Veillard | f1d0e6b | 2002-01-31 23:42:44 +0000 | [diff] [blame] | 48 | GENERATE = generator.py |
Daniel Veillard | 9589d45 | 2002-02-02 10:28:17 +0000 | [diff] [blame] | 49 | API_DESC = $(top_srcdir)/doc/libxml2-api.xml $(srcdir)/libxml2-python-api.xml |
William M. Brack | 106cad6 | 2004-12-23 15:56:12 +0000 | [diff] [blame] | 50 | GENERATED= libxml2class.py \ |
| 51 | libxml2-export.c \ |
| 52 | libxml2class.txt \ |
| 53 | libxml2-py.c \ |
| 54 | libxml2-py.h |
Daniel Veillard | f1d0e6b | 2002-01-31 23:42:44 +0000 | [diff] [blame] | 55 | |
Daniel Veillard | 377e1a9 | 2004-04-16 16:30:05 +0000 | [diff] [blame] | 56 | CLEANFILES= $(GENERATED) gen_prog libxml2.py |
| 57 | |
William M. Brack | 61eaba5 | 2002-07-21 11:14:18 +0000 | [diff] [blame] | 58 | $(GENERATED): gen_prog |
| 59 | |
| 60 | gen_prog: $(srcdir)/$(GENERATE) $(API_DESC) |
William M. Brack | 106cad6 | 2004-12-23 15:56:12 +0000 | [diff] [blame] | 61 | $(PYTHON) $(srcdir)/$(GENERATE) $(srcdir) |
William M. Brack | 61eaba5 | 2002-07-21 11:14:18 +0000 | [diff] [blame] | 62 | touch gen_prog |
Daniel Veillard | 7db3871 | 2002-02-07 16:39:11 +0000 | [diff] [blame] | 63 | endif |
Daniel Veillard | 5ac8823 | 2008-02-19 07:54:52 +0000 | [diff] [blame] | 64 | |
Daniel Veillard | 5997aca | 2002-03-18 18:36:20 +0000 | [diff] [blame] | 65 | tests test: all |
William M. Brack | e9449c5 | 2004-07-11 14:41:20 +0000 | [diff] [blame] | 66 | cd tests && $(MAKE) MAKEFLAGS+=--silent tests |
Daniel Veillard | cfb0546 | 2002-02-02 23:18:22 +0000 | [diff] [blame] | 67 | |