Tag
Hash :
7db3871b
Author :
Date :
2002-02-07T16:39:11
cleanup always use stdout if output is NULL don't close filedescriptors * Makefile.am: cleanup * debugXML.c: always use stdout if output is NULL * xmlIO.c: don't close filedescriptors passed to outputBuffers * python/Makefile.am python/generator.py python/libxml2class.txt python/libxml_wrap.h python/types.c: augmented the number of bindings handling FILE * and XPath contexts * python/tests/Makefile.am: avoid a stupid problem due to the use of TEST. Daniel
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
SUBDIRS= . tests
LIBS=-L../.libs -L.. $(XML_LIBS)
INCLUDES=-I/usr/include/python$(PYTHON_VERSION) -I$(PYTHON_INCLUDES) -I$(top_srcdir)/include
SHCFLAGS=$(INCLUDES) -Wall -fPIC -g
LINK_FLAGS= -shared
DOCS_DIR = $(prefix)/share/doc/libxml2-python-$(LIBXML_VERSION)
DOCS = TODO libxml2class.txt
EXTRA_DIST = \
libxml.c \
types.c \
generator.py \
libxml_wrap.h \
libxml.py \
libxml2-python-api.xml \
$(DOCS)
if WITH_PYTHON
all: _libxml.so libxml2.py
libxml2.py: $(srcdir)/libxml.py libxml2class.py
cat $(srcdir)/libxml.py libxml2class.py > libxml2.py
_libxml.so: libxml.o libxml2-py.o types.o
$(CC) $(LINK_FLAGS) libxml.o libxml2-py.o types.o $(LIBS) -o _libxml.so
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(PYTHON_SITE_PACKAGES)
-@INSTALL@ -m 0644 libxml2.py $(DESTDIR)$(PYTHON_SITE_PACKAGES)
-@INSTALL@ -m 0755 _libxml.so $(DESTDIR)$(PYTHON_SITE_PACKAGES)
$(mkinstalldirs) $(DESTDIR)$(DOCS_DIR)
-@(for doc in $(DOCS) ; \
do @INSTALL@ -m 0644 $$doc $(DESTDIR)$(DOCS_DIR) ; done)
libxml.o: libxml.c libxml2-export.c libxml_wrap.h
$(CC) $(SHCFLAGS) -c -o libxml.o $(srcdir)/libxml.c
types.o: types.c libxml_wrap.h
$(CC) $(SHCFLAGS) -c -o types.o $(srcdir)/types.c
libxml2-py.o: libxml2-py.c libxml2-py.h libxml_wrap.h
$(CC) $(SHCFLAGS) -c -o libxml2-py.o $(srcdir)/libxml2-py.c
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): $(srcdir)/$(GENERATE) $(API_DESC)
cd $(srcdir) && $(PYTHON) $(GENERATE)
else
all:
endif
tests: all
cd tests && $(MAKE) tests
clean:
rm -f $(GENERATED) *.o _libxml.so *.pyc libxml2.py