]>
Commit | Line | Data |
---|---|---|
0a8b1fc6 AZ |
1 | scriptsdir = $(datadir)/$(PACKAGE) |
2 | dist_scripts_SCRIPTS = \ | |
3 | %D%/zfs-helpers.sh \ | |
4 | %D%/zfs-tests.sh \ | |
5 | %D%/zfs.sh \ | |
6 | %D%/zimport.sh \ | |
7 | %D%/zloop.sh | |
c8f9061f | 8 | |
c3ef9f75 | 9 | EXTRA_SCRIPTS = \ |
0a8b1fc6 AZ |
10 | %D%/commitcheck.sh \ |
11 | %D%/common.sh.in \ | |
12 | %D%/dkms.mkconf \ | |
13 | %D%/dkms.postbuild \ | |
14 | %D%/kmodtool \ | |
15 | %D%/make_gitrev.sh \ | |
16 | %D%/man-dates.sh \ | |
17 | %D%/mancheck.sh \ | |
18 | %D%/paxcheck.sh \ | |
19 | %D%/zfs-tests-color.sh | |
c3ef9f75 | 20 | |
0a8b1fc6 AZ |
21 | EXTRA_DIST += \ |
22 | %D%/cstyle.pl \ | |
23 | %D%/enum-extract.pl \ | |
24 | %D%/zfs2zol-patch.sed \ | |
25 | %D%/zol2zfs-patch.sed \ | |
c3ef9f75 AZ |
26 | $(EXTRA_SCRIPTS) |
27 | ||
0a8b1fc6 | 28 | SHELLCHECKSCRIPTS += $(dist_scripts_SCRIPTS) $(EXTRA_SCRIPTS) |
c8f9061f | 29 | |
0a8b1fc6 | 30 | define SCRIPTS_EXTRA_ENVIRONMENT |
c8f9061f BB |
31 | |
32 | # Only required for in-tree use | |
33 | export INTREE="yes" | |
54007c79 | 34 | export GDB="libtool --mode=execute gdb" |
c8f9061f BB |
35 | export LDMOD=/sbin/insmod |
36 | ||
0a8b1fc6 | 37 | export CMD_DIR=$(abs_top_builddir) |
0a9aaa7f AZ |
38 | export UDEV_SCRIPT_DIR=$(abs_top_srcdir)/udev |
39 | export UDEV_CMD_DIR=$(abs_top_builddir)/udev | |
0a8b1fc6 | 40 | export UDEV_RULE_DIR=$(abs_top_builddir)/udev/rules.d |
5cdca5b1 AZ |
41 | export ZEDLET_ETC_DIR=$$CMD_DIR/cmd/zed/zed.d |
42 | export ZEDLET_LIBEXEC_DIR=$$CMD_DIR/cmd/zed/zed.d | |
43 | export ZPOOL_SCRIPT_DIR=$$CMD_DIR/cmd/zpool/zpool.d | |
44 | export ZPOOL_SCRIPTS_PATH=$$CMD_DIR/cmd/zpool/zpool.d | |
45 | export ZPOOL_COMPAT_DIR=$$CMD_DIR/cmd/zpool/compatibility.d | |
0a8b1fc6 AZ |
46 | export CONTRIB_DIR=$(abs_top_builddir)/contrib |
47 | export LIB_DIR=$(abs_top_builddir)/.libs | |
48 | export SYSCONF_DIR=$(abs_top_builddir)/etc | |
c8f9061f | 49 | |
0a8b1fc6 AZ |
50 | export INSTALL_UDEV_DIR=$(udevdir) |
51 | export INSTALL_UDEV_RULE_DIR=$(udevruledir) | |
52 | export INSTALL_MOUNT_HELPER_DIR=$(mounthelperdir) | |
53 | export INSTALL_SYSCONF_DIR=$(sysconfdir) | |
54 | export INSTALL_PYTHON_DIR=$(pythonsitedir) | |
c8f9061f | 55 | |
0a8b1fc6 AZ |
56 | export KMOD_SPL=$(abs_top_builddir)/module/spl.ko |
57 | export KMOD_ZFS=$(abs_top_builddir)/module/zfs.ko | |
58 | export KMOD_FREEBSD=$(abs_top_builddir)/module/openzfs.ko | |
c8f9061f BB |
59 | endef |
60 | ||
0a8b1fc6 | 61 | export SCRIPTS_EXTRA_ENVIRONMENT |
c8f9061f | 62 | |
0a8b1fc6 AZ |
63 | CLEANFILES += %D%/common.sh |
64 | %D%/common.sh: %D%/common.sh.in Makefile | |
65 | -$(AM_V_at)$(MKDIR_P) $(@D) | |
66 | -$(AM_V_GEN)$(SED) -e '/^export BIN_DIR=/s|$$|$(abs_top_builddir)/tests/zfs-tests/bin|' \ | |
67 | -e '/^export SBIN_DIR=/s|$$|$(abs_top_builddir)|' \ | |
68 | -e '/^export LIBEXEC_DIR=/s|$$|$(abs_top_builddir)|' \ | |
69 | -e '/^export ZTS_DIR=/s|$$|$(abs_top_srcdir)/tests|' \ | |
70 | -e '/^export SCRIPT_DIR=/s|$$|$(abs_top_srcdir)/scripts|' \ | |
71 | $< >$@ | |
72 | -$(AM_V_at)echo "$$SCRIPTS_EXTRA_ENVIRONMENT" >>$@ | |
c8f9061f | 73 | |
0a8b1fc6 AZ |
74 | ALL_LOCAL += scripts-all-local |
75 | scripts-all-local: %D%/common.sh | |
76 | -SCRIPT_COMMON=$< $(srcdir)/%D%/zfs-tests.sh -c | |
c8f9061f | 77 | |
3ed04d66 AZ |
78 | CLEAN_LOCAL += scripts-clean-local |
79 | scripts-clean-local: | |
80 | -$(RM) -r tests/zfs-tests/bin/ | |
81 | ||
0a8b1fc6 AZ |
82 | INSTALL_DATA_HOOKS += scripts-install-data-hook |
83 | scripts-install-data-hook: %D%/common.sh.in Makefile | |
84 | -$(SED) -e '/^export BIN_DIR=/s|$$|$(bindir)|' \ | |
85 | -e '/^export SBIN_DIR=/s|$$|$(sbindir)|' \ | |
86 | -e '/^export LIBEXEC_DIR=/s|$$|$(zfsexecdir)|' \ | |
87 | -e '/^export ZTS_DIR=/s|$$|$(datadir)/$(PACKAGE)|' \ | |
88 | -e '/^export SCRIPT_DIR=/s|$$|$(datadir)/$(PACKAGE)|' \ | |
89 | $< >$(DESTDIR)$(datadir)/$(PACKAGE)/common.sh |