Makefile.am 3.7 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 23 24 25
# when building from tarball -Werror isn't auto enabled
# so force it explicitly
DISTCHECK_CONFIGURE_FLAGS = --enable-werror

26
SUBDIRS = . gnulib/lib include/libvirt src tools docs gnulib/tests \
27
  tests po examples
28

29
XZ_OPT ?= -v -T0
30 31
export XZ_OPT

32
ACLOCAL_AMFLAGS = -I m4
33

34
EXTRA_DIST = \
35
  config-post.h \
36
  libvirt.spec libvirt.spec.in \
37
  mingw-libvirt.spec.in \
38
  libvirt.pc.in \
39 40
  libvirt-qemu.pc.in \
  libvirt-lxc.pc.in \
M
Martin Kletzander 已提交
41
  libvirt-admin.pc.in \
42
  Makefile.nonreentrant \
43
  autogen.sh \
44
  cfg.mk \
45 46
  GNUmakefile \
  maint.mk \
47
  run.in \
48
  README.md \
49 50 51 52 53 54 55 56 57
  AUTHORS.in \
  build-aux/augeas-gentest.pl \
  build-aux/check-spacing.pl \
  build-aux/header-ifdef.pl \
  build-aux/minimize-po.pl \
  build-aux/mock-noinline.pl \
  build-aux/prohibit-duplicate-header.pl \
  build-aux/useless-if-before-free \
  build-aux/vc-list-files \
58
  ci/Makefile \
59
  ci/build.sh \
60
  ci/prepare.sh \
61
  $(NULL)
62

D
Daniel Veillard 已提交
63
pkgconfigdir = $(libdir)/pkgconfig
64
pkgconfig_DATA = libvirt.pc libvirt-qemu.pc libvirt-lxc.pc libvirt-admin.pc
D
Daniel Veillard 已提交
65

66 67
NEWS: \
	  $(srcdir)/docs/news.xml \
68 69 70 71 72 73 74 75 76
	  $(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; }; \
77
	  $(RUNUTF8) $(PYTHON) $(srcdir)/docs/reformat-news.py $@-tmp >$@ \
78 79 80
	    || { rm -f $@-tmp; exit 1; }; \
	  rm -f $@-tmp; \
	fi
81 82
EXTRA_DIST += \
	$(srcdir)/docs/news.xml \
83 84
	$(srcdir)/docs/news-ascii.xsl \
	$(srcdir)/docs/reformat-news.py
85

86
rpm: clean
87
	@(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.xz)
88

J
Jiri Denemark 已提交
89 90 91
srpm: clean
	@(unset CDPATH ; $(MAKE) dist && rpmbuild -ts $(distdir).tar.xz)

92 93
check-local: all tests

94
check-access: all
95 96
	@($(MAKE) $(AM_MAKEFLAGS) -C tests check-access)

97 98 99 100 101 102 103 104 105 106 107 108 109 110
cov: clean-cov
	$(MKDIR_P) $(top_builddir)/coverage
	$(LCOV) -c -o $(top_builddir)/coverage/libvirt.info.tmp \
	  -d $(top_builddir)/src \
	  -d $(top_builddir)/tests
	$(LCOV) -r $(top_builddir)/coverage/libvirt.info.tmp \
	  -o $(top_builddir)/coverage/libvirt.info
	rm $(top_builddir)/coverage/libvirt.info.tmp
	$(GENHTML) --show-details -t "libvirt" -o $(top_builddir)/coverage \
	  --legend $(top_builddir)/coverage/libvirt.info

clean-cov:
	rm -rf $(top_builddir)/coverage

111 112
MAINTAINERCLEANFILES = .git-module-status

113 114 115 116
distclean-local: clean-GNUmakefile
clean-GNUmakefile:
	test '$(srcdir)' = . || rm -f $(top_builddir)/GNUmakefile

117
dist-hook: gen-AUTHORS
C
Cole Robinson 已提交
118 119 120

.PHONY: gen-AUTHORS
gen-AUTHORS:
121 122 123 124 125 126 127 128 129 130 131 132 133
	$(AM_V_GEN)\
	if test -d $(srcdir)/.git; then \
	  ( \
	    cd $(srcdir) && \
	    git log --pretty=format:'%aN <%aE>' | sort -u \
	  ) > all.list && \
	  sort -u $(srcdir)/AUTHORS.in > maint.list && \
	  comm -23 all.list maint.list > contrib.list && \
	  contrib="`cat contrib.list`" && \
	  perl -p -e "s/#contributorslist#// and print '$$contrib'" \
	    < $(srcdir)/AUTHORS.in > $(distdir)/AUTHORS-tmp && \
	  mv -f $(distdir)/AUTHORS-tmp $(distdir)/AUTHORS && \
	  rm -f all.list maint.list contrib.list; \
C
Cole Robinson 已提交
134
	fi
135

136
ci-%:
137
	$(MAKE) -C ci/ $@