summaryrefslogtreecommitdiff
path: root/python/Makefile.am
diff options
context:
space:
mode:
authorMike Hommey <mh@glandium.org>2004-03-25 06:59:32 +0000
committerMike Hommey <mh@glandium.org>2004-03-25 06:59:32 +0000
commitd09ab089457ae3c20cc98f9afa03379c6ebf9598 (patch)
treef34702d634972abbc1b478a4529149b548a1cd4c /python/Makefile.am
downloadlibxml2-d09ab089457ae3c20cc98f9afa03379c6ebf9598.tar.gz
[svn-inject] Installing original source versionupstream/2.6.8
Diffstat (limited to 'python/Makefile.am')
-rw-r--r--python/Makefile.am73
1 files changed, 73 insertions, 0 deletions
diff --git a/python/Makefile.am b/python/Makefile.am
new file mode 100644
index 0000000..8782efb
--- /dev/null
+++ b/python/Makefile.am
@@ -0,0 +1,73 @@
+# Makefile for libxml2 python library
+AUTOMAKE_OPTIONS = 1.4 foreign
+
+SUBDIRS= . tests
+
+INCLUDES = \
+ -I$(PYTHON_INCLUDES) \
+ -I$(top_srcdir)/include
+
+DOCS_DIR = $(datadir)/doc/libxml2-python-$(LIBXML_VERSION)
+# libxml2class.txt is generated
+DOCS = ${srcdir}/TODO
+
+EXTRA_DIST = \
+ libxml.c \
+ types.c \
+ setup.py \
+ setup.py.in \
+ generator.py \
+ libxml_wrap.h \
+ libxml.py \
+ drv_libxml2.py \
+ libxml2-python-api.xml \
+ $(DOCS)
+
+libxml2mod_la_LDFLAGS = -module -avoid-version -L$(top_builddir)/.libs
+
+if WITH_PYTHON
+mylibs = \
+ $(top_builddir)/libxml2.la
+
+all-local: libxml2.py
+
+python_LTLIBRARIES = libxml2mod.la
+
+libxml2mod_la_SOURCES = libxml.c types.c libxml2-py.c
+libxml2mod_la_LIBADD = $(mylibs)
+
+libxml2.py: $(srcdir)/libxml.py $(srcdir)/libxml2class.py
+ cat $(srcdir)/libxml.py $(srcdir)/libxml2class.py > libxml2.py
+
+install-data-local:
+ $(mkinstalldirs) $(DESTDIR)$(pythondir)
+ @INSTALL@ -m 0644 libxml2.py $(DESTDIR)$(pythondir)
+ @INSTALL@ -m 0644 $(srcdir)/drv_libxml2.py $(DESTDIR)$(pythondir)
+ $(mkinstalldirs) $(DESTDIR)$(DOCS_DIR)
+ @(for doc in $(DOCS) ; \
+ do @INSTALL@ -m 0644 $$doc $(DESTDIR)$(DOCS_DIR) ; done)
+
+GENERATE = generator.py
+API_DESC = $(top_srcdir)/doc/libxml2-api.xml $(srcdir)/libxml2-python-api.xml
+GENERATED= $(srcdir)/libxml2class.py \
+ $(srcdir)/libxml2-export.c \
+ $(srcdir)/libxml2-py.c \
+ $(srcdir)/libxml2-py.h
+
+$(GENERATED): gen_prog
+
+gen_prog: $(srcdir)/$(GENERATE) $(API_DESC)
+ cd $(srcdir) && $(PYTHON) $(GENERATE)
+ touch gen_prog
+
+$(libxml2mod_la_OBJECTS): $(GENERATED)
+
+else
+all:
+endif
+tests test: all
+ cd tests && $(MAKE) tests
+
+clean:
+ rm -f $(GENERATED) *.o _libxml.so *.pyc libxml2.py gen_prog
+