Makefile.am 3.0 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 docs gnulib/tests \
7
  python tests po examples/domain-events/events-c examples/hellolibvirt \
S
Stefan Berger 已提交
8
  examples/dominfo examples/domsuspend examples/python examples/apparmor \
9
  examples/xml/nwfilter examples/openauth examples/systemtap
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
  .x-sc_avoid_write \
  .x-sc_m4_quote_check \
  .x-sc_prohibit_asprintf \
28
  .x-sc_prohibit_empty_lines_at_EOF \
C
Chris Lalancette 已提交
29
  .x-sc_prohibit_gethostby \
30
  .x-sc_prohibit_gethostname \
E
Eric Blake 已提交
31
  .x-sc_prohibit_gettext_noop \
C
Chris Lalancette 已提交
32 33 34
  .x-sc_prohibit_have_config_h \
  .x-sc_prohibit_HAVE_MBRTOWC \
  .x-sc_prohibit_nonreentrant \
35
  .x-sc_prohibit_strcmp \
36
  .x-sc_prohibit_strcmp_and_strncmp \
C
Chris Lalancette 已提交
37
  .x-sc_prohibit_strncpy \
E
Eric Blake 已提交
38
  .x-sc_prohibit_test_minus_ao \
C
Chris Lalancette 已提交
39
  .x-sc_prohibit_VIR_ERR_NO_MEMORY \
40
  .x-sc_require_config_h \
C
Chris Lalancette 已提交
41 42
  .x-sc_require_config_h_first \
  .x-sc_trailing_blank \
43
  Makefile.nonreentrant \
44
  autogen.sh \
D
Daniel Veillard 已提交
45
  examples/domain-events/events-python \
46
  $(XML_EXAMPLES)
47

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

51 52 53 54 55 56 57 58 59
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 );


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

check-local: all tests

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

70 71
cov: clean-cov
	mkdir $(top_builddir)/coverage
72 73 74 75 76
	$(LCOV) -c -o $(top_builddir)/coverage/libvirt.info.tmp \
	  -d $(top_builddir)/src  -d $(top_builddir)/daemon \
	  -d $(top_builddir)/tests
	$(LCOV) -r $(top_builddir)/coverage/libvirt.info.tmp \
	  -o $(top_builddir)/coverage/libvirt.info
77
	rm $(top_builddir)/coverage/libvirt.info.tmp
78 79
	$(GENHTML) --show-details -t "libvirt" -o $(top_builddir)/coverage \
	  --legend $(top_builddir)/coverage/libvirt.info
80 81 82

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

84 85
MAINTAINERCLEANFILES = .git-module-status

J
Jim Meyering 已提交
86 87
# disable this check
distuninstallcheck:
88 89 90 91 92 93 94 95 96 97 98 99 100 101

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