summaryrefslogtreecommitdiffstats
path: root/cmd/zed/Makefile.am
blob: 70e4f7f692f0f5ae23e1f30f0e509352e7637ae2 (plain)
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
include $(top_srcdir)/config/Rules.am

DEFAULT_INCLUDES += \
	-I$(top_srcdir)/include \
	-I$(top_srcdir)/lib/libspl/include

EXTRA_DIST = zed.d/README

sbin_PROGRAMS = zed

zed_SOURCES = \
	zed.c \
	zed.h \
	zed_conf.c \
	zed_conf.h \
	zed_event.c \
	zed_event.h \
	zed_exec.c \
	zed_exec.h \
	zed_file.c \
	zed_file.h \
	zed_log.c \
	zed_log.h \
	zed_strings.c \
	zed_strings.h

zed_LDADD = \
	$(top_builddir)/lib/libavl/libavl.la \
	$(top_builddir)/lib/libnvpair/libnvpair.la \
	$(top_builddir)/lib/libspl/libspl.la \
	$(top_builddir)/lib/libzpool/libzpool.la \
	$(top_builddir)/lib/libzfs/libzfs.la \
	$(top_builddir)/lib/libzfs_core/libzfs_core.la

zedconfdir = $(sysconfdir)/zfs/zed.d

dist_zedconf_DATA = \
	zed.d/zed-functions.sh \
	zed.d/zed.rc

zedexecdir = $(libexecdir)/zfs/zed.d

dist_zedexec_SCRIPTS = \
	zed.d/all-debug.sh \
	zed.d/all-syslog.sh \
	zed.d/checksum-notify.sh \
	zed.d/checksum-spare.sh \
	zed.d/data-notify.sh \
	zed.d/generic-notify.sh \
	zed.d/io-notify.sh \
	zed.d/io-spare.sh \
	zed.d/resilver.finish-notify.sh \
	zed.d/scrub.finish-notify.sh

zedconfdefaults = \
	all-syslog.sh \
	checksum-notify.sh \
	checksum-spare.sh \
	data-notify.sh \
	io-notify.sh \
	io-spare.sh \
	resilver.finish-notify.sh \
	scrub.finish-notify.sh

install-data-hook:
	$(MKDIR_P) "$(DESTDIR)$(zedconfdir)"
	for f in $(zedconfdefaults); do \
	  test -f "$(DESTDIR)$(zedconfdir)/$${f}" -o \
	       -L "$(DESTDIR)$(zedconfdir)/$${f}" || \
	    ln -s "$(zedexecdir)/$${f}" "$(DESTDIR)$(zedconfdir)"; \
	done
	chmod 0600 "$(DESTDIR)$(zedconfdir)/zed.rc"