ci: Introduce $(CI_PREPARE_SCRIPT)
[libvirt/ericb.git] / Makefile.am
blobcf9ff94f4f401d4f8e8e2c04d3dc5352209d4d29
1 ## Process this file with automake to produce Makefile.in
3 ## Copyright (C) 2005-2013 Red Hat, Inc.
4 ##
5 ## This library is free software; you can redistribute it and/or
6 ## modify it under the terms of the GNU Lesser General Public
7 ## License as published by the Free Software Foundation; either
8 ## version 2.1 of the License, or (at your option) any later version.
9 ##
10 ## This library is distributed in the hope that it will be useful,
11 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 ## Lesser General Public License for more details.
15 ## You should have received a copy of the GNU Lesser General Public
16 ## License along with this library.  If not, see
17 ## <http://www.gnu.org/licenses/>.
19 LCOV = lcov
20 GENHTML = genhtml
22 SUBDIRS = . gnulib/lib include/libvirt src tools docs gnulib/tests \
23   tests po examples
25 XZ_OPT ?= -v -T0
26 export XZ_OPT
28 ACLOCAL_AMFLAGS = -I m4
30 EXTRA_DIST = \
31   config-post.h \
32   libvirt.spec libvirt.spec.in \
33   mingw-libvirt.spec.in \
34   libvirt.pc.in \
35   libvirt-qemu.pc.in \
36   libvirt-lxc.pc.in \
37   libvirt-admin.pc.in \
38   Makefile.nonreentrant \
39   autogen.sh \
40   cfg.mk \
41   run.in \
42   README.md \
43   AUTHORS.in \
44   build-aux/augeas-gentest.pl \
45   build-aux/check-spacing.pl \
46   build-aux/gitlog-to-changelog \
47   build-aux/header-ifdef.pl \
48   build-aux/minimize-po.pl \
49   build-aux/mock-noinline.pl \
50   build-aux/prohibit-duplicate-header.pl \
51   build-aux/useless-if-before-free \
52   build-aux/vc-list-files \
53   ci/Makefile \
54   ci/build.sh \
55   ci/prepare.sh \
56   $(NULL)
58 pkgconfigdir = $(libdir)/pkgconfig
59 pkgconfig_DATA = libvirt.pc libvirt-qemu.pc libvirt-lxc.pc libvirt-admin.pc
61 NEWS: \
62           $(srcdir)/docs/news.xml \
63           $(srcdir)/docs/news-ascii.xsl \
64           $(srcdir)/docs/reformat-news.py
65         $(AM_V_GEN) \
66         if [ -x $(XSLTPROC) ]; then \
67           $(XSLTPROC) --nonet \
68             $(srcdir)/docs/news-ascii.xsl \
69             $(srcdir)/docs/news.xml \
70           >$@-tmp \
71             || { rm -f $@-tmp; exit 1; }; \
72           $(PYTHON) $(srcdir)/docs/reformat-news.py $@-tmp >$@ \
73             || { rm -f $@-tmp; exit 1; }; \
74           rm -f $@-tmp; \
75         fi
76 EXTRA_DIST += \
77         $(srcdir)/docs/news.xml \
78         $(srcdir)/docs/news-ascii.xsl \
79         $(srcdir)/docs/reformat-news.py
81 rpm: clean
82         @(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.xz)
84 srpm: clean
85         @(unset CDPATH ; $(MAKE) dist && rpmbuild -ts $(distdir).tar.xz)
87 check-local: all tests
89 check-access: all
90         @($(MAKE) $(AM_MAKEFLAGS) -C tests check-access)
92 cov: clean-cov
93         $(MKDIR_P) $(top_builddir)/coverage
94         $(LCOV) -c -o $(top_builddir)/coverage/libvirt.info.tmp \
95           -d $(top_builddir)/src \
96           -d $(top_builddir)/tests
97         $(LCOV) -r $(top_builddir)/coverage/libvirt.info.tmp \
98           -o $(top_builddir)/coverage/libvirt.info
99         rm $(top_builddir)/coverage/libvirt.info.tmp
100         $(GENHTML) --show-details -t "libvirt" -o $(top_builddir)/coverage \
101           --legend $(top_builddir)/coverage/libvirt.info
103 clean-cov:
104         rm -rf $(top_builddir)/coverage
106 MAINTAINERCLEANFILES = .git-module-status
108 dist-hook: gen-AUTHORS
110 .PHONY: gen-AUTHORS
111 gen-AUTHORS:
112         $(AM_V_GEN)\
113         if test -d $(srcdir)/.git; then \
114           ( \
115             cd $(srcdir) && \
116             git log --pretty=format:'%aN <%aE>' | sort -u \
117           ) > all.list && \
118           sort -u $(srcdir)/AUTHORS.in > maint.list && \
119           comm -23 all.list maint.list > contrib.list && \
120           contrib="`cat contrib.list`" && \
121           perl -p -e "s/#contributorslist#// and print '$$contrib'" \
122             < $(srcdir)/AUTHORS.in > $(distdir)/AUTHORS-tmp && \
123           mv -f $(distdir)/AUTHORS-tmp $(distdir)/AUTHORS && \
124           rm -f all.list maint.list contrib.list; \
125         fi
127 ci-%:
128         $(MAKE) -C ci/ $@