]> sourceware.org Git - lvm2.git/blob - Makefile.in
Distcleanup config files only in toplevel directory.
[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 endif
41 DISTCLEAN_DIRS += lcov_reports*
42 DISTCLEAN_TARGETS += config.cache config.log config.status make.tmpl
43
44 include make.tmpl
45
46 libdm: include
47 lib: libdm
48 liblvm: lib
49 daemons: lib tools
50 tools: lib device-mapper
51 po: tools daemons
52
53 libdm.device-mapper: include.device-mapper
54 daemons.device-mapper: libdm.device-mapper
55 tools.device-mapper: libdm.device-mapper
56 device-mapper: tools.device-mapper daemons.device-mapper man.device-mapper
57
58 ifeq ("@INTL@", "yes")
59 lib.pofile: include.pofile
60 tools.pofile: lib.pofile
61 daemons.pofile: lib.pofile
62 po.pofile: tools.pofile daemons.pofile
63 pofile: po.pofile
64 endif
65
66 ifneq ("$(CFLOW_CMD)", "")
67 tools.cflow: libdm.cflow lib.cflow
68 daemons.cflow: tools.cflow
69 cflow: include.cflow
70 endif
71
72 ifneq ("@CSCOPE_CMD@", "")
73 cscope.out:
74 @CSCOPE_CMD@ -b -R -s$(top_srcdir)
75 all: cscope.out
76 endif
77 DISTCLEAN_TARGETS += cscope.out
78
79 check: all
80 $(MAKE) -C test all
81
82 LCOV_TRACES = libdm.info lib.info tools.info \
83 daemons/dmeventd.info daemons/clvmd.info
84 CLEAN_TARGETS += $(LCOV_TRACES)
85
86 ifneq ("$(LCOV)", "")
87 .PHONY: lcov-reset lcov lcov-dated $(LCOV_TRACES)
88
89 ifeq ($(MAKECMDGOALS),lcov-dated)
90 LCOV_REPORTS_DIR := lcov_reports-$(shell date +%Y%m%d%k%M%S)
91 lcov-dated: lcov
92 else
93 LCOV_REPORTS_DIR := lcov_reports
94 endif
95
96 lcov-reset:
97 $(LCOV) --zerocounters $(addprefix -d , $(basename $(LCOV_TRACES)))
98
99 # maybe use subdirs processing to create tracefiles...
100 $(LCOV_TRACES):
101 $(LCOV) -b $(top_srcdir)/$(basename $@) \
102 -d $(basename $@) -c -o - | $(SED) \
103 -e "s/\(dmeventd_lvm.[ch]\)/plugins\/lvm2\/\1/" \
104 -e "s/\(dmeventd_mirror.c\)/plugins\/mirror\/\1/" \
105 -e "s/\(dmeventd_snapshot.c\)/plugins\/snapshot\/\1/" \
106 >$@
107
108 ifneq ("$(GENHTML)", "")
109 lcov: $(LCOV_TRACES)
110 $(RM) -r $(LCOV_REPORTS_DIR)
111 $(MKDIR_P) $(LCOV_REPORTS_DIR)
112 for i in $(LCOV_TRACES); do \
113 test -s $$i && lc="$$lc $$i"; \
114 done; \
115 test -z "$$lc" || $(GENHTML) --frames -p @abs_top_builddir@ \
116 -o $(LCOV_REPORTS_DIR) $$lc
117 endif
118
119 endif
This page took 0.042852 seconds and 6 git commands to generate.