]> sourceware.org Git - lvm2.git/blame - Makefile.in
Add some log_error msg's and fix potential segfault
[lvm2.git] / Makefile.in
CommitLineData
795ca3e5 1#
6606c3ae 2# Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
4ef2bf27 3# Copyright (C) 2004-2010 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 18
4eee5764 19SUBDIRS = doc include man scripts
69792976 20
5d518f1f
AK
21ifeq ("@UDEV_RULES@", "yes")
22 SUBDIRS += udev
23endif
24
69792976
AK
25ifeq ("@INTL@", "yes")
26 SUBDIRS += po
27endif
28
572fefeb
AK
29SUBDIRS += lib tools daemons libdm
30
31ifeq ("@APPLIB@", "yes")
32 SUBDIRS += liblvm
33endif
795ca3e5 34
5b82db9a 35ifeq ($(MAKECMDGOALS),distclean)
b7be589e
ZK
36 SUBDIRS = doc include man scripts \
37 lib tools daemons libdm \
38 udev po liblvm test/api test
5b82db9a 39endif
e83968fa
ZK
40DISTCLEAN_DIRS += lcov_reports*
41DISTCLEAN_TARGETS += config.cache config.log config.status make.tmpl
5b82db9a 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
0dfae7e4 52lib.device-mapper: include.device-mapper
2c44337b 53libdm.device-mapper: include.device-mapper
7622f312 54liblvm.device-mapper: include.device-mapper
d4b9af44 55daemons.device-mapper: libdm.device-mapper
0782ad50 56tools.device-mapper: libdm.device-mapper
a479de2e 57device-mapper: tools.device-mapper daemons.device-mapper man.device-mapper
0782ad50 58
69792976
AK
59ifeq ("@INTL@", "yes")
60lib.pofile: include.pofile
61tools.pofile: lib.pofile
d3c8211f 62daemons.pofile: lib.pofile
b7edb5bf 63po.pofile: tools.pofile daemons.pofile
69792976
AK
64pofile: po.pofile
65endif
751acb38 66
b41f5924
ZK
67ifneq ("$(CFLOW_CMD)", "")
68tools.cflow: libdm.cflow lib.cflow
69daemons.cflow: tools.cflow
70cflow: include.cflow
8a2fc586
AK
71endif
72
73ifneq ("@CSCOPE_CMD@", "")
08db4eeb
ZK
74cscope.out:
75 @CSCOPE_CMD@ -b -R -s$(top_srcdir)
8a2fc586
AK
76all: cscope.out
77endif
08db4eeb 78DISTCLEAN_TARGETS += cscope.out
f0f8fbc6 79
a2263de0
PR
80check check_cluster check_local: all
81 $(MAKE) -C test $(@)
fddafd51 82
3399ae32 83install_system_dirs:
9cd9dab0 84 $(INSTALL_DIR) $(DESTDIR)$(DEFAULT_SYS_DIR)
3399ae32
AK
85 $(INSTALL_ROOT_DIR) $(DESTDIR)$(DEFAULT_ARCHIVE_DIR)
86 $(INSTALL_ROOT_DIR) $(DESTDIR)$(DEFAULT_BACKUP_DIR)
87 $(INSTALL_ROOT_DIR) $(DESTDIR)$(DEFAULT_CACHE_DIR)
88 $(INSTALL_ROOT_DIR) $(DESTDIR)$(DEFAULT_LOCK_DIR)
8bae0a1e 89 $(INSTALL_ROOT_DIR) $(DESTDIR)$(DEFAULT_RUN_DIR)
3399ae32
AK
90 $(INSTALL_ROOT_DATA) /dev/null $(DESTDIR)$(DEFAULT_CACHE_DIR)/.cache
91
3e730d47
AK
92install_initscripts:
93 $(MAKE) -C scripts install_initscripts
94
395d204d
PR
95install_systemd_units:
96 $(MAKE) -C scripts install_systemd_units
97
6a27e819
ZK
98LCOV_TRACES = libdm.info lib.info tools.info \
99 daemons/dmeventd.info daemons/clvmd.info
100CLEAN_TARGETS += $(LCOV_TRACES)
101
a6fd0319 102ifneq ("$(LCOV)", "")
6a27e819 103.PHONY: lcov-reset lcov lcov-dated $(LCOV_TRACES)
fddafd51 104
5556819a 105ifeq ($(MAKECMDGOALS),lcov-dated)
6a27e819
ZK
106LCOV_REPORTS_DIR := lcov_reports-$(shell date +%Y%m%d%k%M%S)
107lcov-dated: lcov
5556819a 108else
6a27e819 109LCOV_REPORTS_DIR := lcov_reports
5556819a 110endif
fddafd51 111
5556819a 112lcov-reset:
6a27e819
ZK
113 $(LCOV) --zerocounters $(addprefix -d , $(basename $(LCOV_TRACES)))
114
115# maybe use subdirs processing to create tracefiles...
116$(LCOV_TRACES):
117 $(LCOV) -b $(top_srcdir)/$(basename $@) \
118 -d $(basename $@) -c -o - | $(SED) \
119 -e "s/\(dmeventd_lvm.[ch]\)/plugins\/lvm2\/\1/" \
120 -e "s/\(dmeventd_mirror.c\)/plugins\/mirror\/\1/" \
121 -e "s/\(dmeventd_snapshot.c\)/plugins\/snapshot\/\1/" \
122 >$@
fddafd51 123
a6fd0319 124ifneq ("$(GENHTML)", "")
6a27e819
ZK
125lcov: $(LCOV_TRACES)
126 $(RM) -r $(LCOV_REPORTS_DIR)
127 $(MKDIR_P) $(LCOV_REPORTS_DIR)
128 for i in $(LCOV_TRACES); do \
129 test -s $$i && lc="$$lc $$i"; \
130 done; \
fd4728e1 131 test -z "$$lc" || $(GENHTML) -p @abs_top_builddir@ \
6a27e819 132 -o $(LCOV_REPORTS_DIR) $$lc
fddafd51
ZK
133endif
134
fddafd51 135endif
1033d120
JT
136
137ifeq ("$(TESTING)", "yes")
138# testing and report generation
139RUBY=ruby1.9 -Ireport-generators/lib -Ireport-generators/test
140
141.PHONEY: unit-test ruby-test test-programs
142
52e1564f 143# FIXME: put dependencies on libdm and liblvm
1033d120 144test-programs:
66392e66
JT
145 cd unit-tests/regex && $(MAKE)
146 cd unit-tests/datastruct && $(MAKE)
52e1564f 147 cd unit-tests/mm && $(MAKE)
1033d120
JT
148
149unit-test: test-programs
150 $(RUBY) report-generators/unit_test.rb $(shell find . -name TESTS)
151 $(RUBY) report-generators/title_page.rb
152
153memcheck: test-programs
154 $(RUBY) report-generators/memcheck.rb $(shell find . -name TESTS)
155 $(RUBY) report-generators/title_page.rb
156
157ruby-test:
158 $(RUBY) report-generators/test/ts.rb
7622f312 159endif
This page took 0.072661 seconds and 5 git commands to generate.