Makefile.am 1.9 KB
Newer Older
D
Daniel Veillard 已提交
1 2
## Process this file with automake to produce Makefile.in

3 4 5
LCOV = lcov
GENHTML = genhtml

6
SUBDIRS = gnulib/lib include src qemud tools proxy docs gnulib/tests \
D
Daniel Veillard 已提交
7
  python tests po examples/domain-events/events-c examples/hellolibvirt
8

9
ACLOCAL_AMFLAGS = -I gnulib/m4 -I m4
10

11
EXTRA_DIST = \
12
  ChangeLog-old \
13
  libvirt.spec libvirt.spec.in \
R
Richard W.M. Jones 已提交
14
  mingw32-libvirt.spec.in \
15 16
  libvirt.pc libvirt.pc.in \
  $(man_MANS) autobuild.sh \
17
  .x-sc_avoid_if_before_free \
18
  .x-sc_require_config_h_first \
19
  .x-sc_prohibit_strcmp \
20
  .x-sc_prohibit_strcmp_and_strncmp \
21
  .x-sc_require_config_h \
22 23
  .x-sc_prohibit_nonreentrant \
  Makefile.nonreentrant \
24
  autogen.sh
25 26

man_MANS = virsh.1
D
Daniel Veillard 已提交
27 28

pkgconfigdir = $(libdir)/pkgconfig
29
pkgconfig_DATA = libvirt.pc
D
Daniel Veillard 已提交
30

31 32
rpm: clean
	@(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.gz)
33 34 35 36

check-local: all tests

tests:
37
	@(cd docs/examples ; $(MAKE) MAKEFLAGS+=--silent tests)
J
Jim Meyering 已提交
38
	@(if [ "$(pythondir)" != "" ] ; then cd python ; \
39 40
	  $(MAKE) MAKEFLAGS+=--silent tests ; fi)

41 42 43 44 45 46
cov: clean-cov
	mkdir $(top_builddir)/coverage
	$(LCOV) -c -o $(top_builddir)/coverage/libvirt.info.tmp -d $(top_srcdir)/src  -d $(top_srcdir)/qemud -d $(top_srcdir)/tests
	$(LCOV) -r $(top_builddir)/coverage/libvirt.info.tmp -o $(top_builddir)/coverage/libvirt.info *usr*
	rm $(top_builddir)/coverage/libvirt.info.tmp
	$(GENHTML) -s -t "libvirt" -o $(top_builddir)/coverage --legend $(top_builddir)/coverage/libvirt.info
47 48 49

clean-cov:
	rm -rf $(top_builddir)/coverage
J
Jim Meyering 已提交
50 51 52

# disable this check
distuninstallcheck:
53 54 55 56 57 58 59 60 61 62 63 64 65 66

dist-hook: gen-ChangeLog

# Generate the ChangeLog file (with all entries since the switch to git)
# and insert it into the directory we're about to use to create a tarball.
gen_start_date = 2009-07-04
.PHONY: gen-ChangeLog
gen-ChangeLog:
	if test -d .git; then					\
	  $(top_srcdir)/build-aux/gitlog-to-changelog		\
	    --since=$(gen_start_date) > $(distdir)/cl-t;	\
	  rm -f $(distdir)/ChangeLog;				\
	  mv $(distdir)/cl-t $(distdir)/ChangeLog;		\
	fi