]> sourceware.org Git - lvm2.git/blob - scripts/Makefile.in
adbf1b20ba55444042baeb085ca74232af9677c6
[lvm2.git] / scripts / Makefile.in
1 #
2 # Copyright (C) 2006-2021 Red Hat, Inc. All rights reserved.
3 #
4 # This file is part of LVM2.
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,
12 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
13
14 srcdir = @srcdir@
15 top_srcdir = @top_srcdir@
16 top_builddir = @top_builddir@
17
18 include $(top_builddir)/make.tmpl
19
20 ifeq ("@BUILD_DMEVENTD@", "yes")
21 LDFLAGS += -Wl,-rpath-link,$(top_builddir)/daemons/dmeventd
22 endif
23
24 LVM_SCRIPTS = lvmdump.sh
25 DM_SCRIPTS =
26
27 ifeq ("@FSADM@", "yes")
28 LVM_SCRIPTS += fsadm.sh
29 endif
30
31 ifeq ("@LVMIMPORTVDO@", "yes")
32 LVM_SCRIPTS += lvm_import_vdo.sh
33 endif
34
35 ifeq ("@BLKDEACTIVATE@", "yes")
36 DM_SCRIPTS += blkdeactivate.sh
37 endif
38
39 OCF_SCRIPTS =
40 ifeq ("@OCF@", "yes")
41 OCF_SCRIPTS += VolumeGroup.ocf
42 endif
43
44 vpath %.sh $(srcdir)
45 vpath %.ocf $(srcdir)
46
47 %_install: %.sh
48 $(SHOW) " [INSTALL] $^"
49 $(Q) $(INSTALL_PROGRAM) -D $< $(sbindir)/$(basename $(<F))
50
51 %_install: %.ocf
52 $(SHOW) " [INSTALL] $^"
53 $(Q) $(INSTALL_DIR) $(ocf_scriptdir)
54 $(Q) $(INSTALL_SCRIPT) $< $(ocf_scriptdir)/$(basename $(<F))
55
56 install_lvm2: install_libexec $(LVM_SCRIPTS:.sh=_install)
57 install_device-mapper: $(DM_SCRIPTS:.sh=_install)
58
59 install_ocf: $(OCF_SCRIPTS:.ocf=_install)
60
61 install_libexec: lvresize_fs_helper.sh
62 $(SHOW) " [INSTALL] $^"
63 $(Q) $(INSTALL_DIR) $(libexecdir)
64 $(Q) $(INSTALL_SCRIPT) $< $(libexecdir)/$(basename $(<F))
65
66 install: install_lvm2 install_ocf install_device-mapper
67
68
69 # FIXME Customize for other distributions
70 install_initscripts:
71 $(SHOW) " [INSTALL] initscripts"
72 $(Q) $(INSTALL_DIR) $(initdir)
73 ifeq ("@BUILD_DMEVENTD@", "yes")
74 $(Q) $(INSTALL_SCRIPT) lvm2_monitoring_init_red_hat $(initdir)/lvm2-monitor
75 endif
76 ifeq ("@BUILD_LVMPOLLD@", "yes")
77 $(Q) $(INSTALL_SCRIPT) lvm2_lvmpolld_init_red_hat $(initdir)/lvm2-lvmpolld
78 endif
79 ifeq ("@BUILD_CMIRRORD@", "yes")
80 $(Q) $(INSTALL_SCRIPT) cmirrord_init_red_hat $(initdir)/cmirrord
81 endif
82 ifeq ("@BLKDEACTIVATE@", "yes")
83 $(Q) $(INSTALL_SCRIPT) blk_availability_init_red_hat $(initdir)/blk-availability
84 endif
85
86 install_systemd_units: install_dbus_service
87 $(SHOW) " [INSTALL] systemd_units"
88 $(Q) $(INSTALL_DIR) $(systemd_unit_dir)
89 ifeq ("@BUILD_DMEVENTD@", "yes")
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
93 endif
94 ifeq ("@BLKDEACTIVATE@", "yes")
95 $(Q) $(INSTALL_DATA) blk_availability_systemd_red_hat.service $(systemd_unit_dir)/blk-availability.service
96 endif
97 ifeq ("@BUILD_LVMPOLLD@", "yes")
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
100 endif
101 ifeq ("@BUILD_LVMLOCKD@", "yes")
102 $(Q) $(INSTALL_DATA) lvmlockd.service $(systemd_unit_dir)/lvmlockd.service
103 $(Q) $(INSTALL_DATA) lvmlocks.service $(systemd_unit_dir)/lvmlocks.service
104 endif
105 ifeq ("@BUILD_CMIRRORD@", "yes")
106 $(Q) $(INSTALL_DATA) lvm2_cmirrord_systemd_red_hat.service $(systemd_unit_dir)/lvm2-cmirrord.service
107 endif
108 ifeq ("@BUILD_LVMDBUSD@", "yes")
109 $(Q) $(INSTALL_DATA) lvm2_lvmdbusd_systemd_red_hat.service $(systemd_unit_dir)/lvm2-lvmdbusd.service
110 endif
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
113
114 ifeq ("@BUILD_LVMDBUSD@", "yes")
115 install_dbus_service:
116 $(SHOW) " [INSTALL] dbus_service"
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)
121
122 install_systemd_units: install_dbus_service
123 endif
124
125 install_tmpfiles_configuration:
126 $(SHOW) " [INSTALL] configuration"
127 $(Q) $(INSTALL_DIR) $(tmpfiles_dir)
128 $(Q) $(INSTALL_DATA) lvm2_tmpfiles_red_hat.conf $(tmpfiles_dir)/lvm2.conf
129
130 .PHONY: install_systemd_units install_initscripts
131 .PHONY: install_libexec install_ocf
132
133 DISTCLEAN_TARGETS += \
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 \
139 com.redhat.lvmdbus1.service \
140 dm_event_systemd_red_hat.service \
141 dm_event_systemd_red_hat.socket \
142 lvmdump.sh \
143 lvm2-pvscan.service \
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 \
148 lvm2_lvmdbusd_systemd_red_hat.service \
149 lvm2_lvmpolld_init_red_hat \
150 lvm2_lvmpolld_systemd_red_hat.service \
151 lvm2_lvmpolld_systemd_red_hat.socket \
152 lvmlockd.service \
153 lvmlocks.service \
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
158
159 # Remove ancient files
160 DISTCLEAN_TARGETS += \
161 lvm2_lvmlocking_systemd_red_hat.service
This page took 0.048591 seconds and 6 git commands to generate.