]> granicus.if.org Git - icinga2/blob - Makefile.am
Fix 'make check-coverage' for VPATH builds.
[icinga2] / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2 ## Created by Anjuta
3
4 include aminclude.am
5
6 SUBDIRS = \
7         third-party \
8         tools \
9         lib \
10         components \
11         icinga-app \
12         test \
13         itl \
14         etc \
15         docs
16
17 #doc
18 icinga2docdir = ${docdir}
19 icinga2doc_DATA = \
20         README \
21         COPYING \
22         COPYING.Exceptions \
23         AUTHORS \
24         ChangeLog \
25         INSTALL \
26         NEWS
27
28 install-data-local:
29         $(MKDIR_P) ${localstatedir}/log/${PACKAGE}/compat/archives
30         $(MKDIR_P) ${localstatedir}/cache/${PACKAGE}
31         $(MKDIR_P) ${localstatedir}/lib/${PACKAGE}
32         $(MKDIR_P) ${localstatedir}/run/${PACKAGE}
33
34 EXTRA_DIST = $(icinga2doc_DATA) git_version.sh icinga2.spec
35
36
37 # Remove doc directory on uninstall
38 uninstall-local:
39         -rm -r $(icinga2docdir)
40
41 BUILT_SOURCES = icinga-version.stamp
42 CLEANFILES = icinga-version.h
43 GIT_VERSION_CMD = $(SHELL) $(top_srcdir)/git_version.sh
44 icinga-version.stamp:
45         @if test -f "$(srcdir)/icinga-version.h"; then \
46                 if test -f "icinga-version.h"; then :; \
47                 else \
48                         cp "$(srcdir)/icinga-version.h" "icinga-version.h"; \
49                 fi; \
50         fi
51         $(GIT_VERSION_CMD) -k -s $(top_srcdir) -o icinga-version.h
52         @if test -s "$(srcdir)/icinga-version.h"; then \
53                 if cmp "$(srcdir)/icinga-version.h" "icinga-version.h"; then :; \
54                 else \
55                         echo "Error: $(srcdir)/icinga-version.h and icinga-version.h differ."; \
56                         echo "       You probably want to remove the former."; \
57                         exit 1; \
58                 fi; \
59         fi
60
61 dist-hook: icinga-version.stamp
62         if test -f "icinga-version.h"; then \
63                 $(SED) -e 's|^#undef GIT_IS_DIST.*|#define GIT_IS_DIST 1|' \
64                         "icinga-version.h" > "$(distdir)/icinga-version.h"; \
65         fi
66
67 check-coverage: all
68         lcov -d . -z
69         make check
70         lcov -d . -c -o icinga2.info
71         lcov -e icinga2.info -o icinga2-filtered.info "`readlink -f $(top_srcdir)`/*"
72         mkdir -p docs/lcov
73         genhtml -o docs/lcov icinga2-filtered.info
74