Makefile.am 3.5 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 src daemon tools docs gnulib/tests \
23
  tests po examples tools/wireshark
24

25
ACLOCAL_AMFLAGS = -I m4
26

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

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

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

54 55 56 57
$(top_srcdir)/HACKING: $(top_srcdir)/docs/hacking1.xsl \
			$(top_srcdir)/docs/hacking2.xsl \
			$(top_srcdir)/docs/wrapstring.xsl \
			$(top_srcdir)/docs/hacking.html.in
58
	$(AM_V_GEN)if [ -x $(XSLTPROC) ] ; then \
59 60
	   $(XSLTPROC) --nonet $(top_srcdir)/docs/hacking1.xsl \
		$(top_srcdir)/docs/hacking.html.in | \
61 62
	   $(XSLTPROC) --nonet $(top_srcdir)/docs/hacking2.xsl - \
	   | perl -0777 -pe 's/\n\n+$$/\n/' \
63
	   > $@-t && mv $@-t $@ ; fi;
64

65 66
rpm: clean
	@(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.gz)
67 68 69

check-local: all tests

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

C
Cole Robinson 已提交
89
dist-hook: gen-ChangeLog gen-AUTHORS
90 91 92 93 94 95

# 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:
96
	$(AM_V_GEN)if test -d .git; then			\
97 98 99 100 101
	  $(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 已提交
102 103 104

.PHONY: gen-AUTHORS
gen-AUTHORS:
J
Jiri Denemark 已提交
105 106 107 108
	$(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 已提交
109 110
	    mv -f $(distdir)/AUTHORS-tmp $(distdir)/AUTHORS ; \
	fi