]> sourceware.org Git - lvm2.git/blame_incremental - Makefile.in
integrity: add --integritysettings for tuning
[lvm2.git] / Makefile.in
... / ...
CommitLineData
1#
2# Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
3# Copyright (C) 2004-2018 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
14
15srcdir = @srcdir@
16top_srcdir = @top_srcdir@
17top_builddir = @top_builddir@
18abs_top_builddir = @abs_top_builddir@
19abs_top_srcdir = @abs_top_srcdir@
20
21SUBDIRS = libdm conf daemons include lib libdaemon man scripts tools
22
23ifeq ("@UDEV_RULES@", "yes")
24 SUBDIRS += udev
25endif
26
27ifeq ("@INTL@", "yes")
28 SUBDIRS += po
29endif
30
31ifeq ($(MAKECMDGOALS),clean)
32 SUBDIRS += test
33endif
34# FIXME Should use intermediate Makefiles here!
35ifeq ($(MAKECMDGOALS),distclean)
36 SUBDIRS = conf include man test scripts \
37 libdaemon lib tools daemons libdm \
38 udev po
39tools.distclean: test.distclean
40endif
41DISTCLEAN_DIRS += lcov_reports* autom4te.cache
42DISTCLEAN_TARGETS += config.cache config.log config.status make.tmpl
43
44include make.tmpl
45
46include $(top_srcdir)/base/Makefile
47include $(top_srcdir)/device_mapper/Makefile
48include $(top_srcdir)/test/unit/Makefile
49
50lib: include libdaemon $(BASE_TARGET) $(DEVICE_MAPPER_TARGET)
51daemons: lib libdaemon tools
52scripts: lib
53tools: lib libdaemon
54po: tools daemons
55man: tools
56all_man: tools
57test: tools daemons
58unit-test run-unit-test: test libdm
59
60daemons.device-mapper: libdm.device-mapper
61tools.device-mapper: libdm.device-mapper
62device-mapper: tools.device-mapper daemons.device-mapper man.device-mapper
63device_mapper: device-mapper
64
65ifeq ("@INTL@", "yes")
66lib.pofile: include.pofile
67tools.pofile: lib.pofile
68daemons.pofile: lib.pofile
69po.pofile: tools.pofile daemons.pofile
70pofile: po.pofile
71endif
72
73ifneq ("$(CFLOW_CMD)", "")
74tools.cflow: libdm.cflow lib.cflow
75daemons.cflow: tools.cflow
76cflow: include.cflow
77endif
78
79CSCOPE_DIRS = base daemons device_mapper include lib libdaemon scripts tools libdm test
80ifneq ("@CSCOPE_CMD@", "")
81cscope.out:
82 @CSCOPE_CMD@ -b -R $(patsubst %,-s%,$(addprefix $(srcdir)/,$(CSCOPE_DIRS)))
83all: cscope.out
84endif
85DISTCLEAN_TARGETS += cscope.out
86CLEAN_DIRS += autom4te.cache
87
88check check_system check_cluster check_local check_lvmpolld check_lvmlockd_test check_lvmlockd_dlm check_lvmlockd_sanlock: test
89 $(MAKE) -C test $(@)
90
91conf.generate man.generate: tools
92
93# how to use parenthesis in makefiles
94leftparen:=(
95LVM_VER := $(firstword $(subst $(leftparen), ,$(LVM_VERSION)))
96VER := LVM2.$(LVM_VER)
97# release file name
98FILE_VER := $(VER).tgz
99CLEAN_TARGETS += $(FILE_VER)
100CLEAN_DIRS += $(rpmbuilddir)
101
102dist:
103 @echo "Generating $(FILE_VER)";\
104 (cd $(top_srcdir); git ls-tree -r HEAD --name-only | xargs tar --transform "s,^,$(VER)/," -c) | gzip >$(FILE_VER)
105
106rpm: dist
107 $(RM) -r $(rpmbuilddir)/SOURCES
108 $(MKDIR_P) $(rpmbuilddir)/SOURCES
109 $(LN_S) -f $(abs_top_builddir)/$(FILE_VER) $(rpmbuilddir)/SOURCES
110 $(LN_S) -f $(abs_top_srcdir)/spec/build.inc $(rpmbuilddir)/SOURCES
111 $(LN_S) -f $(abs_top_srcdir)/spec/macros.inc $(rpmbuilddir)/SOURCES
112 $(LN_S) -f $(abs_top_srcdir)/spec/packages.inc $(rpmbuilddir)/SOURCES
113 DM_VER=$$(cut -d- -f1 $(top_srcdir)/VERSION_DM);\
114 GIT_VER=$$(cd $(top_srcdir); git describe | cut -d- --output-delimiter=. -f2,3 || echo 0);\
115 $(SED) -e "s,\(device_mapper_version\) [0-9.]*$$,\1 $$DM_VER," \
116 -e "s,^\(Version:[^0-9%]*\)[0-9.]*$$,\1 $(LVM_VER)," \
117 -e "s,^\(Release:[^0-9%]*\)[0-9.]\+,\1 $$GIT_VER," \
118 $(top_srcdir)/spec/source.inc >$(rpmbuilddir)/SOURCES/source.inc
119 V=$(V) rpmbuild -v --define "_topdir $(rpmbuilddir)" -ba $(top_srcdir)/spec/lvm2.spec
120
121generate: conf.generate man.generate
122 $(MAKE) -C conf generate
123 $(MAKE) -C man generate
124
125all_man:
126 $(MAKE) -C man all_man
127
128install_system_dirs:
129 $(INSTALL_DIR) $(DESTDIR)$(DEFAULT_SYS_DIR)
130 $(INSTALL_ROOT_DIR) $(DESTDIR)$(DEFAULT_SYS_DIR)/devices
131 $(INSTALL_ROOT_DIR) $(DESTDIR)$(DEFAULT_ARCHIVE_DIR)
132 $(INSTALL_ROOT_DIR) $(DESTDIR)$(DEFAULT_BACKUP_DIR)
133 $(INSTALL_ROOT_DIR) $(DESTDIR)$(DEFAULT_CACHE_DIR)
134 $(INSTALL_ROOT_DIR) $(DESTDIR)$(DEFAULT_LOCK_DIR)
135 $(INSTALL_ROOT_DIR) $(DESTDIR)$(DEFAULT_RUN_DIR)
136 $(INSTALL_ROOT_DATA) /dev/null $(DESTDIR)$(DEFAULT_CACHE_DIR)/.cache
137
138install_initscripts:
139 $(MAKE) -C scripts install_initscripts
140
141install_systemd_generators:
142 $(MAKE) -C scripts install_systemd_generators
143 $(MAKE) -C man install_systemd_generators
144
145install_systemd_units:
146 $(MAKE) -C scripts install_systemd_units
147
148install_all_man:
149 $(MAKE) -C man install_all_man
150
151install_tmpfiles_configuration:
152 $(MAKE) -C scripts install_tmpfiles_configuration
153
154help:
155 @echo -e "\nAvailable targets:"
156 @echo " all Default target."
157 @echo " all_man Build all man pages with generators."
158 @echo " clean Remove all compile files."
159 @echo " device-mapper Device mapper part of lvm2."
160 @echo " dist Generate distributable file."
161 @echo " distclean Remove all build files."
162 @echo " generate Generate man pages for sources."
163 @echo " help Display callable targets."
164 @echo " install Install all files."
165 @echo " install_all_man Install all man pages."
166 @echo " install_cluster Install cmirrord."
167 @echo " install_device-mapper Install device mapper files."
168 @echo " install_initscripts Install initialization scripts."
169 @echo " install_lvm2 Install lvm2 files."
170 @echo " install_systemd_units Install systemd units."
171 @echo " lcov Generate lcov output."
172 @echo " lcov-dated Generate lcov with timedate suffix."
173 @echo " lcov-reset Reset lcov counters"
174 @echo " man Build man pages."
175 @echo " print-VARIABLE Resolve make variable."
176 @echo " rpm Build rpm."
177 @echo " run-unit-test Run unit tests."
178 @echo " tags Generate c/etags."
179
180ifneq ("$(LCOV)", "")
181.PHONY: lcov-reset lcov lcov-dated
182
183ifeq ($(MAKECMDGOALS),lcov-dated)
184LCOV_REPORTS_DIR := lcov_reports-$(shell date +%Y%m%d%k%M%S)
185lcov-dated: lcov
186else
187LCOV_REPORTS_DIR := lcov_reports
188endif
189
190lcov-reset:
191 $(LCOV) --zerocounters --directory $(top_builddir)
192
193ifneq ("$(GENHTML)", "")
194lcov:
195 $(RM) -rf $(LCOV_REPORTS_DIR)
196 $(MKDIR_P) $(LCOV_REPORTS_DIR)
197 $(LCOV) --capture --directory $(top_builddir) --ignore-errors source \
198 --output-file $(LCOV_REPORTS_DIR)/out.info
199 -test ! -s $(LCOV_REPORTS_DIR)/out.info || \
200 $(GENHTML) -o $(LCOV_REPORTS_DIR) --ignore-errors source \
201 $(LCOV_REPORTS_DIR)/out.info
202endif
203
204endif
205
206ifneq ($(shell which ctags 2>/dev/null),)
207.PHONY: tags
208tags:
209 test -z "$(shell find $(addprefix $(top_srcdir)/,$(CSCOPE_DIRS)) -type f -name '*.[ch]' -newer tags 2>/dev/null | head -1)" || $(RM) tags
210 test -f tags || find $(addprefix $(top_srcdir)/,$(CSCOPE_DIRS)) -maxdepth 5 -type f -name '*.[ch]' -exec ctags -a '{}' +
211
212CLEAN_TARGETS += tags
213endif
This page took 0.025045 seconds and 6 git commands to generate.