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