]>
Commit | Line | Data |
---|---|---|
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 | |
15 | srcdir = @srcdir@ | |
16 | top_srcdir = @top_srcdir@ | |
db8b5af9 | 17 | top_builddir = @top_builddir@ |
795ca3e5 AK |
18 | VPATH = @srcdir@ |
19 | ||
4eee5764 | 20 | SUBDIRS = doc include man scripts |
69792976 | 21 | |
5d518f1f AK |
22 | ifeq ("@UDEV_RULES@", "yes") |
23 | SUBDIRS += udev | |
24 | endif | |
25 | ||
69792976 AK |
26 | ifeq ("@INTL@", "yes") |
27 | SUBDIRS += po | |
28 | endif | |
29 | ||
572fefeb AK |
30 | SUBDIRS += lib tools daemons libdm |
31 | ||
32 | ifeq ("@APPLIB@", "yes") | |
33 | SUBDIRS += liblvm | |
34 | endif | |
795ca3e5 | 35 | |
5b82db9a | 36 | ifeq ($(MAKECMDGOALS),distclean) |
b7be589e ZK |
37 | SUBDIRS = doc include man scripts \ |
38 | lib tools daemons libdm \ | |
39 | udev po liblvm test/api test | |
5b82db9a | 40 | endif |
e83968fa ZK |
41 | DISTCLEAN_DIRS += lcov_reports* |
42 | DISTCLEAN_TARGETS += config.cache config.log config.status make.tmpl | |
5b82db9a | 43 | |
795ca3e5 AK |
44 | include make.tmpl |
45 | ||
0782ad50 AK |
46 | libdm: include |
47 | lib: libdm | |
e0c64c6c | 48 | liblvm: lib |
98cd0c14 | 49 | daemons: lib tools |
572fefeb | 50 | tools: lib device-mapper |
b7edb5bf | 51 | po: tools daemons |
751acb38 | 52 | |
2c44337b | 53 | libdm.device-mapper: include.device-mapper |
d4b9af44 | 54 | daemons.device-mapper: libdm.device-mapper |
0782ad50 | 55 | tools.device-mapper: libdm.device-mapper |
a479de2e | 56 | device-mapper: tools.device-mapper daemons.device-mapper man.device-mapper |
0782ad50 | 57 | |
69792976 AK |
58 | ifeq ("@INTL@", "yes") |
59 | lib.pofile: include.pofile | |
60 | tools.pofile: lib.pofile | |
d3c8211f | 61 | daemons.pofile: lib.pofile |
b7edb5bf | 62 | po.pofile: tools.pofile daemons.pofile |
69792976 AK |
63 | pofile: po.pofile |
64 | endif | |
751acb38 | 65 | |
b41f5924 ZK |
66 | ifneq ("$(CFLOW_CMD)", "") |
67 | tools.cflow: libdm.cflow lib.cflow | |
68 | daemons.cflow: tools.cflow | |
69 | cflow: include.cflow | |
8a2fc586 AK |
70 | endif |
71 | ||
72 | ifneq ("@CSCOPE_CMD@", "") | |
08db4eeb ZK |
73 | cscope.out: |
74 | @CSCOPE_CMD@ -b -R -s$(top_srcdir) | |
8a2fc586 AK |
75 | all: cscope.out |
76 | endif | |
08db4eeb | 77 | DISTCLEAN_TARGETS += cscope.out |
f0f8fbc6 JM |
78 | |
79 | check: all | |
80 | $(MAKE) -C test all | |
fddafd51 | 81 | |
6a27e819 ZK |
82 | LCOV_TRACES = libdm.info lib.info tools.info \ |
83 | daemons/dmeventd.info daemons/clvmd.info | |
84 | CLEAN_TARGETS += $(LCOV_TRACES) | |
85 | ||
a6fd0319 | 86 | ifneq ("$(LCOV)", "") |
6a27e819 | 87 | .PHONY: lcov-reset lcov lcov-dated $(LCOV_TRACES) |
fddafd51 | 88 | |
5556819a | 89 | ifeq ($(MAKECMDGOALS),lcov-dated) |
6a27e819 ZK |
90 | LCOV_REPORTS_DIR := lcov_reports-$(shell date +%Y%m%d%k%M%S) |
91 | lcov-dated: lcov | |
5556819a | 92 | else |
6a27e819 | 93 | LCOV_REPORTS_DIR := lcov_reports |
5556819a | 94 | endif |
fddafd51 | 95 | |
5556819a | 96 | lcov-reset: |
6a27e819 ZK |
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 | >$@ | |
fddafd51 | 107 | |
a6fd0319 | 108 | ifneq ("$(GENHTML)", "") |
6a27e819 ZK |
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 | |
fddafd51 ZK |
117 | endif |
118 | ||
fddafd51 | 119 | endif |