libvirt/python/Makefile.am
Jim Meyering eabb98b0a8 gnulib added a new syntax-check test: use $(VAR), not @VAR@
The latter is not officially "wrong", but *is* terribly anachronistic.
I think automake documentation or comments call that syntax obsolescent.
* cfg.mk (_makefile_at_at_check_exceptions): Exempt @SCHEMADIR@
and @SYSCONFDIR@ uses -- there are no Makefile variables for those.
* docs/Makefile.am: Use $(INSTALL), not @INSTALL@.
* examples/dominfo/Makefile.am: Similar.
* examples/domsuspend/Makefile.am: Similar.
* proxy/Makefile.am: Similar.
* python/Makefile.am: Similar.
* python/tests/Makefile.am: Similar.
* src/Makefile.am: Similar.
* tests/Makefile.am: Similar.
2010-01-18 09:50:08 +01:00

82 lines
1.8 KiB
Makefile

# Makefile for libvirt python library
SUBDIRS= . tests
INCLUDES = \
$(WARN_CFLAGS) \
$(PYTHON_INCLUDES) \
-I$(top_srcdir)/include \
-I$(top_builddir)/include \
-I$(top_builddir)/$(subdir)
DOCS_DIR = $(datadir)/doc/libvirt-python-$(LIBVIRT_VERSION)
DOCS = ${srcdir}/TODO
CLASSES_EXTRA = \
libvirt-override-virConnect.py \
libvirt-override-virStream.py
EXTRA_DIST = \
generator.py \
typewrappers.c \
typewrappers.h \
libvirt-override.c \
libvirt-override.py \
libvirt-override-api.xml \
$(CLASSES_EXTRA) \
$(DOCS)
if WITH_PYTHON
mylibs = $(top_builddir)/src/libvirt.la
all-local: libvirt.py
pyexec_LTLIBRARIES = libvirtmod.la
libvirtmod_la_SOURCES = libvirt-override.c typewrappers.c libvirt.c libvirt.h
# Python <= 2.4 header files contain a redundant decl, hence we
# need extra flags here
libvirtmod_la_CFLAGS = $(WARN_PYTHON_CFLAGS)
libvirtmod_la_LDFLAGS = -module -avoid-version -shared -L$(top_builddir)/src/.libs \
$(CYGWIN_EXTRA_LDFLAGS)
libvirtmod_la_LIBADD = $(mylibs) \
$(CYGWIN_EXTRA_LIBADD) $(CYGWIN_EXTRA_PYTHON_LIBADD)
GENERATE = generator.py
API_DESC = $(top_srcdir)/docs/libvirt-api.xml $(srcdir)/libvirt-override-api.xml
GENERATED= libvirt-export.c \
libvirt.c \
libvirt.h \
libvirt.py
generated.stamp: $(srcdir)/$(GENERATE) $(API_DESC)
$(PYTHON) $(srcdir)/$(GENERATE) $(srcdir)
touch $@
$(GENERATED): generated.stamp
$(libvirtmod_la_OBJECTS): $(GENERATED)
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(pyexecdir)
$(INSTALL) -m 0644 libvirt.py $(DESTDIR)$(pyexecdir)
$(mkinstalldirs) $(DESTDIR)$(DOCS_DIR)
@(for doc in $(DOCS) ; \
do $(INSTALL) -m 0644 $$doc $(DESTDIR)$(DOCS_DIR) ; done)
uninstall-local:
rm -f $(DESTDIR)$(pyexecdir)/libvirt.py
CLEANFILES= $(GENERATED) generated.stamp
else
all:
endif
dummy:
tests test: all dummy
-@(cd tests && $(MAKE) MAKEFLAGS+=--silent tests)