]> sourceware.org Git - lvm2.git/blob - Makefile.in
6d9583b8af8d78204b31fa939ec6c06f1ad80bc4
[lvm2.git] / Makefile.in
1 #
2 # Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
3 # Copyright (C) 2004-2010 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
19 SUBDIRS = doc include man scripts
20
21 ifeq ("@UDEV_RULES@", "yes")
22 SUBDIRS += udev
23 endif
24
25 ifeq ("@INTL@", "yes")
26 SUBDIRS += po
27 endif
28
29 SUBDIRS += lib tools daemons libdm
30
31 ifeq ("@APPLIB@", "yes")
32 SUBDIRS += liblvm
33 endif
34
35 ifeq ("@BUILD_LVMETAD@", "yes")
36 SUBDIRS += libdaemon
37 endif
38
39 ifeq ("@VERITYSETUP@", "yes")
40 SUBDIRS += verity
41 endif
42
43 # FIXME Should use intermediate Makefiles here!
44 ifeq ($(MAKECMDGOALS),distclean)
45 SUBDIRS = doc include man scripts \
46 libdaemon lib tools daemons libdm \
47 udev po liblvm test \
48 unit-tests/datastruct unit-tests/mm unit-tests/regex verity
49 endif
50 DISTCLEAN_DIRS += lcov_reports*
51 DISTCLEAN_TARGETS += config.cache config.log config.status make.tmpl
52
53 include make.tmpl
54
55 libdm: include
56 lib: libdm libdaemon
57 liblvm: lib
58 daemons: lib libdaemon tools
59 tools: lib libdaemon device-mapper
60 verity: libdm
61 po: tools daemons
62
63 lib.device-mapper: include.device-mapper
64 libdm.device-mapper: include.device-mapper
65 liblvm.device-mapper: include.device-mapper
66 daemons.device-mapper: libdm.device-mapper
67 tools.device-mapper: libdm.device-mapper
68 device-mapper: tools.device-mapper daemons.device-mapper man.device-mapper
69
70 ifeq ("@INTL@", "yes")
71 lib.pofile: include.pofile
72 tools.pofile: lib.pofile
73 daemons.pofile: lib.pofile
74 po.pofile: tools.pofile daemons.pofile
75 pofile: po.pofile
76 endif
77
78 ifneq ("$(CFLOW_CMD)", "")
79 tools.cflow: libdm.cflow lib.cflow
80 daemons.cflow: tools.cflow
81 cflow: include.cflow
82 endif
83
84 ifneq ("@CSCOPE_CMD@", "")
85 cscope.out:
86 @CSCOPE_CMD@ -b -R -s$(top_srcdir)
87 all: cscope.out
88 endif
89 DISTCLEAN_TARGETS += cscope.out
90
91 check check_cluster check_local check_lvmetad unit: all
92 $(MAKE) -C test $(@)
93
94 install_system_dirs:
95 $(INSTALL_DIR) $(DESTDIR)$(DEFAULT_SYS_DIR)
96 $(INSTALL_ROOT_DIR) $(DESTDIR)$(DEFAULT_ARCHIVE_DIR)
97 $(INSTALL_ROOT_DIR) $(DESTDIR)$(DEFAULT_BACKUP_DIR)
98 $(INSTALL_ROOT_DIR) $(DESTDIR)$(DEFAULT_CACHE_DIR)
99 $(INSTALL_ROOT_DIR) $(DESTDIR)$(DEFAULT_LOCK_DIR)
100 $(INSTALL_ROOT_DIR) $(DESTDIR)$(DEFAULT_RUN_DIR)
101 $(INSTALL_ROOT_DATA) /dev/null $(DESTDIR)$(DEFAULT_CACHE_DIR)/.cache
102
103 install_initscripts:
104 $(MAKE) -C scripts install_initscripts
105
106 install_systemd_units:
107 $(MAKE) -C scripts install_systemd_units
108
109 install_tmpfiles_configuration:
110 $(MAKE) -C scripts install_tmpfiles_configuration
111
112 install_verity:
113 $(MAKE) -C verity install_verity
114 $(MAKE) -C man install_verity
115
116 LCOV_TRACES = libdm.info lib.info tools.info \
117 daemons/dmeventd.info daemons/clvmd.info
118 CLEAN_TARGETS += $(LCOV_TRACES)
119
120 ifneq ("$(LCOV)", "")
121 .PHONY: lcov-reset lcov lcov-dated $(LCOV_TRACES)
122
123 ifeq ($(MAKECMDGOALS),lcov-dated)
124 LCOV_REPORTS_DIR := lcov_reports-$(shell date +%Y%m%d%k%M%S)
125 lcov-dated: lcov
126 else
127 LCOV_REPORTS_DIR := lcov_reports
128 endif
129
130 lcov-reset:
131 $(LCOV) --zerocounters $(addprefix -d , $(basename $(LCOV_TRACES)))
132
133 # maybe use subdirs processing to create tracefiles...
134 $(LCOV_TRACES):
135 $(LCOV) -b $(basename $@) -d $(basename $@) \
136 --ignore-errors source -c -o - | $(SED) \
137 -e "s/\(dmeventd_lvm.[ch]\)/plugins\/lvm2\/\1/" \
138 -e "s/dmeventd_\(mirror\|snapshot\|thin\|raid\)\.c/plugins\/\1\/dmeventd_\1\.c/" \
139 >$@
140
141 ifneq ("$(GENHTML)", "")
142 lcov: $(LCOV_TRACES)
143 $(RM) -r $(LCOV_REPORTS_DIR)
144 $(MKDIR_P) $(LCOV_REPORTS_DIR)
145 for i in $(LCOV_TRACES); do \
146 test -s $$i && lc="$$lc $$i"; \
147 done; \
148 test -z "$$lc" || $(GENHTML) -p @abs_top_builddir@ \
149 -o $(LCOV_REPORTS_DIR) $$lc
150 endif
151
152 endif
153
154 ifeq ("$(TESTING)", "yes")
155 # testing and report generation
156 RUBY=ruby1.9 -Ireport-generators/lib -Ireport-generators/test
157
158 .PHONEY: unit-test ruby-test test-programs
159
160 # FIXME: put dependencies on libdm and liblvm
161 # FIXME: Should be handled by Makefiles in subdirs, not here at top level.
162 test-programs:
163 cd unit-tests/regex && $(MAKE)
164 cd unit-tests/datastruct && $(MAKE)
165 cd unit-tests/mm && $(MAKE)
166
167 unit-test: test-programs
168 $(RUBY) report-generators/unit_test.rb $(shell find . -name TESTS)
169 $(RUBY) report-generators/title_page.rb
170
171 memcheck: test-programs
172 $(RUBY) report-generators/memcheck.rb $(shell find . -name TESTS)
173 $(RUBY) report-generators/title_page.rb
174
175 ruby-test:
176 $(RUBY) report-generators/test/ts.rb
177 endif
This page took 0.041018 seconds and 4 git commands to generate.