Makefile.am 2.8 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 \
8
  examples/dominfo examples/domsuspend examples/python examples/apparmor
9

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

12 13
XML_EXAMPLES = $(wildcard examples/xml/test/*.xml) $(wildcard examples/xml/storage/*.xml)

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

D
Daniel Veillard 已提交
42
pkgconfigdir = $(libdir)/pkgconfig
43
pkgconfig_DATA = libvirt.pc
D
Daniel Veillard 已提交
44

45 46 47 48 49 50 51 52 53
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 );


54 55
rpm: clean
	@(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.gz)
56 57 58 59

check-local: all tests

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

64 65
cov: clean-cov
	mkdir $(top_builddir)/coverage
66
	$(LCOV) -c -o $(top_builddir)/coverage/libvirt.info.tmp -d $(top_srcdir)/src  -d $(top_srcdir)/daemon -d $(top_srcdir)/tests
67 68 69
	$(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
70 71 72

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

74 75
MAINTAINERCLEANFILES = .git-module-status

J
Jim Meyering 已提交
76 77
# disable this check
distuninstallcheck:
78 79 80 81 82 83 84 85 86 87 88 89 90 91

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