* python/libvir.c: fixed a bug in the new wrapper
[libvirt-python/ericb.git] / Makefile.am
blobf0d75a7325fd472cd8f5ee70f28711313707cbc4
1 # Makefile for libvirt python library
3 SUBDIRS= . tests
5 INCLUDES = \
6         -I$(PYTHON_INCLUDES) \
7         -I$(top_srcdir)/include \
8         -I$(top_builddir)/include \
9         -I$(top_builddir)/$(subdir)
11 DOCS_DIR = $(datadir)/doc/libvirt-python-$(LIBVIRT_VERSION)
13 DOCS = ${srcdir}/TODO
15 EXTRA_DIST =            \
16         libvir.c        \
17         types.c         \
18         generator.py    \
19         libvirt_wrap.h  \
20         libvirt.py      \
21         libvir.py       \
22         libvirt-python-api.xml \
23         $(DOCS)
25 libvirtmod_la_LDFLAGS = -module -avoid-version -L$(top_builddir)/src/.libs
27 if WITH_PYTHON
28 mylibs = $(top_builddir)/src/libvirt.la
30 all-local: libvirt.py
32 python_LTLIBRARIES = libvirtmod.la
34 libvirtmod_la_SOURCES = libvir.c types.c libvirt-py.c libvirt-py.h
35 libvirtmod_la_LIBADD = $(mylibs) 
37 libvirt.py: $(srcdir)/libvir.py libvirtclass.py
38         cat $(srcdir)/libvir.py libvirtclass.py > libvirt.py
40 install-data-local:
41         $(mkinstalldirs) $(DESTDIR)$(pythondir)
42         @INSTALL@ -m 0644 libvirt.py $(DESTDIR)$(pythondir)
43         $(mkinstalldirs) $(DESTDIR)$(DOCS_DIR)
44         @(for doc in $(DOCS) ; \
45            do @INSTALL@ -m 0644 $$doc $(DESTDIR)$(DOCS_DIR) ; done)
47 GENERATE = generator.py
48 API_DESC = $(top_srcdir)/docs/libvirt-api.xml $(srcdir)/libvirt-python-api.xml
49 GENERATED= libvirt.py \
50            libvirt-export.c \
51            libvirtclass.txt \
52            libvirt-py.c \
53            libvirt-py.h \
54            libvirtclass.py
56 CLEANFILES= $(GENERATED) gen_prog libvirt.py
58 $(GENERATED): gen_prog
60 gen_prog: $(srcdir)/$(GENERATE) $(API_DESC)
61         $(PYTHON) $(srcdir)/$(GENERATE) $(srcdir)
62         touch gen_prog
64 $(libvirtmod_la_OBJECTS): $(GENERATED)
66 else
67 all: 
68 endif
70 dummy:
72 tests test: all dummy
73         -@(cd tests && $(MAKE) MAKEFLAGS+=--silent tests)