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