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

E
Eric Blake 已提交
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
## Copyright (C) 2005-2013 Red Hat, Inc.
##
## 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
  python tests po examples/domain-events/events-c examples/hellolibvirt \
S
Stefan Berger 已提交
24
  examples/dominfo examples/domsuspend examples/python examples/apparmor \
25
  examples/xml/nwfilter examples/openauth examples/systemtap
26

27
ACLOCAL_AMFLAGS = -I m4 -I gnulib/m4
28

29 30 31
XML_EXAMPLES = \
  $(patsubst $(srcdir)/%,%,$(wildcard $(addprefix $(srcdir)/examples/xml/, \
					test/*.xml storage/*.xml)))
32

33 34
EXTRA_DIST = \
  ChangeLog-old \
35
  libvirt.spec libvirt.spec.in \
36
  mingw-libvirt.spec.in \
37
  libvirt.pc.in \
38
  autobuild.sh \
39
  Makefile.nonreentrant \
40
  autogen.sh \
41
  cfg.mk \
D
Daniel Veillard 已提交
42
  examples/domain-events/events-python \
43
  run.in \
C
Cole Robinson 已提交
44
  AUTHORS.in \
45
  $(XML_EXAMPLES)
46

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

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

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

69 70
rpm: clean
	@(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.gz)
71 72 73 74

check-local: all tests

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

79 80
cov: clean-cov
	mkdir $(top_builddir)/coverage
81 82 83 84 85
	$(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
86
	rm $(top_builddir)/coverage/libvirt.info.tmp
87 88
	$(GENHTML) --show-details -t "libvirt" -o $(top_builddir)/coverage \
	  --legend $(top_builddir)/coverage/libvirt.info
89 90 91

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

93 94
MAINTAINERCLEANFILES = .git-module-status

J
Jim Meyering 已提交
95 96
# disable this check
distuninstallcheck:
97

C
Cole Robinson 已提交
98
dist-hook: gen-ChangeLog gen-AUTHORS
99 100 101 102 103 104

# 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:
105
	$(AM_V_GEN)if test -d .git; then			\
106 107 108 109 110
	  $(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 已提交
111 112 113

.PHONY: gen-AUTHORS
gen-AUTHORS:
J
Jiri Denemark 已提交
114 115 116 117
	$(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 已提交
118 119
	    mv -f $(distdir)/AUTHORS-tmp $(distdir)/AUTHORS ; \
	fi