OLD | NEW |
(Empty) | |
| 1 # Makefile for libxml2 python library |
| 2 AUTOMAKE_OPTIONS = 1.4 foreign |
| 3 |
| 4 SUBDIRS= . tests |
| 5 |
| 6 AM_CFLAGS = $(LIBXML_CFLAGS) |
| 7 |
| 8 DOCS_DIR = $(datadir)/doc/libxslt-python-$(LIBXSLT_VERSION) |
| 9 # libxsltclass.txt is generated |
| 10 DOCS = TODO |
| 11 |
| 12 EXTRA_DIST = \ |
| 13 libxslt.c \ |
| 14 types.c \ |
| 15 generator.py \ |
| 16 libxml_wrap.h \ |
| 17 libxslt_wrap.h \ |
| 18 libxsl.py \ |
| 19 libxslt-python-api.xml \ |
| 20 $(DOCS) |
| 21 |
| 22 libxsltmod_la_LDFLAGS = $(WIN32_EXTRA_LDFLAGS) -module -avoid-version |
| 23 |
| 24 if WITH_PYTHON |
| 25 mylibs = \ |
| 26 $(top_builddir)/libxslt/libxslt.la \ |
| 27 $(top_builddir)/libexslt/libexslt.la |
| 28 |
| 29 all-local: libxslt.py |
| 30 |
| 31 python_LTLIBRARIES = libxsltmod.la |
| 32 |
| 33 libxsltmod_la_CPPFLAGS = \ |
| 34 -I$(PYTHON_INCLUDES) \ |
| 35 -I$(top_srcdir)/libxslt \ |
| 36 -I$(top_srcdir) \ |
| 37 -I../libexslt |
| 38 libxsltmod_la_SOURCES = libxslt.c types.c |
| 39 nodist_libxsltmod_la_SOURCES = libxslt-py.c |
| 40 libxsltmod_la_LIBADD = $(mylibs) $(PYTHON_LIBS) |
| 41 |
| 42 libxslt.py: $(srcdir)/libxsl.py libxsltclass.py |
| 43 cat $(srcdir)/libxsl.py libxsltclass.py > $@ |
| 44 |
| 45 install-data-local: |
| 46 $(MKDIR_P) $(DESTDIR)$(pythondir) |
| 47 $(INSTALL) -m 0644 libxslt.py $(DESTDIR)$(pythondir) |
| 48 $(MKDIR_P) $(DESTDIR)$(DOCS_DIR) |
| 49 @(for doc in $(DOCS) ; \ |
| 50 do $(INSTALL) -m 0644 $(srcdir)/$$doc $(DESTDIR)$(DOCS_DIR) ; done) |
| 51 |
| 52 uninstall-local: |
| 53 rm -f $(DESTDIR)$(pythondir)/libxslt.py |
| 54 rm -rf $(DESTDIR)$(DOCS_DIR) |
| 55 |
| 56 GENERATE = generator.py |
| 57 API_DESC = $(top_srcdir)/doc/libxslt-api.xml $(srcdir)/libxslt-python-api.xml |
| 58 GENERATED= libxsltclass.py \ |
| 59 libxslt-export.c \ |
| 60 libxslt-py.c \ |
| 61 libxslt-py.h \ |
| 62 libxsltclass.txt |
| 63 |
| 64 $(GENERATED): gen_prog |
| 65 |
| 66 gen_prog: $(srcdir)/$(GENERATE) $(API_DESC) |
| 67 SRCDIR=$(srcdir) $(PYTHON) $(srcdir)/$(GENERATE) |
| 68 touch gen_prog |
| 69 |
| 70 $(libxsltmod_la_OBJECTS): $(GENERATED) |
| 71 |
| 72 endif |
| 73 |
| 74 tests test: all |
| 75 cd tests && $(MAKE) tests |
| 76 |
| 77 CLEANFILES= $(GENERATED) *.o libxslt.so *.pyc libxslt.py gen_prog |
OLD | NEW |