cmd: move single-file binaries up, extract udev programs to udev/
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #13316
This commit is contained in:
parent
eaf94bda6c
commit
0a9aaa7f0c
106
cmd/Makefile.am
106
cmd/Makefile.am
|
@ -2,38 +2,114 @@ bin_SCRIPTS =
|
|||
bin_PROGRAMS =
|
||||
sbin_SCRIPTS =
|
||||
sbin_PROGRAMS =
|
||||
udev_PROGRAMS =
|
||||
dist_bin_SCRIPTS =
|
||||
zfsexec_PROGRAMS =
|
||||
dist_udev_SCRIPTS =
|
||||
mounthelper_PROGRAMS =
|
||||
|
||||
include $(srcdir)/%D%/fsck_zfs/Makefile.am
|
||||
|
||||
sbin_SCRIPTS += fsck.zfs
|
||||
SHELLCHECKSCRIPTS += fsck.zfs
|
||||
CLEANFILES += fsck.zfs
|
||||
EXTRA_DIST += %D%/fsck.zfs.in
|
||||
$(call SUBST,fsck.zfs,%D%/)
|
||||
|
||||
|
||||
sbin_PROGRAMS += zfs_ids_to_path
|
||||
CPPCHECKTARGETS += zfs_ids_to_path
|
||||
|
||||
zfs_ids_to_path_SOURCES = \
|
||||
%D%/zfs_ids_to_path.c
|
||||
|
||||
zfs_ids_to_path_LDADD = \
|
||||
libzfs.la
|
||||
|
||||
|
||||
zhack_CPPFLAGS = $(AM_CPPFLAGS) $(FORCEDEBUG_CPPFLAGS)
|
||||
|
||||
sbin_PROGRAMS += zhack
|
||||
CPPCHECKTARGETS += zhack
|
||||
|
||||
zhack_SOURCES = \
|
||||
%D%/zhack.c
|
||||
|
||||
zhack_LDADD = \
|
||||
libzpool.la \
|
||||
libzfs_core.la \
|
||||
libnvpair.la
|
||||
|
||||
|
||||
ztest_CFLAGS = $(AM_CFLAGS) $(KERNEL_CFLAGS)
|
||||
# Get rid of compiler warning for unchecked truncating snprintfs on gcc 7.1.1
|
||||
ztest_CFLAGS += $(NO_FORMAT_TRUNCATION)
|
||||
ztest_CPPFLAGS = $(AM_CPPFLAGS) $(FORCEDEBUG_CPPFLAGS)
|
||||
|
||||
sbin_PROGRAMS += ztest
|
||||
CPPCHECKTARGETS += ztest
|
||||
|
||||
ztest_SOURCES = \
|
||||
%D%/ztest.c
|
||||
|
||||
ztest_LDADD = \
|
||||
libzpool.la \
|
||||
libzfs_core.la \
|
||||
libnvpair.la
|
||||
|
||||
ztest_LDADD += -lm
|
||||
ztest_LDFLAGS = -pthread
|
||||
|
||||
|
||||
include $(srcdir)/%D%/raidz_test/Makefile.am
|
||||
include $(srcdir)/%D%/vdev_id/Makefile.am
|
||||
include $(srcdir)/%D%/zdb/Makefile.am
|
||||
include $(srcdir)/%D%/zfs/Makefile.am
|
||||
include $(srcdir)/%D%/zfs_ids_to_path/Makefile.am
|
||||
include $(srcdir)/%D%/zhack/Makefile.am
|
||||
include $(srcdir)/%D%/zinject/Makefile.am
|
||||
include $(srcdir)/%D%/zpool/Makefile.am
|
||||
include $(srcdir)/%D%/zpool_influxdb/Makefile.am
|
||||
include $(srcdir)/%D%/zstream/Makefile.am
|
||||
include $(srcdir)/%D%/ztest/Makefile.am
|
||||
|
||||
|
||||
if BUILD_LINUX
|
||||
include $(srcdir)/%D%/mount_zfs/Makefile.am
|
||||
mounthelper_PROGRAMS += mount.zfs
|
||||
CPPCHECKTARGETS += mount.zfs
|
||||
|
||||
mount_zfs_SOURCES = \
|
||||
%D%/mount_zfs.c
|
||||
|
||||
mount_zfs_LDADD = \
|
||||
libzfs.la \
|
||||
libzfs_core.la \
|
||||
libnvpair.la
|
||||
|
||||
mount_zfs_LDADD += $(LTLIBINTL)
|
||||
|
||||
CPPCHECKTARGETS += raidz_test
|
||||
|
||||
|
||||
sbin_PROGRAMS += zgenhostid
|
||||
CPPCHECKTARGETS += zgenhostid
|
||||
|
||||
zgenhostid_SOURCES = \
|
||||
%D%/zgenhostid.c
|
||||
|
||||
|
||||
dist_bin_SCRIPTS += %D%/zvol_wait
|
||||
SHELLCHECKSCRIPTS += %D%/zvol_wait
|
||||
|
||||
|
||||
include $(srcdir)/%D%/zed/Makefile.am
|
||||
include $(srcdir)/%D%/zgenhostid/Makefile.am
|
||||
include $(srcdir)/%D%/zvol_id/Makefile.am
|
||||
include $(srcdir)/%D%/zvol_wait/Makefile.am
|
||||
endif
|
||||
|
||||
|
||||
if USING_PYTHON
|
||||
include $(srcdir)/%D%/arc_summary/Makefile.am
|
||||
include $(srcdir)/%D%/arcstat/Makefile.am
|
||||
include $(srcdir)/%D%/dbufstat/Makefile.am
|
||||
bin_SCRIPTS += arc_summary arcstat dbufstat
|
||||
CLEANFILES += arc_summary arcstat dbufstat
|
||||
EXTRA_DIST += %D%/arc_summary %D%/arcstat.in %D%/dbufstat.in
|
||||
|
||||
$(call SUBST,arcstat,%D%/)
|
||||
$(call SUBST,dbufstat,%D%/)
|
||||
arc_summary: %D%/arc_summary
|
||||
$(AM_V_at)cp $< $@
|
||||
endif
|
||||
|
||||
|
||||
PHONY += cmd
|
||||
cmd: $(bin_SCRIPTS) $(bin_PROGRAMS) $(sbin_SCRIPTS) $(sbin_PROGRAMS) $(udev_PROGRAMS) $(dist_bin_SCRIPTS) $(zfsexec_PROGRAMS) $(dist_udev_SCRIPTS) $(mounthelper_PROGRAMS)
|
||||
cmd: $(bin_SCRIPTS) $(bin_PROGRAMS) $(sbin_SCRIPTS) $(sbin_PROGRAMS) $(dist_bin_SCRIPTS) $(zfsexec_PROGRAMS) $(mounthelper_PROGRAMS)
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
bin_SCRIPTS += arc_summary
|
||||
CLEANFILES += arc_summary
|
||||
|
||||
EXTRA_DIST += %D%/arc_summary3
|
||||
ARC_SUMMARY = %D%/arc_summary3
|
||||
|
||||
arc_summary: $(ARC_SUMMARY)
|
||||
$(AM_V_at)cp $< $@
|
|
@ -1,4 +0,0 @@
|
|||
bin_SCRIPTS += arcstat
|
||||
CLEANFILES += arcstat
|
||||
EXTRA_DIST += %D%/arcstat.in
|
||||
$(call SUBST,arcstat,%D%/)
|
|
@ -1,4 +0,0 @@
|
|||
bin_SCRIPTS += dbufstat
|
||||
CLEANFILES += dbufstat
|
||||
EXTRA_DIST += %D%/dbufstat.in
|
||||
$(call SUBST,dbufstat,%D%/)
|
|
@ -1,5 +0,0 @@
|
|||
sbin_SCRIPTS += fsck.zfs
|
||||
SHELLCHECKSCRIPTS += fsck.zfs
|
||||
CLEANFILES += fsck.zfs
|
||||
EXTRA_DIST += %D%/fsck.zfs.in
|
||||
$(call SUBST,fsck.zfs,%D%/)
|
|
@ -1,20 +0,0 @@
|
|||
#
|
||||
# Ignore the prefix for the mount helper. It must be installed in /sbin/
|
||||
# because this path is hardcoded in the mount(8) for security reasons.
|
||||
# However, if needed, the configure option --with-mounthelperdir= can be used
|
||||
# to override the default install location.
|
||||
#
|
||||
mounthelper_PROGRAMS += mount.zfs
|
||||
CPPCHECKTARGETS += mount.zfs
|
||||
|
||||
mount_zfs_SOURCES = \
|
||||
%D%/mount_zfs.c
|
||||
|
||||
mount_zfs_LDADD = \
|
||||
libzfs.la \
|
||||
libzfs_core.la \
|
||||
libnvpair.la
|
||||
|
||||
mount_zfs_LDADD += $(LTLIBINTL)
|
||||
|
||||
CPPCHECKTARGETS += raidz_test
|
|
@ -1,2 +0,0 @@
|
|||
dist_udev_SCRIPTS += %D%/vdev_id
|
||||
# TODO: #12084: SHELLCHECKSCRIPTS += %D%/vdev_id
|
|
@ -1,8 +0,0 @@
|
|||
sbin_PROGRAMS += zfs_ids_to_path
|
||||
CPPCHECKTARGETS += zfs_ids_to_path
|
||||
|
||||
zfs_ids_to_path_SOURCES = \
|
||||
%D%/zfs_ids_to_path.c
|
||||
|
||||
zfs_ids_to_path_LDADD = \
|
||||
libzfs.la
|
|
@ -1,5 +0,0 @@
|
|||
sbin_PROGRAMS += zgenhostid
|
||||
CPPCHECKTARGETS += zgenhostid
|
||||
|
||||
zgenhostid_SOURCES = \
|
||||
%D%/zgenhostid.c
|
|
@ -1,12 +0,0 @@
|
|||
zhack_CPPFLAGS = $(AM_CPPFLAGS) $(FORCEDEBUG_CPPFLAGS)
|
||||
|
||||
sbin_PROGRAMS += zhack
|
||||
CPPCHECKTARGETS += zhack
|
||||
|
||||
zhack_SOURCES = \
|
||||
%D%/zhack.c
|
||||
|
||||
zhack_LDADD = \
|
||||
libzpool.la \
|
||||
libzfs_core.la \
|
||||
libnvpair.la
|
|
@ -1,18 +0,0 @@
|
|||
ztest_CFLAGS = $(AM_CFLAGS) $(KERNEL_CFLAGS)
|
||||
# Get rid of compiler warning for unchecked truncating snprintfs on gcc 7.1.1
|
||||
ztest_CFLAGS += $(NO_FORMAT_TRUNCATION)
|
||||
ztest_CPPFLAGS = $(AM_CPPFLAGS) $(FORCEDEBUG_CPPFLAGS)
|
||||
|
||||
sbin_PROGRAMS += ztest
|
||||
CPPCHECKTARGETS += ztest
|
||||
|
||||
ztest_SOURCES = \
|
||||
%D%/ztest.c
|
||||
|
||||
ztest_LDADD = \
|
||||
libzpool.la \
|
||||
libzfs_core.la \
|
||||
libnvpair.la
|
||||
|
||||
ztest_LDADD += -lm
|
||||
ztest_LDFLAGS = -pthread
|
|
@ -1,5 +0,0 @@
|
|||
udev_PROGRAMS += zvol_id
|
||||
CPPCHECKTARGETS += zvol_id
|
||||
|
||||
zvol_id_SOURCES = \
|
||||
%D%/zvol_id_main.c
|
|
@ -1,2 +0,0 @@
|
|||
dist_bin_SCRIPTS += %D%/zvol_wait
|
||||
SHELLCHECKSCRIPTS += %D%/zvol_wait
|
|
@ -35,6 +35,8 @@ export GDB="libtool --mode=execute gdb"
|
|||
export LDMOD=/sbin/insmod
|
||||
|
||||
export CMD_DIR=$(abs_top_builddir)
|
||||
export UDEV_SCRIPT_DIR=$(abs_top_srcdir)/udev
|
||||
export UDEV_CMD_DIR=$(abs_top_builddir)/udev
|
||||
export UDEV_RULE_DIR=$(abs_top_builddir)/udev/rules.d
|
||||
export ZEDLET_ETC_DIR=$$CMD_DIR/cmd/zed/zed.d
|
||||
export ZEDLET_LIBEXEC_DIR=$$CMD_DIR/cmd/zed/zed.d
|
||||
|
|
|
@ -156,7 +156,7 @@ if [ "${INSTALL}" = "yes" ]; then
|
|||
for cmd in "mount.zfs" "fsck.zfs"; do
|
||||
install "$CMD_DIR/$cmd" "$INSTALL_MOUNT_HELPER_DIR/$cmd"
|
||||
done
|
||||
for udev in "$CMD_DIR/zvol_id" "$UDEV_SCRIPT_DIR/vdev_id"; do
|
||||
for udev in "$UDEV_CMD_DIR/zvol_id" "$UDEV_SCRIPT_DIR/vdev_id"; do
|
||||
install "$udev" "$INSTALL_UDEV_DIR/${udev##*/}"
|
||||
done
|
||||
for rule in "60-zvol.rules" "69-vdev.rules" "90-zfs.rules"; do
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
/zvol_id
|
|
@ -4,3 +4,15 @@ udevrule_DATA = \
|
|||
%D%/rules.d/90-zfs.rules
|
||||
|
||||
SUBSTFILES += $(udevrule_DATA)
|
||||
|
||||
|
||||
dist_udev_SCRIPTS = %D%/vdev_id
|
||||
# TODO: #12084: SHELLCHECKSCRIPTS += %D%/vdev_id
|
||||
|
||||
|
||||
udev_PROGRAMS = %D%/zvol_id
|
||||
CPPCHECKTARGETS += %D%/zvol_id
|
||||
|
||||
|
||||
PHONY += udev
|
||||
udev: $(dist_udev_SCRIPTS) $(udev_PROGRAMS)
|
||||
|
|
Loading…
Reference in New Issue