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

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

sbin_PROGRAMS = zpool

zpool_SOURCES = \
	zpool_iter.c \
	zpool_main.c \
	zpool_util.c \
	zpool_util.h \
	zpool_vdev.c

zpool_LDADD = \
	$(top_builddir)/lib/libnvpair/libnvpair.la \
	$(top_builddir)/lib/libuutil/libuutil.la \
	$(top_builddir)/lib/libzfs/libzfs.la

zpool_LDADD += -lm $(LIBBLKID)

zpoolconfdir = $(sysconfdir)/zfs/zpool.d
zpoolexecdir = $(libexecdir)/zfs/zpool.d

EXTRA_DIST = zpool.d/README

dist_zpoolexec_SCRIPTS = \
	zpool.d/enc \
	zpool.d/encdev \
	zpool.d/fault_led \
	zpool.d/iostat \
	zpool.d/iostat-1s \
	zpool.d/iostat-10s \
	zpool.d/label \
	zpool.d/locate_led \
	zpool.d/lsblk \
	zpool.d/media \
	zpool.d/model \
	zpool.d/serial \
	zpool.d/ses \
	zpool.d/size \
	zpool.d/slaves \
	zpool.d/slot \
	zpool.d/smart \
	zpool.d/smartx \
	zpool.d/temp \
	zpool.d/health \
	zpool.d/r_proc \
	zpool.d/w_proc \
	zpool.d/r_ucor \
	zpool.d/w_ucor \
	zpool.d/nonmed \
	zpool.d/defect \
	zpool.d/hours_on \
	zpool.d/realloc \
	zpool.d/rep_ucor \
	zpool.d/cmd_to \
	zpool.d/pend_sec \
	zpool.d/off_ucor \
	zpool.d/ata_err \
	zpool.d/pwr_cyc \
	zpool.d/upath \
	zpool.d/vendor

zpoolconfdefaults = \
	enc \
	encdev \
	fault_led \
	iostat \
	iostat-1s \
	iostat-10s \
	label \
	locate_led \
	lsblk \
	media \
	model \
	serial \
	ses \
	size \
	slaves \
	slot \
	smart \
	smartx \
	temp \
	health \
	r_proc \
	w_proc \
	r_ucor \
	w_ucor \
	nonmed \
	defect \
	hours_on \
	realloc \
	rep_ucor \
	cmd_to \
	pend_sec \
	off_ucor \
	ata_err \
	pwr_cyc \
	upath \
	vendor

install-data-hook:
	$(MKDIR_P) "$(DESTDIR)$(zpoolconfdir)"
	for f in $(zpoolconfdefaults); do \
	  test -f "$(DESTDIR)$(zpoolconfdir)/$${f}" -o \
	       -L "$(DESTDIR)$(zpoolconfdir)/$${f}" || \
	    ln -s "$(zpoolexecdir)/$${f}" "$(DESTDIR)$(zpoolconfdir)"; \
	done