]>
Commit | Line | Data |
---|---|---|
4eee5764 | 1 | # |
12ba43cc | 2 | # Copyright (C) 2006-2021 Red Hat, Inc. All rights reserved. |
4eee5764 | 3 | # |
7f8f8bfa | 4 | # This file is part of LVM2. |
4eee5764 AK |
5 | # |
6 | # This copyrighted material is made available to anyone wishing to use, | |
7 | # modify, copy, or redistribute it subject to the terms and conditions | |
8 | # of the GNU General Public License v.2. | |
9 | # | |
10 | # You should have received a copy of the GNU General Public License | |
11 | # along with this program; if not, write to the Free Software Foundation, | |
fcbef05a | 12 | # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
4eee5764 AK |
13 | |
14 | srcdir = @srcdir@ | |
15 | top_srcdir = @top_srcdir@ | |
db8b5af9 | 16 | top_builddir = @top_builddir@ |
4eee5764 | 17 | |
814aebc4 | 18 | include $(top_builddir)/make.tmpl |
4eee5764 | 19 | |
95dd5bc7 | 20 | ifeq ("@BUILD_DMEVENTD@", "yes") |
bbef4edd | 21 | LDFLAGS += -Wl,-rpath-link,$(top_builddir)/daemons/dmeventd |
a91fbe9d | 22 | endif |
fa68466e | 23 | |
19a59cc5 | 24 | LVM_SCRIPTS = lvmdump.sh |
375ed98a | 25 | DM_SCRIPTS = |
fa68466e | 26 | |
0782ad50 | 27 | ifeq ("@FSADM@", "yes") |
375ed98a | 28 | LVM_SCRIPTS += fsadm.sh |
0782ad50 | 29 | endif |
f5ac9a94 | 30 | |
12ba43cc | 31 | ifeq ("@LVMIMPORTVDO@", "yes") |
bbbd4fed | 32 | LVM_SCRIPTS += lvm_import_vdo.sh |
ed48cb26 ZK |
33 | endif |
34 | ||
c698ee14 | 35 | ifeq ("@BLKDEACTIVATE@", "yes") |
375ed98a | 36 | DM_SCRIPTS += blkdeactivate.sh |
c698ee14 PR |
37 | endif |
38 | ||
e40d44be ZK |
39 | OCF_SCRIPTS = |
40 | ifeq ("@OCF@", "yes") | |
41 | OCF_SCRIPTS += VolumeGroup.ocf | |
42 | endif | |
43 | ||
23b059e7 | 44 | vpath %.sh $(srcdir) |
00e72fcf | 45 | vpath %.ocf $(srcdir) |
23b059e7 ZK |
46 | |
47 | %_install: %.sh | |
88ad83e3 | 48 | $(SHOW) " [INSTALL] $^" |
ceb2f0ad | 49 | $(Q) $(INSTALL_PROGRAM) -D $< $(sbindir)/$(basename $(<F)) |
23b059e7 | 50 | |
e40d44be | 51 | %_install: %.ocf |
88ad83e3 | 52 | $(SHOW) " [INSTALL] $^" |
ceb2f0ad ZK |
53 | $(Q) $(INSTALL_DIR) $(ocf_scriptdir) |
54 | $(Q) $(INSTALL_SCRIPT) $< $(ocf_scriptdir)/$(basename $(<F)) | |
e40d44be | 55 | |
41e4cefc | 56 | install_lvm2: install_libexec $(LVM_SCRIPTS:.sh=_install) |
375ed98a | 57 | install_device-mapper: $(DM_SCRIPTS:.sh=_install) |
23b059e7 | 58 | |
e40d44be ZK |
59 | install_ocf: $(OCF_SCRIPTS:.ocf=_install) |
60 | ||
d3565614 | 61 | install_libexec: lvresize_fs_helper.sh |
88ad83e3 | 62 | $(SHOW) " [INSTALL] $^" |
a0fc6117 | 63 | $(Q) $(INSTALL_DIR) $(libexecdir) |
d3565614 | 64 | $(Q) $(INSTALL_SCRIPT) $< $(libexecdir)/$(basename $(<F)) |
264827cb | 65 | |
41e4cefc | 66 | install: install_lvm2 install_ocf install_device-mapper |
264827cb | 67 | |
96e09924 | 68 | |
3e730d47 AK |
69 | # FIXME Customise for other distributions |
70 | install_initscripts: | |
88ad83e3 | 71 | $(SHOW) " [INSTALL] initscripts" |
ceb2f0ad | 72 | $(Q) $(INSTALL_DIR) $(initdir) |
2c893455 | 73 | ifeq ("@BUILD_DMEVENTD@", "yes") |
ceb2f0ad | 74 | $(Q) $(INSTALL_SCRIPT) lvm2_monitoring_init_red_hat $(initdir)/lvm2-monitor |
2c893455 | 75 | endif |
e587b067 | 76 | ifeq ("@BUILD_LVMPOLLD@", "yes") |
ceb2f0ad | 77 | $(Q) $(INSTALL_SCRIPT) lvm2_lvmpolld_init_red_hat $(initdir)/lvm2-lvmpolld |
e587b067 | 78 | endif |
3e730d47 | 79 | ifeq ("@BUILD_CMIRRORD@", "yes") |
ceb2f0ad | 80 | $(Q) $(INSTALL_SCRIPT) cmirrord_init_red_hat $(initdir)/cmirrord |
3e730d47 | 81 | endif |
c698ee14 | 82 | ifeq ("@BLKDEACTIVATE@", "yes") |
ceb2f0ad | 83 | $(Q) $(INSTALL_SCRIPT) blk_availability_init_red_hat $(initdir)/blk-availability |
c698ee14 | 84 | endif |
3e730d47 | 85 | |
5987562c | 86 | install_systemd_units: install_dbus_service |
88ad83e3 | 87 | $(SHOW) " [INSTALL] systemd_units" |
ceb2f0ad | 88 | $(Q) $(INSTALL_DIR) $(systemd_unit_dir) |
2c893455 | 89 | ifeq ("@BUILD_DMEVENTD@", "yes") |
ceb2f0ad ZK |
90 | $(Q) $(INSTALL_DATA) dm_event_systemd_red_hat.socket $(systemd_unit_dir)/dm-event.socket |
91 | $(Q) $(INSTALL_DATA) dm_event_systemd_red_hat.service $(systemd_unit_dir)/dm-event.service | |
92 | $(Q) $(INSTALL_DATA) lvm2_monitoring_systemd_red_hat.service $(systemd_unit_dir)/lvm2-monitor.service | |
2c893455 | 93 | endif |
c698ee14 | 94 | ifeq ("@BLKDEACTIVATE@", "yes") |
ceb2f0ad | 95 | $(Q) $(INSTALL_DATA) blk_availability_systemd_red_hat.service $(systemd_unit_dir)/blk-availability.service |
c698ee14 | 96 | endif |
e587b067 | 97 | ifeq ("@BUILD_LVMPOLLD@", "yes") |
ceb2f0ad ZK |
98 | $(Q) $(INSTALL_DATA) lvm2_lvmpolld_systemd_red_hat.socket $(systemd_unit_dir)/lvm2-lvmpolld.socket |
99 | $(Q) $(INSTALL_DATA) lvm2_lvmpolld_systemd_red_hat.service $(systemd_unit_dir)/lvm2-lvmpolld.service | |
e587b067 | 100 | endif |
fe70b03d | 101 | ifeq ("@BUILD_LVMLOCKD@", "yes") |
ceb2f0ad ZK |
102 | $(Q) $(INSTALL_DATA) lvmlockd.service $(systemd_unit_dir)/lvmlockd.service |
103 | $(Q) $(INSTALL_DATA) lvmlocks.service $(systemd_unit_dir)/lvmlocks.service | |
fe70b03d | 104 | endif |
ef91de2a | 105 | ifeq ("@BUILD_CMIRRORD@", "yes") |
ceb2f0ad | 106 | $(Q) $(INSTALL_DATA) lvm2_cmirrord_systemd_red_hat.service $(systemd_unit_dir)/lvm2-cmirrord.service |
ef91de2a | 107 | endif |
5987562c | 108 | ifeq ("@BUILD_LVMDBUSD@", "yes") |
ceb2f0ad | 109 | $(Q) $(INSTALL_DATA) lvm2_lvmdbusd_systemd_red_hat.service $(systemd_unit_dir)/lvm2-lvmdbusd.service |
5987562c | 110 | endif |
1b9bf500 MC |
111 | $(Q) $(INSTALL_DATA) lvm-devices-import.path $(systemd_unit_dir)/lvm-devices-import.path |
112 | $(Q) $(INSTALL_DATA) lvm-devices-import.service $(systemd_unit_dir)/lvm-devices-import.service | |
5987562c AK |
113 | |
114 | ifeq ("@BUILD_LVMDBUSD@", "yes") | |
115 | install_dbus_service: | |
88ad83e3 | 116 | $(SHOW) " [INSTALL] dbus_service" |
ceb2f0ad ZK |
117 | $(Q) $(INSTALL_DIR) $(dbusconfdir) |
118 | $(Q) $(INSTALL_DIR) $(dbusservicedir) | |
119 | $(Q) $(INSTALL_DATA) $(top_srcdir)/scripts/com.redhat.lvmdbus1.conf $(dbusconfdir) | |
120 | $(Q) $(INSTALL_DATA) com.redhat.lvmdbus1.service $(dbusservicedir) | |
5987562c AK |
121 | |
122 | install_systemd_units: install_dbus_service | |
123 | endif | |
395d204d | 124 | |
4417a8bd | 125 | install_tmpfiles_configuration: |
88ad83e3 | 126 | $(SHOW) " [INSTALL] configuration" |
f619cac5 ZK |
127 | $(Q) $(INSTALL_DIR) $(tmpfiles_dir) |
128 | $(Q) $(INSTALL_DATA) lvm2_tmpfiles_red_hat.conf $(tmpfiles_dir)/lvm2.conf | |
4417a8bd | 129 | |
d3565614 ZK |
130 | .PHONY: install_systemd_units install_initscripts |
131 | .PHONY: install_libexec install_ocf | |
132 | ||
9d64573d | 133 | DISTCLEAN_TARGETS += \ |
1af05a7a ZK |
134 | blkdeactivate.sh \ |
135 | blk_availability_init_red_hat \ | |
136 | blk_availability_systemd_red_hat.service \ | |
137 | clvmd_init_red_hat \ | |
138 | cmirrord_init_red_hat \ | |
fc37ee63 | 139 | com.redhat.lvmdbus1.service \ |
1af05a7a ZK |
140 | dm_event_systemd_red_hat.service \ |
141 | dm_event_systemd_red_hat.socket \ | |
dbcfd597 | 142 | lvmdump.sh \ |
a6652064 | 143 | lvm2-pvscan.service \ |
1af05a7a ZK |
144 | lvm2_cluster_activation_red_hat.sh \ |
145 | lvm2_cluster_activation_systemd_red_hat.service \ | |
146 | lvm2_clvmd_systemd_red_hat.service \ | |
147 | lvm2_cmirrord_systemd_red_hat.service \ | |
fc37ee63 | 148 | lvm2_lvmdbusd_systemd_red_hat.service \ |
fd3d795b | 149 | lvm2_lvmpolld_init_red_hat \ |
e587b067 OK |
150 | lvm2_lvmpolld_systemd_red_hat.service \ |
151 | lvm2_lvmpolld_systemd_red_hat.socket \ | |
19a59cc5 DT |
152 | lvmlockd.service \ |
153 | lvmlocks.service \ | |
1af05a7a ZK |
154 | lvm2_monitoring_init_red_hat \ |
155 | lvm2_monitoring_systemd_red_hat.service \ | |
156 | lvm2_pvscan_systemd_red_hat@.service \ | |
157 | lvm2_tmpfiles_red_hat.conf | |
b55d3095 ZK |
158 | |
159 | # Remove ancient files | |
160 | DISTCLEAN_TARGETS += \ | |
161 | lvm2_lvmlocking_systemd_red_hat.service |