]>
Commit | Line | Data |
---|---|---|
4eee5764 | 1 | # |
00e72fcf | 2 | # Copyright (C) 2006-2011 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, | |
12 | # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
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 | |
52edfba9 | 20 | SCRIPTS = lvmdump.sh lvmconf.sh vgimportclone.sh |
0782ad50 | 21 | ifeq ("@FSADM@", "yes") |
23b059e7 | 22 | SCRIPTS += fsadm.sh |
0782ad50 | 23 | endif |
f5ac9a94 | 24 | |
e40d44be ZK |
25 | OCF_SCRIPTS = |
26 | ifeq ("@OCF@", "yes") | |
27 | OCF_SCRIPTS += VolumeGroup.ocf | |
28 | endif | |
29 | ||
23b059e7 | 30 | vpath %.sh $(srcdir) |
00e72fcf | 31 | vpath %.ocf $(srcdir) |
23b059e7 ZK |
32 | |
33 | %_install: %.sh | |
34 | $(INSTALL_PROGRAM) -D $< $(sbindir)/$(basename $(<F)) | |
35 | ||
e40d44be ZK |
36 | %_install: %.ocf |
37 | $(INSTALL_DIR) $(ocf_scriptdir) | |
38 | $(INSTALL_SCRIPT) $< $(ocf_scriptdir)/$(basename $(<F)) | |
39 | ||
23b059e7 ZK |
40 | install_lvm2: $(SCRIPTS:.sh=_install) |
41 | ||
e40d44be ZK |
42 | install_ocf: $(OCF_SCRIPTS:.ocf=_install) |
43 | ||
44 | install: install_lvm2 install_ocf | |
96e09924 | 45 | |
3e730d47 AK |
46 | # FIXME Customise for other distributions |
47 | install_initscripts: | |
afcae066 | 48 | $(INSTALL_DIR) $(initdir) |
2c893455 | 49 | ifeq ("@BUILD_DMEVENTD@", "yes") |
afcae066 | 50 | $(INSTALL_SCRIPT) lvm2_monitoring_init_red_hat $(initdir)/lvm2-monitor |
2c893455 | 51 | endif |
a30491b2 PR |
52 | ifeq ("@BUILD_LVMETAD@", "yes") |
53 | $(INSTALL_SCRIPT) lvm2_lvmetad_init_red_hat $(initdir)/lvm2-lvmetad | |
54 | endif | |
3e730d47 | 55 | ifneq ("@CLVMD@", "none") |
afcae066 | 56 | $(INSTALL_SCRIPT) clvmd_init_red_hat $(initdir)/clvmd |
3e730d47 AK |
57 | endif |
58 | ifeq ("@BUILD_CMIRRORD@", "yes") | |
afcae066 | 59 | $(INSTALL_SCRIPT) cmirrord_init_red_hat $(initdir)/cmirrord |
3e730d47 AK |
60 | endif |
61 | ||
395d204d PR |
62 | install_systemd_units: |
63 | $(INSTALL_DIR) $(systemd_dir) | |
2c893455 | 64 | ifeq ("@BUILD_DMEVENTD@", "yes") |
395d204d PR |
65 | $(INSTALL_DATA) dm_event_systemd_red_hat.socket $(systemd_dir)/dm-event.socket |
66 | $(INSTALL_DATA) dm_event_systemd_red_hat.service $(systemd_dir)/dm-event.service | |
67 | $(INSTALL_DATA) lvm2_monitoring_systemd_red_hat.service $(systemd_dir)/lvm2-monitor.service | |
2c893455 | 68 | endif |
da532741 PR |
69 | ifeq ("@BUILD_LVMETAD@", "yes") |
70 | $(INSTALL_DATA) lvm2_lvmetad_systemd_red_hat.socket $(systemd_dir)/lvm2-lvmetad.socket | |
dac3c36f | 71 | $(INSTALL_DATA) lvm2_lvmetad_systemd_red_hat.service $(systemd_dir)/lvm2-lvmetad.service |
da532741 | 72 | endif |
395d204d | 73 | |
4417a8bd PR |
74 | install_tmpfiles_configuration: |
75 | $(INSTALL_DIR) $(tmpfiles_dir) | |
76 | $(INSTALL_DATA) lvm2_tmpfiles_red_hat.conf $(tmpfiles_dir)/lvm2.conf | |
77 | ||
395d204d | 78 | DISTCLEAN_TARGETS += clvmd_init_red_hat cmirrord_init_red_hat lvm2_monitoring_init_red_hat \ |
7044863a | 79 | dm_event_systemd_red_hat.service lvm2_monitoring_systemd_red_hat.service \ |
dac3c36f | 80 | lvm2_lvmetad_systemd_red_hat.socket lvm2_lvmetad_systemd_red_hat.service \ |
e6fa4a09 | 81 | lvm2_lvmetad_init_red_hat lvm2_tmpfiles_red_hat.conf |