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

M
Martin Kletzander 已提交
3
## Copyright (C) 2005-2013 Red Hat, Inc.
E
Eric Blake 已提交
4 5 6 7 8 9 10 11 12 13 14 15 16 17
##
## This library is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser General Public
## License as published by the Free Software Foundation; either
## version 2.1 of the License, or (at your option) any later version.
##
## This library is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
## Lesser General Public License for more details.
##
## You should have received a copy of the GNU Lesser General Public
## License along with this library.  If not, see
## <http://www.gnu.org/licenses/>.
18

19 20 21
LCOV = lcov
GENHTML = genhtml

22
SUBDIRS = . gnulib/lib include/libvirt src daemon tools docs gnulib/tests \
23
  tests po examples
24

25
XZ_OPT ?= -v -T0
26 27
export XZ_OPT

28
ACLOCAL_AMFLAGS = -I m4
29

30
EXTRA_DIST = \
31
  config-post.h \
32
  ChangeLog-old \
33
  libvirt.spec libvirt.spec.in \
34
  mingw-libvirt.spec.in \
35
  libvirt.pc.in \
36 37
  libvirt-qemu.pc.in \
  libvirt-lxc.pc.in \
M
Martin Kletzander 已提交
38
  libvirt-admin.pc.in \
39
  Makefile.nonreentrant \
40
  autogen.sh \
41
  cfg.mk \
42
  run.in \
43
  README.md \
44
  AUTHORS.in
45

D
Daniel Veillard 已提交
46
pkgconfigdir = $(libdir)/pkgconfig
47
pkgconfig_DATA = libvirt.pc libvirt-qemu.pc libvirt-lxc.pc libvirt-admin.pc
D
Daniel Veillard 已提交
48

49 50
NEWS: \
	  $(srcdir)/docs/news.xml \
51 52 53 54 55 56 57 58 59 60 61 62 63
	  $(srcdir)/docs/news-ascii.xsl \
	  $(srcdir)/docs/reformat-news.py
	$(AM_V_GEN) \
	if [ -x $(XSLTPROC) ]; then \
	  $(XSLTPROC) --nonet \
	    $(srcdir)/docs/news-ascii.xsl \
	    $(srcdir)/docs/news.xml \
	  >$@-tmp \
	    || { rm -f $@-tmp; exit 1; }; \
	  $(srcdir)/docs/reformat-news.py $@-tmp >$@ \
	    || { rm -f $@-tmp; exit 1; }; \
	  rm -f $@-tmp; \
	fi
64 65
EXTRA_DIST += \
	$(srcdir)/docs/news.xml \
66 67
	$(srcdir)/docs/news-ascii.xsl \
	$(srcdir)/docs/reformat-news.py
68

69 70 71 72
$(top_srcdir)/HACKING: $(top_srcdir)/docs/hacking1.xsl \
			$(top_srcdir)/docs/hacking2.xsl \
			$(top_srcdir)/docs/wrapstring.xsl \
			$(top_srcdir)/docs/hacking.html.in
73
	$(AM_V_GEN)if [ -x $(XSLTPROC) ] ; then \
74 75
	   $(XSLTPROC) --nonet $(top_srcdir)/docs/hacking1.xsl \
		$(top_srcdir)/docs/hacking.html.in | \
76 77
	   $(XSLTPROC) --nonet $(top_srcdir)/docs/hacking2.xsl - \
	   | perl -0777 -pe 's/\n\n+$$/\n/' \
78
	   > $@-t && mv $@-t $@ ; fi;
79

80
rpm: clean
81
	@(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.xz)
82 83 84

check-local: all tests

85 86 87
check-access:
	@($(MAKE) $(AM_MAKEFLAGS) -C tests check-access)

88
cov: clean-cov
89
	$(MKDIR_P) $(top_builddir)/coverage
90 91 92 93 94
	$(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
95
	rm $(top_builddir)/coverage/libvirt.info.tmp
96 97
	$(GENHTML) --show-details -t "libvirt" -o $(top_builddir)/coverage \
	  --legend $(top_builddir)/coverage/libvirt.info
98 99 100

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

102 103
MAINTAINERCLEANFILES = .git-module-status

C
Cole Robinson 已提交
104
dist-hook: gen-ChangeLog gen-AUTHORS
105 106 107 108 109 110

# 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:
111
	$(AM_V_GEN)if test -d .git; then			\
112 113 114 115 116
	  $(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
C
Cole Robinson 已提交
117 118 119

.PHONY: gen-AUTHORS
gen-AUTHORS:
J
Jiri Denemark 已提交
120 121 122 123
	$(AM_V_GEN)if test -d $(srcdir)/.git; then \
	    out="`cd $(srcdir) && git log --pretty=format:'%aN <%aE>' | sort -u`" && \
	    perl -p -e "s/#authorslist#// and print '$$out'" \
	      < $(srcdir)/AUTHORS.in > $(distdir)/AUTHORS-tmp && \
C
Cole Robinson 已提交
124 125
	    mv -f $(distdir)/AUTHORS-tmp $(distdir)/AUTHORS ; \
	fi