aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libzfs_core/Makefile.am
diff options
context:
space:
mode:
authorнаб <[email protected]>2022-04-08 01:07:08 +0200
committerBrian Behlendorf <[email protected]>2022-05-10 10:18:11 -0700
commitc8970f52ed53ed62262b6246c7f791018ee96d2b (patch)
tree9b285f8bee295e3b7528f31b83b845d7fdaabe62 /lib/libzfs_core/Makefile.am
parent6fc34371e1df4d74dee6e50ffd9d9fae234b55ba (diff)
autoconf: use include directives instead of recursing down lib
As a bonus, this also adds zfs-mount-generator (previously undescended down) and libzstd (not included) to CppCheck As a bonus bonus, abigail rules work out-of-tree, too Against current trunk: $ diff -U0 ./destdir.listing ~/store/code/zfs/destdir.listing -destdir/usr/local/include/libspl/sscanf.h $ diff --color -U0 ./zfs-2.1.99.tar.gz.listing ../oot/zfs-2.1.99.tar.gz.listing | grep -v @@ | grep -v /Makefile -zfs-2.1.99/config/Abigail.am -zfs-2.1.99/lib/libspl/include/util/ -zfs-2.1.99/lib/libspl/include/util/sscanf.h $ diff --color -U0 ./zfs-2.1.99.tar.gz.listing ../oot/zfs-2.1.99.tar.gz.listing | grep -v @@ | grep /Makefile -zfs-2.1.99/lib/libavl/Makefile.in -zfs-2.1.99/lib/libefi/Makefile.in -zfs-2.1.99/lib/libicp/Makefile.in -zfs-2.1.99/lib/libnvpair/Makefile.in -zfs-2.1.99/lib/libshare/Makefile.in -zfs-2.1.99/lib/libspl/include/Makefile.in -zfs-2.1.99/lib/libspl/include/os/freebsd/Makefile.am -zfs-2.1.99/lib/libspl/include/os/freebsd/Makefile.in -zfs-2.1.99/lib/libspl/include/os/freebsd/sys/Makefile.am -zfs-2.1.99/lib/libspl/include/os/freebsd/sys/Makefile.in -zfs-2.1.99/lib/libspl/include/os/linux/Makefile.am -zfs-2.1.99/lib/libspl/include/os/linux/Makefile.in -zfs-2.1.99/lib/libspl/include/os/linux/sys/Makefile.am -zfs-2.1.99/lib/libspl/include/os/linux/sys/Makefile.in -zfs-2.1.99/lib/libspl/include/os/Makefile.am -zfs-2.1.99/lib/libspl/include/os/Makefile.in -zfs-2.1.99/lib/libspl/include/rpc/Makefile.am -zfs-2.1.99/lib/libspl/include/rpc/Makefile.in -zfs-2.1.99/lib/libspl/include/sys/dktp/Makefile.am -zfs-2.1.99/lib/libspl/include/sys/dktp/Makefile.in -zfs-2.1.99/lib/libspl/include/sys/Makefile.am -zfs-2.1.99/lib/libspl/include/sys/Makefile.in -zfs-2.1.99/lib/libspl/include/util/Makefile.am -zfs-2.1.99/lib/libspl/include/util/Makefile.in -zfs-2.1.99/lib/libspl/Makefile.in -zfs-2.1.99/lib/libtpool/Makefile.in -zfs-2.1.99/lib/libunicode/Makefile.in -zfs-2.1.99/lib/libuutil/Makefile.in -zfs-2.1.99/lib/libzfsbootenv/Makefile.in -zfs-2.1.99/lib/libzfs_core/Makefile.in -zfs-2.1.99/lib/libzfs/Makefile.in -zfs-2.1.99/lib/libzpool/Makefile.in -zfs-2.1.99/lib/libzstd/Makefile.in -zfs-2.1.99/lib/libzutil/Makefile.in -zfs-2.1.99/lib/Makefile.in Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13316
Diffstat (limited to 'lib/libzfs_core/Makefile.am')
-rw-r--r--lib/libzfs_core/Makefile.am45
1 files changed, 18 insertions, 27 deletions
diff --git a/lib/libzfs_core/Makefile.am b/lib/libzfs_core/Makefile.am
index b75ed464a..9370da4e3 100644
--- a/lib/libzfs_core/Makefile.am
+++ b/lib/libzfs_core/Makefile.am
@@ -1,39 +1,31 @@
-include $(top_srcdir)/config/Rules.am
+libzfs_core_la_CFLAGS = $(AM_CFLAGS) $(LIBRARY_CFLAGS)
+libzfs_core_la_CFLAGS += -fvisibility=hidden
-pkgconfig_DATA = libzfs_core.pc
+lib_LTLIBRARIES += libzfs_core.la
+CPPCHECKTARGETS += libzfs_core.la
-AM_CFLAGS += -fvisibility=hidden
-# See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=54020
-AM_CFLAGS += -no-suppress
-
-lib_LTLIBRARIES = libzfs_core.la
-
-include $(top_srcdir)/config/Abigail.am
-
-USER_C = \
- libzfs_core.c
+libzfs_core_la_SOURCES = \
+ %D%/libzfs_core.c
if BUILD_LINUX
-USER_C += \
- os/linux/libzfs_core_ioctl.c
+libzfs_core_la_SOURCES += \
+ %D%/os/linux/libzfs_core_ioctl.c
endif
+libzfs_core_la_CPPFLAGS = $(AM_CPPFLAGS)
if BUILD_FREEBSD
-DEFAULT_INCLUDES += -I$(top_srcdir)/include/os/freebsd/zfs
+libzfs_core_la_CPPFLAGS += -Iinclude/os/freebsd/zfs
-USER_C += \
- os/freebsd/libzfs_core_ioctl.c
+libzfs_core_la_SOURCES += \
+ %D%/os/freebsd/libzfs_core_ioctl.c
-VPATH += $(top_srcdir)/module/os/freebsd/zfs
-
-nodist_libzfs_core_la_SOURCES = zfs_ioctl_compat.c
+nodist_libzfs_core_la_SOURCES = \
+ module/os/freebsd/zfs/zfs_ioctl_compat.c
endif
-libzfs_core_la_SOURCES = $(USER_C)
-
libzfs_core_la_LIBADD = \
- $(abs_top_builddir)/lib/libnvpair/libnvpair.la \
- $(abs_top_builddir)/lib/libspl/libspl.la
+ libnvpair.la \
+ libspl.la
libzfs_core_la_LIBADD += $(LTLIBINTL)
@@ -49,7 +41,6 @@ endif
libzfs_core_la_LDFLAGS += -version-info 3:0:0
-include $(top_srcdir)/config/CppCheck.am
+pkgconfig_DATA += %D%/libzfs_core.pc
-# Library ABI
-EXTRA_DIST = libzfs_core.abi libzfs_core.suppr
+EXTRA_DIST += $(addprefix %D%/,libzfs_core.abi libzfs_core.suppr)