Makefile.am 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. # Makefile for libxml2 python library
  2. AUTOMAKE_OPTIONS = 1.4 foreign
  3. SUBDIRS= . tests
  4. INCLUDES = \
  5. -I$(PYTHON_INCLUDES) \
  6. -I$(top_srcdir)/include \
  7. -I$(top_builddir)/include \
  8. -I$(top_builddir)/$(subdir)
  9. docsdir = $(datadir)/doc/libxml2-python-$(LIBXML_VERSION)
  10. # libxml2class.txt is generated
  11. dist_docs_DATA = TODO
  12. EXTRA_DIST = \
  13. setup.py \
  14. setup.py.in \
  15. generator.py \
  16. libxml_wrap.h \
  17. libxml.py \
  18. libxml2-python-api.xml
  19. libxml2mod_la_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@ @WIN32_EXTRA_LDFLAGS@ -module -avoid-version
  20. if WITH_PYTHON
  21. mylibs = \
  22. $(top_builddir)/libxml2.la
  23. python_LTLIBRARIES = libxml2mod.la
  24. libxml2mod_la_SOURCES = $(srcdir)/libxml.c $(srcdir)/types.c
  25. nodist_libxml2mod_la_SOURCES = libxml2-py.c
  26. libxml2mod_la_LIBADD = $(mylibs) @CYGWIN_EXTRA_PYTHON_LIBADD@ @PYTHON_LIBS@
  27. $(srcdir)/libxml.c: libxml2-py.h # to generate before to compile
  28. libxml2.py: $(srcdir)/libxml.py libxml2class.py
  29. cat $(srcdir)/libxml.py libxml2class.py > $@
  30. python_DATA = \
  31. libxml2.py
  32. dist_python_DATA = \
  33. drv_libxml2.py
  34. GENERATE = generator.py
  35. API_DESC = $(top_srcdir)/doc/libxml2-api.xml $(srcdir)/libxml2-python-api.xml
  36. GENERATED= libxml2class.py \
  37. libxml2-export.c \
  38. libxml2class.txt \
  39. libxml2-py.c \
  40. libxml2-py.h
  41. CLEANFILES= $(GENERATED) gen_prog libxml2.py
  42. $(GENERATED): gen_prog
  43. gen_prog: $(srcdir)/$(GENERATE) $(API_DESC)
  44. $(PYTHON) $(srcdir)/$(GENERATE) $(srcdir)
  45. touch gen_prog
  46. endif
  47. tests test: all
  48. cd tests && $(MAKE) MAKEFLAGS+=--silent tests