Makefile.am 2.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 daemon tools proxy docs gnulib/tests \
7
  python tests po examples/domain-events/events-c examples/hellolibvirt \
S
Stefan Berger 已提交
8 9
  examples/dominfo examples/domsuspend examples/python examples/apparmor \
  examples/xml/nwfilter
10

11
ACLOCAL_AMFLAGS = -I m4 -I gnulib/m4
12

13 14 15
XML_EXAMPLES = \
  $(patsubst $(srcdir)/%,%,$(wildcard $(addprefix $(srcdir)/examples/xml/, \
					test/*.xml storage/*.xml)))
16

17
EXTRA_DIST = \
18
  ChangeLog-old \
19
  libvirt.spec libvirt.spec.in \
R
Richard W.M. Jones 已提交
20
  mingw32-libvirt.spec.in \
21
  libvirt.pc libvirt.pc.in \
22
  autobuild.sh \
C
Chris Lalancette 已提交
23
  .x-sc_avoid_ctype_macros \
24
  .x-sc_avoid_if_before_free \
C
Chris Lalancette 已提交
25 26 27 28
  .x-sc_avoid_write \
  .x-sc_m4_quote_check \
  .x-sc_prohibit_asprintf \
  .x-sc_prohibit_gethostby \
29
  .x-sc_prohibit_gethostname \
E
Eric Blake 已提交
30
  .x-sc_prohibit_gettext_noop \
C
Chris Lalancette 已提交
31 32 33
  .x-sc_prohibit_have_config_h \
  .x-sc_prohibit_HAVE_MBRTOWC \
  .x-sc_prohibit_nonreentrant \
34
  .x-sc_prohibit_strcmp \
35
  .x-sc_prohibit_strcmp_and_strncmp \
C
Chris Lalancette 已提交
36
  .x-sc_prohibit_strncpy \
E
Eric Blake 已提交
37
  .x-sc_prohibit_test_minus_ao \
C
Chris Lalancette 已提交
38
  .x-sc_prohibit_VIR_ERR_NO_MEMORY \
39
  .x-sc_require_config_h \
C
Chris Lalancette 已提交
40 41
  .x-sc_require_config_h_first \
  .x-sc_trailing_blank \
42
  Makefile.nonreentrant \
43
  autogen.sh \
D
Daniel Veillard 已提交
44
  examples/domain-events/events-python \
45
  $(XML_EXAMPLES)
46

D
Daniel Veillard 已提交
47
pkgconfigdir = $(libdir)/pkgconfig
48
pkgconfig_DATA = libvirt.pc
D
Daniel Veillard 已提交
49

50 51 52 53 54 55 56 57 58
NEWS: $(top_srcdir)/docs/news.xsl $(top_srcdir)/docs/news.html.in
	-@(if [ -x $(XSLTPROC) ] ; then				\
	  $(XSLTPROC) --nonet $(top_srcdir)/docs/news.xsl	\
	     $(top_srcdir)/docs/news.html.in			\
	   | perl -0777 -pe 's/\n\n+$$/\n/'			\
	   | perl -pe 's/[ \t]+$$//'				\
	   > $@-t && mv $@-t $@ ; fi );


59 60
rpm: clean
	@(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.gz)
61 62 63 64

check-local: all tests

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

69 70
cov: clean-cov
	mkdir $(top_builddir)/coverage
71
	$(LCOV) -c -o $(top_builddir)/coverage/libvirt.info.tmp -d $(top_srcdir)/src  -d $(top_srcdir)/daemon -d $(top_srcdir)/tests
72 73 74
	$(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
75 76 77

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

79 80
MAINTAINERCLEANFILES = .git-module-status

J
Jim Meyering 已提交
81 82
# disable this check
distuninstallcheck:
83 84 85 86 87 88 89 90 91 92 93 94 95 96

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