]> sourceware.org Git - lvm2.git/blob - Makefile.in
Fix lcov target
[lvm2.git] / Makefile.in
1 #
2 # Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
3 # Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved.
4 #
5 # This file is part of LVM2.
6 #
7 # This copyrighted material is made available to anyone wishing to use,
8 # modify, copy, or redistribute it subject to the terms and conditions
9 # of the GNU General Public License v.2.
10 #
11 # You should have received a copy of the GNU General Public License
12 # along with this program; if not, write to the Free Software Foundation,
13 # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
14
15 srcdir = @srcdir@
16 top_srcdir = @top_srcdir@
17 top_builddir = @top_builddir@
18 VPATH = @srcdir@
19
20 SUBDIRS = doc include man scripts
21
22 ifeq ("@UDEV_RULES@", "yes")
23 SUBDIRS += udev
24 endif
25
26 ifeq ("@INTL@", "yes")
27 SUBDIRS += po
28 endif
29
30 SUBDIRS += lib tools daemons libdm
31
32 ifeq ("@APPLIB@", "yes")
33 SUBDIRS += liblvm
34 endif
35
36 ifeq ($(MAKECMDGOALS),distclean)
37 SUBDIRS = doc include man scripts \
38 lib tools daemons libdm \
39 udev po liblvm test/api test
40 DISTCLEAN_DIRS += lcov_reports*
41 endif
42
43 include make.tmpl
44
45 libdm: include
46 lib: libdm
47 liblvm: lib
48 daemons: lib tools
49 tools: lib device-mapper
50 po: tools daemons
51
52 libdm.device-mapper: include.device-mapper
53 daemons.device-mapper: libdm.device-mapper
54 tools.device-mapper: libdm.device-mapper
55 device-mapper: tools.device-mapper daemons.device-mapper man.device-mapper
56
57 ifeq ("@INTL@", "yes")
58 lib.pofile: include.pofile
59 tools.pofile: lib.pofile
60 daemons.pofile: lib.pofile
61 po.pofile: tools.pofile daemons.pofile
62 pofile: po.pofile
63 endif
64
65 ifneq ("$(CFLOW_CMD)", "")
66 tools.cflow: libdm.cflow lib.cflow
67 daemons.cflow: tools.cflow
68 cflow: include.cflow
69 endif
70
71 ifneq ("@CSCOPE_CMD@", "")
72 cscope.out:
73 @CSCOPE_CMD@ -b -R -s$(top_srcdir)
74 all: cscope.out
75 endif
76 DISTCLEAN_TARGETS += cscope.out
77
78 check: all
79 $(MAKE) -C test all
80
81 LCOV_TRACES = libdm.info lib.info tools.info \
82 daemons/dmeventd.info daemons/clvmd.info
83 CLEAN_TARGETS += $(LCOV_TRACES)
84
85 ifneq ("$(LCOV)", "")
86 .PHONY: lcov-reset lcov lcov-dated $(LCOV_TRACES)
87
88 ifeq ($(MAKECMDGOALS),lcov-dated)
89 LCOV_REPORTS_DIR := lcov_reports-$(shell date +%Y%m%d%k%M%S)
90 lcov-dated: lcov
91 else
92 LCOV_REPORTS_DIR := lcov_reports
93 endif
94
95 lcov-reset:
96 $(LCOV) --zerocounters $(addprefix -d , $(basename $(LCOV_TRACES)))
97
98 # maybe use subdirs processing to create tracefiles...
99 $(LCOV_TRACES):
100 $(LCOV) -b $(top_srcdir)/$(basename $@) \
101 -d $(basename $@) -c -o - | $(SED) \
102 -e "s/\(dmeventd_lvm.[ch]\)/plugins\/lvm2\/\1/" \
103 -e "s/\(dmeventd_mirror.c\)/plugins\/mirror\/\1/" \
104 -e "s/\(dmeventd_snapshot.c\)/plugins\/snapshot\/\1/" \
105 >$@
106
107 ifneq ("$(GENHTML)", "")
108 lcov: $(LCOV_TRACES)
109 $(RM) -r $(LCOV_REPORTS_DIR)
110 $(MKDIR_P) $(LCOV_REPORTS_DIR)
111 for i in $(LCOV_TRACES); do \
112 test -s $$i && lc="$$lc $$i"; \
113 done; \
114 test -z "$$lc" || $(GENHTML) --frames -p @abs_top_builddir@ \
115 -o $(LCOV_REPORTS_DIR) $$lc
116 endif
117
118 endif
This page took 0.041165 seconds and 6 git commands to generate.