]> sourceware.org Git - lvm2.git/blame - Makefile.in
dev-type: detect mixed dos partition with gpt's PMBR
[lvm2.git] / Makefile.in
CommitLineData
795ca3e5 1#
6606c3ae 2# Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
e2c766d3 3# Copyright (C) 2004-2018 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,
fcbef05a 13# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
795ca3e5
AK
14
15srcdir = @srcdir@
16top_srcdir = @top_srcdir@
db8b5af9 17top_builddir = @top_builddir@
7de61533
ZK
18abs_top_builddir = @abs_top_builddir@
19abs_top_srcdir = @abs_top_srcdir@
795ca3e5 20
aee0cd65 21SUBDIRS = libdm conf daemons include lib libdaemon man scripts tools
69792976 22
5d518f1f
AK
23ifeq ("@UDEV_RULES@", "yes")
24 SUBDIRS += udev
25endif
26
69792976
AK
27ifeq ("@INTL@", "yes")
28 SUBDIRS += po
29endif
30
9b2be901
ZK
31ifeq ($(MAKECMDGOALS),clean)
32 SUBDIRS += test
33endif
40dbaac8 34# FIXME Should use intermediate Makefiles here!
5b82db9a 35ifeq ($(MAKECMDGOALS),distclean)
6d1ed225 36 SUBDIRS = conf include man test scripts \
7126d8c2 37 libdaemon lib tools daemons libdm \
ae961a19 38 udev po
895ee616 39tools.distclean: test.distclean
5b82db9a 40endif
f8712c6c 41DISTCLEAN_DIRS += lcov_reports* autom4te.cache
e83968fa 42DISTCLEAN_TARGETS += config.cache config.log config.status make.tmpl
5b82db9a 43
795ca3e5
AK
44include make.tmpl
45
94237354
ZK
46include $(top_srcdir)/base/Makefile
47include $(top_srcdir)/device_mapper/Makefile
48include $(top_srcdir)/test/unit/Makefile
49
c1ab9fb3 50lib: include libdaemon $(BASE_TARGET) $(DEVICE_MAPPER_TARGET)
7126d8c2 51daemons: lib libdaemon tools
94237354
ZK
52scripts: lib
53tools: lib libdaemon
b7edb5bf 54po: tools daemons
22457ed4 55man: tools
c868562a 56all_man: tools
79b29613 57test: tools daemons
5125629f 58unit-test run-unit-test: test libdm
751acb38 59
d4b9af44 60daemons.device-mapper: libdm.device-mapper
0782ad50 61tools.device-mapper: libdm.device-mapper
a479de2e 62device-mapper: tools.device-mapper daemons.device-mapper man.device-mapper
5509e764 63device_mapper: device-mapper
0782ad50 64
69792976
AK
65ifeq ("@INTL@", "yes")
66lib.pofile: include.pofile
67tools.pofile: lib.pofile
d3c8211f 68daemons.pofile: lib.pofile
b7edb5bf 69po.pofile: tools.pofile daemons.pofile
69792976
AK
70pofile: po.pofile
71endif
751acb38 72
b41f5924
ZK
73ifneq ("$(CFLOW_CMD)", "")
74tools.cflow: libdm.cflow lib.cflow
75daemons.cflow: tools.cflow
76cflow: include.cflow
8a2fc586
AK
77endif
78
2e84dd47 79CSCOPE_DIRS = base daemons device_mapper include lib libdaemon scripts tools libdm test
8a2fc586 80ifneq ("@CSCOPE_CMD@", "")
08db4eeb 81cscope.out:
9452e62e 82 @CSCOPE_CMD@ -b -R $(patsubst %,-s%,$(addprefix $(srcdir)/,$(CSCOPE_DIRS)))
8a2fc586
AK
83all: cscope.out
84endif
08db4eeb 85DISTCLEAN_TARGETS += cscope.out
a8fc483c 86CLEAN_DIRS += autom4te.cache
f0f8fbc6 87
117160b2 88check check_system check_cluster check_local check_lvmpolld check_lvmlockd_test check_lvmlockd_dlm check_lvmlockd_sanlock: test
a2263de0 89 $(MAKE) -C test $(@)
fddafd51 90
ca905681 91conf.generate man.generate: tools
47ed4cdc 92
9c2a6de6
ZK
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)
7de61533
ZK
101
102dist:
9c2a6de6
ZK
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)
7de61533
ZK
105
106rpm: dist
9c2a6de6
ZK
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);\
e080e35c 115 $(SED) -e "s,\(device_mapper_version\) [0-9.]*$$,\1 $$DM_VER," \
9c2a6de6
ZK
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
7df4a132 119 V=$(V) rpmbuild -v --define "_topdir $(rpmbuilddir)" -ba $(top_srcdir)/spec/lvm2.spec
7de61533 120
ca905681 121generate: conf.generate man.generate
47ed4cdc 122 $(MAKE) -C conf generate
ca905681 123 $(MAKE) -C man generate
47ed4cdc 124
548c09ac
AK
125all_man:
126 $(MAKE) -C man all_man
127
3399ae32 128install_system_dirs:
9cd9dab0 129 $(INSTALL_DIR) $(DESTDIR)$(DEFAULT_SYS_DIR)
ee31ba50 130 $(INSTALL_ROOT_DIR) $(DESTDIR)$(DEFAULT_SYS_DIR)/devices
3399ae32
AK
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)
8bae0a1e 135 $(INSTALL_ROOT_DIR) $(DESTDIR)$(DEFAULT_RUN_DIR)
3399ae32
AK
136 $(INSTALL_ROOT_DATA) /dev/null $(DESTDIR)$(DEFAULT_CACHE_DIR)/.cache
137
e2c766d3 138install_initscripts:
3e730d47
AK
139 $(MAKE) -C scripts install_initscripts
140
fa68466e
PR
141install_systemd_generators:
142 $(MAKE) -C scripts install_systemd_generators
031666ef 143 $(MAKE) -C man install_systemd_generators
fa68466e 144
395d204d
PR
145install_systemd_units:
146 $(MAKE) -C scripts install_systemd_units
147
548c09ac
AK
148install_all_man:
149 $(MAKE) -C man install_all_man
cc17210b 150
4417a8bd
PR
151install_tmpfiles_configuration:
152 $(MAKE) -C scripts install_tmpfiles_configuration
153
9d190d6b
ZK
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."
31076942 175 @echo " print-VARIABLE Resolve make variable."
9d190d6b
ZK
176 @echo " rpm Build rpm."
177 @echo " run-unit-test Run unit tests."
178 @echo " tags Generate c/etags."
179
a6fd0319 180ifneq ("$(LCOV)", "")
483ed8f7 181.PHONY: lcov-reset lcov lcov-dated
fddafd51 182
5556819a 183ifeq ($(MAKECMDGOALS),lcov-dated)
6a27e819
ZK
184LCOV_REPORTS_DIR := lcov_reports-$(shell date +%Y%m%d%k%M%S)
185lcov-dated: lcov
5556819a 186else
6a27e819 187LCOV_REPORTS_DIR := lcov_reports
5556819a 188endif
fddafd51 189
5556819a 190lcov-reset:
483ed8f7 191 $(LCOV) --zerocounters --directory $(top_builddir)
fddafd51 192
a6fd0319 193ifneq ("$(GENHTML)", "")
483ed8f7
ZK
194lcov:
195 $(RM) -rf $(LCOV_REPORTS_DIR)
6a27e819 196 $(MKDIR_P) $(LCOV_REPORTS_DIR)
2b864aeb 197 $(LCOV) --capture --directory $(top_builddir) --ignore-errors source \
7fb280ce
ZK
198 --output-file $(LCOV_REPORTS_DIR)/out.info
199 -test ! -s $(LCOV_REPORTS_DIR)/out.info || \
2b864aeb 200 $(GENHTML) -o $(LCOV_REPORTS_DIR) --ignore-errors source \
7fb280ce 201 $(LCOV_REPORTS_DIR)/out.info
fddafd51
ZK
202endif
203
fddafd51 204endif
1033d120 205
a1e5b883 206ifneq ($(shell which ctags 2>/dev/null),)
beb65056 207.PHONY: tags
beb65056 208tags:
2e84dd47
ZK
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 '{}' +
beb65056 211
acfc5695 212CLEAN_TARGETS += tags
beb65056 213endif
This page took 0.170147 seconds and 6 git commands to generate.