mirror of
https://git.proxmox.com/git/mirror_zfs
synced 2025-04-28 11:40:17 +00:00
autoconf: use include directives instead of recursing down scripts
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #13316
This commit is contained in:
parent
09a7ad38a5
commit
0a8b1fc625
10
Makefile.am
10
Makefile.am
@ -1,6 +1,7 @@
|
|||||||
CLEANFILES =
|
CLEANFILES =
|
||||||
EXTRA_DIST =
|
EXTRA_DIST =
|
||||||
INSTALL_DATA_HOOKS =
|
INSTALL_DATA_HOOKS =
|
||||||
|
ALL_LOCAL =
|
||||||
|
|
||||||
include $(top_srcdir)/config/Shellcheck.am
|
include $(top_srcdir)/config/Shellcheck.am
|
||||||
include $(top_srcdir)/config/Rules.am
|
include $(top_srcdir)/config/Rules.am
|
||||||
@ -16,7 +17,8 @@ endif
|
|||||||
|
|
||||||
CPPCHECKDIRS += etc/systemd/system-generators
|
CPPCHECKDIRS += etc/systemd/system-generators
|
||||||
if CONFIG_USER
|
if CONFIG_USER
|
||||||
SUBDIRS += scripts . man tests etc contrib
|
SUBDIRS += . man tests etc contrib
|
||||||
|
include $(srcdir)/%D%/scripts/Makefile.am
|
||||||
include $(srcdir)/%D%/lib/Makefile.am
|
include $(srcdir)/%D%/lib/Makefile.am
|
||||||
include $(srcdir)/%D%/cmd/Makefile.am
|
include $(srcdir)/%D%/cmd/Makefile.am
|
||||||
if BUILD_LINUX
|
if BUILD_LINUX
|
||||||
@ -83,8 +85,8 @@ distclean-local:
|
|||||||
-o -name '*.gcno' \) \
|
-o -name '*.gcno' \) \
|
||||||
-type f -delete
|
-type f -delete
|
||||||
|
|
||||||
all-local:
|
PHONY += $(ALL_LOCAL)
|
||||||
-SCRIPT_COMMON=$(top_builddir)/scripts/common.sh $(top_srcdir)/scripts/zfs-tests.sh -c
|
all-local: $(ALL_LOCAL)
|
||||||
|
|
||||||
dist-hook:
|
dist-hook:
|
||||||
$(top_srcdir)/scripts/make_gitrev.sh -D $(distdir) $(GITREV)
|
$(top_srcdir)/scripts/make_gitrev.sh -D $(distdir) $(GITREV)
|
||||||
@ -122,7 +124,7 @@ cstyle:
|
|||||||
|
|
||||||
filter_executable = -exec test -x '{}' \; -print
|
filter_executable = -exec test -x '{}' \; -print
|
||||||
|
|
||||||
SHELLCHECKDIRS = contrib etc scripts tests
|
SHELLCHECKDIRS = contrib etc tests
|
||||||
SHELLCHECKSCRIPTS += autogen.sh
|
SHELLCHECKSCRIPTS += autogen.sh
|
||||||
|
|
||||||
PHONY += mancheck
|
PHONY += mancheck
|
||||||
|
@ -107,7 +107,6 @@ AC_CONFIG_FILES([
|
|||||||
rpm/redhat/zfs-dkms.spec
|
rpm/redhat/zfs-dkms.spec
|
||||||
rpm/redhat/zfs-kmod.spec
|
rpm/redhat/zfs-kmod.spec
|
||||||
rpm/redhat/zfs.spec
|
rpm/redhat/zfs.spec
|
||||||
scripts/Makefile
|
|
||||||
tests/Makefile
|
tests/Makefile
|
||||||
tests/runfiles/Makefile
|
tests/runfiles/Makefile
|
||||||
tests/test-runner/Makefile
|
tests/test-runner/Makefile
|
||||||
|
@ -1,83 +1,83 @@
|
|||||||
include $(top_srcdir)/config/Shellcheck.am
|
scriptsdir = $(datadir)/$(PACKAGE)
|
||||||
|
dist_scripts_SCRIPTS = \
|
||||||
pkgdatadir = $(datadir)/@PACKAGE@
|
%D%/zfs-helpers.sh \
|
||||||
|
%D%/zfs-tests.sh \
|
||||||
dist_pkgdata_SCRIPTS = \
|
%D%/zfs.sh \
|
||||||
zimport.sh \
|
%D%/zimport.sh \
|
||||||
zfs.sh \
|
%D%/zloop.sh
|
||||||
zfs-tests.sh \
|
|
||||||
zloop.sh \
|
|
||||||
zfs-helpers.sh
|
|
||||||
|
|
||||||
EXTRA_SCRIPTS = \
|
EXTRA_SCRIPTS = \
|
||||||
commitcheck.sh \
|
%D%/commitcheck.sh \
|
||||||
common.sh.in \
|
%D%/common.sh.in \
|
||||||
dkms.mkconf \
|
%D%/dkms.mkconf \
|
||||||
dkms.postbuild \
|
%D%/dkms.postbuild \
|
||||||
kmodtool \
|
%D%/kmodtool \
|
||||||
make_gitrev.sh \
|
%D%/make_gitrev.sh \
|
||||||
man-dates.sh \
|
%D%/man-dates.sh \
|
||||||
paxcheck.sh \
|
%D%/mancheck.sh \
|
||||||
mancheck.sh \
|
%D%/paxcheck.sh \
|
||||||
zfs-tests-color.sh
|
%D%/zfs-tests-color.sh
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST += \
|
||||||
cstyle.pl \
|
%D%/cstyle.pl \
|
||||||
enum-extract.pl \
|
%D%/enum-extract.pl \
|
||||||
zfs2zol-patch.sed \
|
%D%/zfs2zol-patch.sed \
|
||||||
zol2zfs-patch.sed \
|
%D%/zol2zfs-patch.sed \
|
||||||
$(EXTRA_SCRIPTS)
|
$(EXTRA_SCRIPTS)
|
||||||
|
|
||||||
SHELLCHECKSCRIPTS += $(dist_pkgdata_SCRIPTS) $(EXTRA_SCRIPTS)
|
SHELLCHECKSCRIPTS += $(dist_scripts_SCRIPTS) $(EXTRA_SCRIPTS)
|
||||||
|
|
||||||
define EXTRA_ENVIRONMENT
|
define SCRIPTS_EXTRA_ENVIRONMENT
|
||||||
|
|
||||||
# Only required for in-tree use
|
# Only required for in-tree use
|
||||||
export INTREE="yes"
|
export INTREE="yes"
|
||||||
export GDB="libtool --mode=execute gdb"
|
export GDB="libtool --mode=execute gdb"
|
||||||
export LDMOD=/sbin/insmod
|
export LDMOD=/sbin/insmod
|
||||||
|
|
||||||
export CMD_DIR=@abs_top_builddir@
|
export CMD_DIR=$(abs_top_builddir)
|
||||||
export UDEV_RULE_DIR=@abs_top_builddir@/udev/rules.d
|
export UDEV_RULE_DIR=$(abs_top_builddir)/udev/rules.d
|
||||||
export ZEDLET_ETC_DIR=$$CMD_DIR/cmd/zed/zed.d
|
export ZEDLET_ETC_DIR=$$CMD_DIR/cmd/zed/zed.d
|
||||||
export ZEDLET_LIBEXEC_DIR=$$CMD_DIR/cmd/zed/zed.d
|
export ZEDLET_LIBEXEC_DIR=$$CMD_DIR/cmd/zed/zed.d
|
||||||
export ZPOOL_SCRIPT_DIR=$$CMD_DIR/cmd/zpool/zpool.d
|
export ZPOOL_SCRIPT_DIR=$$CMD_DIR/cmd/zpool/zpool.d
|
||||||
export ZPOOL_SCRIPTS_PATH=$$CMD_DIR/cmd/zpool/zpool.d
|
export ZPOOL_SCRIPTS_PATH=$$CMD_DIR/cmd/zpool/zpool.d
|
||||||
export ZPOOL_COMPAT_DIR=$$CMD_DIR/cmd/zpool/compatibility.d
|
export ZPOOL_COMPAT_DIR=$$CMD_DIR/cmd/zpool/compatibility.d
|
||||||
export CONTRIB_DIR=@abs_top_builddir@/contrib
|
export CONTRIB_DIR=$(abs_top_builddir)/contrib
|
||||||
export LIB_DIR=@abs_top_builddir@/.libs
|
export LIB_DIR=$(abs_top_builddir)/.libs
|
||||||
export SYSCONF_DIR=@abs_top_builddir@/etc
|
export SYSCONF_DIR=$(abs_top_builddir)/etc
|
||||||
|
|
||||||
export INSTALL_UDEV_DIR=@udevdir@
|
export INSTALL_UDEV_DIR=$(udevdir)
|
||||||
export INSTALL_UDEV_RULE_DIR=@udevruledir@
|
export INSTALL_UDEV_RULE_DIR=$(udevruledir)
|
||||||
export INSTALL_MOUNT_HELPER_DIR=@mounthelperdir@
|
export INSTALL_MOUNT_HELPER_DIR=$(mounthelperdir)
|
||||||
export INSTALL_SYSCONF_DIR=@sysconfdir@
|
export INSTALL_SYSCONF_DIR=$(sysconfdir)
|
||||||
export INSTALL_PYTHON_DIR=@pythonsitedir@
|
export INSTALL_PYTHON_DIR=$(pythonsitedir)
|
||||||
|
|
||||||
export KMOD_SPL=@abs_top_builddir@/module/spl.ko
|
export KMOD_SPL=$(abs_top_builddir)/module/spl.ko
|
||||||
export KMOD_ZFS=@abs_top_builddir@/module/zfs.ko
|
export KMOD_ZFS=$(abs_top_builddir)/module/zfs.ko
|
||||||
export KMOD_FREEBSD=@abs_top_builddir@/module/openzfs.ko
|
export KMOD_FREEBSD=$(abs_top_builddir)/module/openzfs.ko
|
||||||
endef
|
endef
|
||||||
|
|
||||||
export EXTRA_ENVIRONMENT
|
export SCRIPTS_EXTRA_ENVIRONMENT
|
||||||
|
|
||||||
all-local:
|
CLEANFILES += %D%/common.sh
|
||||||
-$(SED) -e '\|^export BIN_DIR=|s|$$|@abs_top_builddir@/tests/zfs-tests/bin|' \
|
%D%/common.sh: %D%/common.sh.in Makefile
|
||||||
-e '\|^export SBIN_DIR=|s|$$|@abs_top_builddir@|' \
|
-$(AM_V_at)$(MKDIR_P) $(@D)
|
||||||
-e '\|^export LIBEXEC_DIR=|s|$$|@abs_top_builddir@|' \
|
-$(AM_V_GEN)$(SED) -e '/^export BIN_DIR=/s|$$|$(abs_top_builddir)/tests/zfs-tests/bin|' \
|
||||||
-e '\|^export ZTS_DIR=|s|$$|@abs_top_srcdir@/tests|' \
|
-e '/^export SBIN_DIR=/s|$$|$(abs_top_builddir)|' \
|
||||||
-e '\|^export SCRIPT_DIR=|s|$$|@abs_top_srcdir@/scripts|' \
|
-e '/^export LIBEXEC_DIR=/s|$$|$(abs_top_builddir)|' \
|
||||||
$(abs_top_srcdir)/scripts/common.sh.in >common.sh
|
-e '/^export ZTS_DIR=/s|$$|$(abs_top_srcdir)/tests|' \
|
||||||
-echo "$$EXTRA_ENVIRONMENT" >>common.sh
|
-e '/^export SCRIPT_DIR=/s|$$|$(abs_top_srcdir)/scripts|' \
|
||||||
|
$< >$@
|
||||||
|
-$(AM_V_at)echo "$$SCRIPTS_EXTRA_ENVIRONMENT" >>$@
|
||||||
|
|
||||||
clean-local:
|
ALL_LOCAL += scripts-all-local
|
||||||
-$(RM) common.sh
|
scripts-all-local: %D%/common.sh
|
||||||
|
-SCRIPT_COMMON=$< $(srcdir)/%D%/zfs-tests.sh -c
|
||||||
|
|
||||||
install-data-hook:
|
INSTALL_DATA_HOOKS += scripts-install-data-hook
|
||||||
-$(SED) -e '\|^export BIN_DIR=|s|$$|@bindir@|' \
|
scripts-install-data-hook: %D%/common.sh.in Makefile
|
||||||
-e '\|^export SBIN_DIR=|s|$$|@sbindir@|' \
|
-$(SED) -e '/^export BIN_DIR=/s|$$|$(bindir)|' \
|
||||||
-e '\|^export LIBEXEC_DIR=|s|$$|@zfsexecdir@|' \
|
-e '/^export SBIN_DIR=/s|$$|$(sbindir)|' \
|
||||||
-e '\|^export ZTS_DIR=|s|$$|@datadir@/@PACKAGE@|' \
|
-e '/^export LIBEXEC_DIR=/s|$$|$(zfsexecdir)|' \
|
||||||
-e '\|^export SCRIPT_DIR=|s|$$|@datadir@/@PACKAGE@|' \
|
-e '/^export ZTS_DIR=/s|$$|$(datadir)/$(PACKAGE)|' \
|
||||||
$(abs_top_srcdir)/scripts/common.sh.in \
|
-e '/^export SCRIPT_DIR=/s|$$|$(datadir)/$(PACKAGE)|' \
|
||||||
>$(DESTDIR)$(datadir)/@PACKAGE@/common.sh
|
$< >$(DESTDIR)$(datadir)/$(PACKAGE)/common.sh
|
||||||
|
Loading…
Reference in New Issue
Block a user