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 | 5fc1f08 | 2002-03-27 09:05:40 +0000 | [diff] [blame] | 12 | DOCS_DIR = $(datadir)/doc/libxml2-python-$(LIBXML_VERSION) |
Daniel Veillard | d237901 | 2002-03-15 22:24:56 +0000 | [diff] [blame] | 13 | # libxml2class.txt is generated |
William M. Brack | cafe885 | 2003-12-21 10:14:35 +0000 | [diff] [blame] | 14 | DOCS = ${srcdir}/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 = \ |
| 17 | libxml.c \ |
Daniel Veillard | 3ce5257 | 2002-02-03 15:08:05 +0000 | [diff] [blame] | 18 | types.c \ |
Daniel Veillard | a6d2e9e | 2002-03-09 10:22:50 +0000 | [diff] [blame] | 19 | setup.py \ |
| 20 | setup.py.in \ |
Daniel Veillard | 4cf998a | 2002-02-02 10:42:43 +0000 | [diff] [blame] | 21 | generator.py \ |
| 22 | libxml_wrap.h \ |
| 23 | libxml.py \ |
Daniel Veillard | 7b4b2f9 | 2003-01-06 13:11:20 +0000 | [diff] [blame] | 24 | drv_libxml2.py \ |
Daniel Veillard | 4cf998a | 2002-02-02 10:42:43 +0000 | [diff] [blame] | 25 | libxml2-python-api.xml \ |
Daniel Veillard | 253aa2c | 2002-02-02 09:17:16 +0000 | [diff] [blame] | 26 | $(DOCS) |
Daniel Veillard | c3e3944 | 2002-02-01 09:29:41 +0000 | [diff] [blame] | 27 | |
Daniel Veillard | d392ba7 | 2004-08-04 14:56:45 +0000 | [diff] [blame] | 28 | libxml2mod_la_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@ @WIN32_EXTRA_LDFLAGS@ -module -avoid-version -L$(top_builddir)/.libs |
Daniel Veillard | d237901 | 2002-03-15 22:24:56 +0000 | [diff] [blame] | 29 | |
Daniel Veillard | f1d0e6b | 2002-01-31 23:42:44 +0000 | [diff] [blame] | 30 | if WITH_PYTHON |
Daniel Veillard | 5e5c2d0 | 2002-02-09 18:03:01 +0000 | [diff] [blame] | 31 | mylibs = \ |
| 32 | $(top_builddir)/libxml2.la |
| 33 | |
Daniel Veillard | 08cccaa | 2002-08-22 09:47:29 +0000 | [diff] [blame] | 34 | all-local: libxml2.py |
Daniel Veillard | 5e5c2d0 | 2002-02-09 18:03:01 +0000 | [diff] [blame] | 35 | |
Daniel Veillard | d237901 | 2002-03-15 22:24:56 +0000 | [diff] [blame] | 36 | python_LTLIBRARIES = libxml2mod.la |
Daniel Veillard | 5e5c2d0 | 2002-02-09 18:03:01 +0000 | [diff] [blame] | 37 | |
Daniel Veillard | d237901 | 2002-03-15 22:24:56 +0000 | [diff] [blame] | 38 | libxml2mod_la_SOURCES = libxml.c types.c libxml2-py.c |
Daniel Veillard | d392ba7 | 2004-08-04 14:56:45 +0000 | [diff] [blame] | 39 | libxml2mod_la_LIBADD = $(mylibs) @CYGWIN_EXTRA_PYTHON_LIBADD@ |
Daniel Veillard | 96c9af7 | 2002-02-01 00:06:44 +0000 | [diff] [blame] | 40 | |
William M. Brack | 106cad6 | 2004-12-23 15:56:12 +0000 | [diff] [blame] | 41 | libxml2.py: $(srcdir)/libxml.py libxml2class.py |
| 42 | cat $(srcdir)/libxml.py libxml2class.py > libxml2.py |
Daniel Veillard | f1d0e6b | 2002-01-31 23:42:44 +0000 | [diff] [blame] | 43 | |
Daniel Veillard | 7a96efc | 2002-02-05 16:34:33 +0000 | [diff] [blame] | 44 | install-data-local: |
Daniel Veillard | 38b80a8 | 2003-05-14 18:59:00 +0000 | [diff] [blame] | 45 | $(mkinstalldirs) $(DESTDIR)$(pythondir) |
| 46 | @INSTALL@ -m 0644 libxml2.py $(DESTDIR)$(pythondir) |
William M. Brack | cafe885 | 2003-12-21 10:14:35 +0000 | [diff] [blame] | 47 | @INSTALL@ -m 0644 $(srcdir)/drv_libxml2.py $(DESTDIR)$(pythondir) |
Daniel Veillard | 2206dbf | 2002-09-05 08:09:37 +0000 | [diff] [blame] | 48 | $(mkinstalldirs) $(DESTDIR)$(DOCS_DIR) |
Daniel Veillard | 08cccaa | 2002-08-22 09:47:29 +0000 | [diff] [blame] | 49 | @(for doc in $(DOCS) ; \ |
Daniel Veillard | 2206dbf | 2002-09-05 08:09:37 +0000 | [diff] [blame] | 50 | do @INSTALL@ -m 0644 $$doc $(DESTDIR)$(DOCS_DIR) ; done) |
Daniel Veillard | f1d0e6b | 2002-01-31 23:42:44 +0000 | [diff] [blame] | 51 | |
Daniel Veillard | f1d0e6b | 2002-01-31 23:42:44 +0000 | [diff] [blame] | 52 | GENERATE = generator.py |
Daniel Veillard | 9589d45 | 2002-02-02 10:28:17 +0000 | [diff] [blame] | 53 | 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] | 54 | GENERATED= libxml2class.py \ |
| 55 | libxml2-export.c \ |
| 56 | libxml2class.txt \ |
| 57 | libxml2-py.c \ |
| 58 | libxml2-py.h |
Daniel Veillard | f1d0e6b | 2002-01-31 23:42:44 +0000 | [diff] [blame] | 59 | |
Daniel Veillard | 377e1a9 | 2004-04-16 16:30:05 +0000 | [diff] [blame] | 60 | CLEANFILES= $(GENERATED) gen_prog libxml2.py |
| 61 | |
William M. Brack | 61eaba5 | 2002-07-21 11:14:18 +0000 | [diff] [blame] | 62 | $(GENERATED): gen_prog |
| 63 | |
| 64 | gen_prog: $(srcdir)/$(GENERATE) $(API_DESC) |
William M. Brack | 106cad6 | 2004-12-23 15:56:12 +0000 | [diff] [blame] | 65 | $(PYTHON) $(srcdir)/$(GENERATE) $(srcdir) |
William M. Brack | 61eaba5 | 2002-07-21 11:14:18 +0000 | [diff] [blame] | 66 | touch gen_prog |
Daniel Veillard | 1c18e30 | 2002-02-09 22:16:40 +0000 | [diff] [blame] | 67 | |
Daniel Veillard | 38bf6f0 | 2002-03-16 22:03:31 +0000 | [diff] [blame] | 68 | $(libxml2mod_la_OBJECTS): $(GENERATED) |
Daniel Veillard | 5997aca | 2002-03-18 18:36:20 +0000 | [diff] [blame] | 69 | |
Daniel Veillard | 7db3871 | 2002-02-07 16:39:11 +0000 | [diff] [blame] | 70 | else |
| 71 | all: |
| 72 | endif |
Daniel Veillard | 5997aca | 2002-03-18 18:36:20 +0000 | [diff] [blame] | 73 | tests test: all |
William M. Brack | e9449c5 | 2004-07-11 14:41:20 +0000 | [diff] [blame] | 74 | cd tests && $(MAKE) MAKEFLAGS+=--silent tests |
Daniel Veillard | cfb0546 | 2002-02-02 23:18:22 +0000 | [diff] [blame] | 75 | |