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