File: Makefile.in

package info (click to toggle)
drbd-utils 9.15.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 6,464 kB
  • sloc: ansic: 47,782; xml: 11,374; cpp: 9,765; sh: 4,398; makefile: 1,020; perl: 353
file content (193 lines) | stat: -rw-r--r-- 6,795 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
# Makefile for scripts
#
# This file is part of DRBD by Philipp Reisner & Lars Ellenberg.
#
# Copright 2001-2008 LINBIT Information Technologies
# Philipp Reisner, Lars Ellenberg
#
# drbd is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# drbd is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with drbd; see the file COPYING.  If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
#
# for Debian:
#   update-rc.d drbd defaults 70 08
#

# variables set by configure
DISTRO = @DISTRO@
prefix = @prefix@
exec_prefix = @exec_prefix@
datarootdir = @datarootdir@
datadir = @datadir@
sbindir = @sbindir@
sysconfdir = @sysconfdir@
systemdunitdir = @systemdunitdir@
tmpfilesdir = @tmpfilesdir@
udevrulesdir = @udevrulesdir@
initscripttype = @initscripttype@
BASH_COMPLETION_SUFFIX = @BASH_COMPLETION_SUFFIX@
UDEV_RULE_SUFFIX = @UDEV_RULE_SUFFIX@
INITDIR = @INITDIR@
LIBDIR = @prefix@/lib/@PACKAGE_TARNAME@
LN_S = @LN_S@

# features enabled or disabled by configure
WITH_UDEV = @WITH_UDEV@
WITH_XEN = @WITH_XEN@
WITH_PACEMAKER = @WITH_PACEMAKER@
WITH_HEARTBEAT = @WITH_HEARTBEAT@
WITH_RGMANAGER = @WITH_RGMANAGER@
WITH_BASHCOMPLETION = @WITH_BASHCOMPLETION@
WITH_83_SUPPORT = @WITH_83_SUPPORT@
WITH_84_SUPPORT = @WITH_84_SUPPORT@
WITH_WINDRBD = @WITH_WINDRBD@

# variables meant to be overridden from the make command line
ifeq ($(WITH_WINDRBD),yes)
DESTDIR ?=
else
DESTDIR ?= /
endif

all:

install: install-utils install-udev install-xen install-heartbeat install-pacemaker install-rgmanager install-bashcompletion

install-utils:
	install -d $(DESTDIR)$(LIBDIR)
# "sysv" or "both"
ifeq ($(subst both,sysv,$(initscripttype)),sysv)
	install -d $(DESTDIR)$(INITDIR)
	install -m 755 drbd $(DESTDIR)$(INITDIR)/
endif
# yes, debian apparently allows installing both types from the same package
# "systemd" or "both"
ifeq ($(subst both,systemd,$(initscripttype)),systemd)
	install -d $(DESTDIR)$(systemdunitdir)
	install -m 644 drbd.service $(DESTDIR)$(systemdunitdir)/
	install -d $(DESTDIR)/lib/drbd/
	install -m 755 drbd $(DESTDIR)/lib/drbd/
	install -d $(DESTDIR)$(tmpfilesdir)/
	install -m 444 drbd.tmpfiles.conf $(DESTDIR)$(tmpfilesdir)/drbd.conf
endif
	@ if [ ! -e $(DESTDIR)$(sysconfdir)/drbd.conf ]; then \
		install -d $(DESTDIR)$(sysconfdir)/; \
		install -m 644 drbd.conf $(DESTDIR)$(sysconfdir)/; \
		install -d $(DESTDIR)$(sysconfdir)/drbd.d; \
		install -m 644 global_common.conf $(DESTDIR)$(sysconfdir)/drbd.d; \
	fi
	install -d $(DESTDIR)$(sysconfdir)/multipath/conf.d
	install -m 644 multipath/drbd.conf $(DESTDIR)$(sysconfdir)/multipath/conf.d
	install -m 755 outdate-peer.sh $(DESTDIR)$(LIBDIR)
	install -m 755 snapshot-resync-target-lvm.sh $(DESTDIR)$(LIBDIR)
	install -m 755 notify.sh $(DESTDIR)$(LIBDIR)
	install -m 755 stonith_admin-fence-peer.sh $(DESTDIR)$(LIBDIR)
	( set -e ; cd $(DESTDIR)$(LIBDIR) ;\
	  $(LN_S) -f snapshot-resync-target-lvm.sh unsnapshot-resync-target-lvm.sh ;\
	  $(LN_S) -f notify.sh notify-split-brain.sh ;\
	  $(LN_S) -f notify.sh notify-io-error.sh ;\
	  $(LN_S) -f notify.sh notify-pri-on-incon-degr.sh ;\
	  $(LN_S) -f notify.sh notify-pri-lost.sh ;\
	  $(LN_S) -f notify.sh notify-pri-lost-after-sb.sh ;\
	  $(LN_S) -f notify.sh notify-emergency-reboot.sh ;\
	  $(LN_S) -f notify.sh notify-emergency-shutdown.sh ;\
	  $(LN_S) -f notify.sh notify-out-of-sync.sh; )
ifeq ($(DISTRO),debian)
	@ echo "Don't forget to run update-rc.d"
else
	@ echo "Don't forget to run chkconfig"
endif

install-heartbeat:
ifeq ($(or $(subst no,,$(WITH_83_SUPPORT)), $(subst no,,$(WITH_84_SUPPORT))),yes)
ifeq ($(WITH_HEARTBEAT),yes)
	mkdir -p $(DESTDIR)$(sysconfdir)/ha.d/resource.d
	install -m 755 drbddisk $(DESTDIR)$(sysconfdir)/ha.d/resource.d
	install -m 755 drbdupper $(DESTDIR)$(sysconfdir)/ha.d/resource.d
endif
endif

# Do not use $(prefix) for the resource agent. The OCF standard
# explicitly mandates where resource agents must live,
# no matter what prefix is configured to.
install-pacemaker:
ifeq ($(WITH_PACEMAKER),yes)
	install -d $(DESTDIR)$(LIBDIR)
	install -m 755 crm-fence-peer.sh $(DESTDIR)$(LIBDIR)
	install -m 755 crm-fence-peer.9.sh $(DESTDIR)$(LIBDIR)
	( set -e ; cd $(DESTDIR)$(LIBDIR) ;\
	  $(LN_S) -f crm-fence-peer.sh crm-unfence-peer.sh ;\
	  $(LN_S) -f crm-fence-peer.9.sh crm-unfence-peer.9.sh )
	mkdir -p $(DESTDIR)/usr/lib/ocf/resource.d/linbit
	install -m 755 drbd.ocf $(DESTDIR)/usr/lib/ocf/resource.d/linbit/drbd
	install -m 755 drbd-attr $(DESTDIR)/usr/lib/ocf/resource.d/linbit/drbd-attr
	install -m 644 drbd.shellfuncs.sh $(DESTDIR)/usr/lib/ocf/resource.d/linbit/
endif

install-rgmanager:
ifeq ($(WITH_RGMANAGER),yes)
	mkdir -p $(DESTDIR)$(datadir)/cluster
	install -m 755 drbd.sh.rhcs $(DESTDIR)$(datadir)/cluster/drbd.sh
	install -m 644 drbd.metadata.rhcs $(DESTDIR)$(datadir)/cluster/drbd.metadata
	install -d $(DESTDIR)$(LIBDIR)
	install -m 755 rhcs_fence $(DESTDIR)$(LIBDIR)
endif

install-xen:
ifeq ($(WITH_XEN),yes)
	mkdir -p $(DESTDIR)$(sysconfdir)/xen/scripts
	install -m 755 block-drbd $(DESTDIR)$(sysconfdir)/xen/scripts
endif

install-udev:
ifeq ($(WITH_UDEV),yes)
	mkdir -p $(DESTDIR)$(udevrulesdir)
	install -m 644 drbd.rules $(DESTDIR)$(udevrulesdir)/65-drbd.rules
endif

install-bashcompletion:
ifeq ($(WITH_BASHCOMPLETION),yes)
	mkdir -p $(DESTDIR)$(sysconfdir)/bash_completion.d
	install -m 644 drbdadm.bash_completion $(DESTDIR)$(sysconfdir)/bash_completion.d/drbdadm$(BASH_COMPLETION_SUFFIX)
endif

clean:
	rm -f *~
	rm -f datadisk

distclean: clean

uninstall:
# "sysv" or "both"
ifeq ($(subst both,sysv,$(initscripttype)),sysv)
	rm -f $(DESTDIR)$(INITDIR)/drbd
endif
# "systemd" or "both"
ifeq ($(subst both,systemd,$(initscripttype)),systemd)
	rm -f $(DESTDIR)$(systemdunitdir)/drbd.service
endif
	rm -f $(DESTDIR)$(sysconfdir)/ha.d/resource.d/drbddisk
	rm -f $(DESTDIR)$(sysconfdir)/ha.d/resource.d/drbdupper
	rm -f $(DESTDIR)$(sysconfdir)/xen/scripts/block-drbd
	rm -f $(DESTDIR)$(sysconfdir)/bash_completion.d/drbdadm$(BASH_COMPLETION_SUFFIX)
	! test -L $(DESTDIR)/sbin/rcdrbd || rm $(DESTDIR)/sbin/rcdrbd

.PHONY: install uninstall clean distclean
../../configure:
	@echo "please (re-)run ./autogen.sh with appropriate arguments"; exit 1
../../config.status: ../../configure
	@echo "please (re-)run ./configure with appropriate arguments"; exit 1
Makefile.in: ;
Makefile: Makefile.in ../config.status
	cd .. && ./config.status scripts/Makefile