]> sourceware.org Git - lvm2.git/blame - Makefile.in
Fix lcov target
[lvm2.git] / Makefile.in
CommitLineData
795ca3e5 1#
6606c3ae 2# Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
e0a728aa 3# Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved.
795ca3e5 4#
7f8f8bfa 5# This file is part of LVM2.
795ca3e5 6#
6606c3ae
AK
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.
795ca3e5 10#
6606c3ae
AK
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
795ca3e5
AK
14
15srcdir = @srcdir@
16top_srcdir = @top_srcdir@
db8b5af9 17top_builddir = @top_builddir@
795ca3e5
AK
18VPATH = @srcdir@
19
4eee5764 20SUBDIRS = doc include man scripts
69792976 21
5d518f1f
AK
22ifeq ("@UDEV_RULES@", "yes")
23 SUBDIRS += udev
24endif
25
69792976
AK
26ifeq ("@INTL@", "yes")
27 SUBDIRS += po
28endif
29
572fefeb
AK
30SUBDIRS += lib tools daemons libdm
31
32ifeq ("@APPLIB@", "yes")
33 SUBDIRS += liblvm
34endif
795ca3e5 35
5b82db9a 36ifeq ($(MAKECMDGOALS),distclean)
b7be589e
ZK
37 SUBDIRS = doc include man scripts \
38 lib tools daemons libdm \
39 udev po liblvm test/api test
5556819a 40 DISTCLEAN_DIRS += lcov_reports*
5b82db9a
AK
41endif
42
795ca3e5
AK
43include make.tmpl
44
0782ad50
AK
45libdm: include
46lib: libdm
e0c64c6c 47liblvm: lib
98cd0c14 48daemons: lib tools
572fefeb 49tools: lib device-mapper
b7edb5bf 50po: tools daemons
751acb38 51
2c44337b 52libdm.device-mapper: include.device-mapper
d4b9af44 53daemons.device-mapper: libdm.device-mapper
0782ad50 54tools.device-mapper: libdm.device-mapper
a479de2e 55device-mapper: tools.device-mapper daemons.device-mapper man.device-mapper
0782ad50 56
69792976
AK
57ifeq ("@INTL@", "yes")
58lib.pofile: include.pofile
59tools.pofile: lib.pofile
d3c8211f 60daemons.pofile: lib.pofile
b7edb5bf 61po.pofile: tools.pofile daemons.pofile
69792976
AK
62pofile: po.pofile
63endif
751acb38 64
b41f5924
ZK
65ifneq ("$(CFLOW_CMD)", "")
66tools.cflow: libdm.cflow lib.cflow
67daemons.cflow: tools.cflow
68cflow: include.cflow
8a2fc586
AK
69endif
70
71ifneq ("@CSCOPE_CMD@", "")
08db4eeb
ZK
72cscope.out:
73 @CSCOPE_CMD@ -b -R -s$(top_srcdir)
8a2fc586
AK
74all: cscope.out
75endif
08db4eeb 76DISTCLEAN_TARGETS += cscope.out
f0f8fbc6
JM
77
78check: all
79 $(MAKE) -C test all
fddafd51 80
6a27e819
ZK
81LCOV_TRACES = libdm.info lib.info tools.info \
82 daemons/dmeventd.info daemons/clvmd.info
83CLEAN_TARGETS += $(LCOV_TRACES)
84
a6fd0319 85ifneq ("$(LCOV)", "")
6a27e819 86.PHONY: lcov-reset lcov lcov-dated $(LCOV_TRACES)
fddafd51 87
5556819a 88ifeq ($(MAKECMDGOALS),lcov-dated)
6a27e819
ZK
89LCOV_REPORTS_DIR := lcov_reports-$(shell date +%Y%m%d%k%M%S)
90lcov-dated: lcov
5556819a 91else
6a27e819 92LCOV_REPORTS_DIR := lcov_reports
5556819a 93endif
fddafd51 94
5556819a 95lcov-reset:
6a27e819
ZK
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 >$@
fddafd51 106
a6fd0319 107ifneq ("$(GENHTML)", "")
6a27e819
ZK
108lcov: $(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
fddafd51
ZK
116endif
117
fddafd51 118endif
This page took 0.061836 seconds and 5 git commands to generate.