2 # Copyright (C) 2006-2011 Red Hat, Inc. All rights reserved.
4 # This file is part of LVM2.
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.
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
15 top_srcdir
= @top_srcdir@
16 top_builddir
= @top_builddir@
18 include $(top_builddir
)/make.tmpl
20 SCRIPTS
= lvmdump.sh lvmconf.sh vgimportclone.sh
21 ifeq ("@FSADM@", "yes")
27 OCF_SCRIPTS
+= VolumeGroup.ocf
34 $(INSTALL_PROGRAM
) -D
$< $(sbindir
)/$(basename $(<F
))
37 $(INSTALL_DIR
) $(ocf_scriptdir
)
38 $(INSTALL_SCRIPT
) $< $(ocf_scriptdir
)/$(basename $(<F
))
40 install_lvm2
: $(SCRIPTS
:.sh
=_install
)
42 install_ocf
: $(OCF_SCRIPTS
:.ocf
=_install
)
44 install: install_lvm2 install_ocf
46 # FIXME Customise for other distributions
48 $(INSTALL_DIR
) $(initdir
)
49 ifeq ("@BUILD_DMEVENTD@", "yes")
50 $(INSTALL_SCRIPT
) lvm2_monitoring_init_red_hat
$(initdir
)/lvm2-monitor
52 ifeq ("@BUILD_LVMETAD@", "yes")
53 $(INSTALL_SCRIPT
) lvm2_lvmetad_init_red_hat
$(initdir
)/lvm2-lvmetad
55 ifneq ("@CLVMD@", "none")
56 $(INSTALL_SCRIPT
) clvmd_init_red_hat
$(initdir
)/clvmd
58 ifeq ("@BUILD_CMIRRORD@", "yes")
59 $(INSTALL_SCRIPT
) cmirrord_init_red_hat
$(initdir
)/cmirrord
62 install_systemd_units
:
63 $(INSTALL_DIR
) $(systemd_dir
)
64 ifeq ("@BUILD_DMEVENTD@", "yes")
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
69 ifeq ("@BUILD_LVMETAD@", "yes")
70 $(INSTALL_DATA
) lvm2_lvmetad_systemd_red_hat.socket
$(systemd_dir
)/lvm2-lvmetad.socket
71 $(INSTALL_DATA
) lvm2_lvmetad_systemd_red_hat.service
$(systemd_dir
)/lvm2-lvmetad.service
74 install_tmpfiles_configuration
:
75 $(INSTALL_DIR
) $(tmpfiles_dir
)
76 $(INSTALL_DATA
) lvm2_tmpfiles_red_hat.conf
$(tmpfiles_dir
)/lvm2.conf
78 DISTCLEAN_TARGETS
+= clvmd_init_red_hat cmirrord_init_red_hat lvm2_monitoring_init_red_hat \
79 dm_event_systemd_red_hat.service lvm2_monitoring_systemd_red_hat.service \
80 lvm2_lvmetad_systemd_red_hat.socket lvm2_lvmetad_systemd_red_hat.service \
81 lvm2_lvmetad_init_red_hat lvm2_tmpfiles_red_hat.conf