From 4d8e68c42fb0bd5518f61670720af690fca302e0 Mon Sep 17 00:00:00 2001 From: Arvind Sankar Date: Fri, 26 Jun 2020 17:20:30 -0400 Subject: [PATCH] Avoid installing kernel headers on FreeBSD The kernel headers are installed for DKMS on linux, so don't install them unless we're building on linux. Reviewed-by: Brian Behlendorf Signed-off-by: Arvind Sankar Closes #10506 --- include/Makefile.am | 2 ++ include/os/freebsd/linux/Makefile.am | 5 +---- include/os/freebsd/spl/acl/Makefile.am | 5 +---- include/os/freebsd/spl/rpc/Makefile.am | 5 +---- include/os/freebsd/spl/sys/Makefile.am | 5 +---- include/os/freebsd/zfs/sys/Makefile.am | 5 +---- include/os/linux/kernel/linux/Makefile.am | 2 ++ include/sys/Makefile.am | 2 ++ include/sys/crypto/Makefile.am | 2 ++ include/sys/fm/Makefile.am | 2 ++ include/sys/fm/fs/Makefile.am | 2 ++ include/sys/fs/Makefile.am | 2 ++ include/sys/lua/Makefile.am | 2 ++ include/sys/sysevent/Makefile.am | 2 ++ 14 files changed, 23 insertions(+), 20 deletions(-) diff --git a/include/Makefile.am b/include/Makefile.am index ba02142dfa..0e997deaf1 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -26,6 +26,8 @@ libzfs_HEADERS = $(COMMON_H) $(USER_H) endif if CONFIG_KERNEL +if BUILD_LINUX kerneldir = @prefix@/src/zfs-$(VERSION)/include kernel_HEADERS = $(COMMON_H) endif +endif diff --git a/include/os/freebsd/linux/Makefile.am b/include/os/freebsd/linux/Makefile.am index df902b87a1..00cff7f5dc 100644 --- a/include/os/freebsd/linux/Makefile.am +++ b/include/os/freebsd/linux/Makefile.am @@ -2,7 +2,4 @@ KERNEL_H = \ compiler.h \ types.h -if CONFIG_KERNEL -kerneldir = @prefix@/src/zfs-$(VERSION)/include/linux -kernel_HEADERS = $(KERNEL_H) -endif +noinst_HEADERS = $(KERNEL_H) diff --git a/include/os/freebsd/spl/acl/Makefile.am b/include/os/freebsd/spl/acl/Makefile.am index 3028ebabec..5c0698d02e 100644 --- a/include/os/freebsd/spl/acl/Makefile.am +++ b/include/os/freebsd/spl/acl/Makefile.am @@ -1,7 +1,4 @@ KERNEL_H = \ acl_common.h -if CONFIG_KERNEL -kerneldir = @prefix@/src/zfs-$(VERSION)/include/spl/acl -kernel_HEADERS = $(KERNEL_H) -endif +noinst_HEADERS = $(KERNEL_H) diff --git a/include/os/freebsd/spl/rpc/Makefile.am b/include/os/freebsd/spl/rpc/Makefile.am index 13d804fce9..f6faf4b188 100644 --- a/include/os/freebsd/spl/rpc/Makefile.am +++ b/include/os/freebsd/spl/rpc/Makefile.am @@ -1,7 +1,4 @@ KERNEL_H = \ xdr.h -if CONFIG_KERNEL -kerneldir = @prefix@/src/zfs-$(VERSION)/include/spl/rpc -kernel_HEADERS = $(KERNEL_H) -endif +noinst_HEADERS = $(KERNEL_H) diff --git a/include/os/freebsd/spl/sys/Makefile.am b/include/os/freebsd/spl/sys/Makefile.am index c95c9d65a7..7803d1af30 100644 --- a/include/os/freebsd/spl/sys/Makefile.am +++ b/include/os/freebsd/spl/sys/Makefile.am @@ -69,7 +69,4 @@ KERNEL_H = \ zmod.h \ zone.h -if CONFIG_KERNEL -kerneldir = @prefix@/src/zfs-$(VERSION)/include/spl/sys -kernel_HEADERS = $(KERNEL_H) -endif +noinst_HEADERS = $(KERNEL_H) diff --git a/include/os/freebsd/zfs/sys/Makefile.am b/include/os/freebsd/zfs/sys/Makefile.am index 8a1f8b3135..a8cfa39f35 100644 --- a/include/os/freebsd/zfs/sys/Makefile.am +++ b/include/os/freebsd/zfs/sys/Makefile.am @@ -11,7 +11,4 @@ KERNEL_H = \ zfs_znode_impl.h \ zpl.h -if CONFIG_KERNEL -kerneldir = @prefix@/src/zfs-$(VERSION)/include/sys -kernel_HEADERS = $(KERNEL_H) -endif +noinst_HEADERS = $(KERNEL_H) diff --git a/include/os/linux/kernel/linux/Makefile.am b/include/os/linux/kernel/linux/Makefile.am index 86b253304d..6ff0df506d 100644 --- a/include/os/linux/kernel/linux/Makefile.am +++ b/include/os/linux/kernel/linux/Makefile.am @@ -15,6 +15,8 @@ KERNEL_H = \ compiler_compat.h if CONFIG_KERNEL +if BUILD_LINUX kerneldir = @prefix@/src/zfs-$(VERSION)/include/linux kernel_HEADERS = $(KERNEL_H) endif +endif diff --git a/include/sys/Makefile.am b/include/sys/Makefile.am index 3d7bd191bf..ce781aa4cf 100644 --- a/include/sys/Makefile.am +++ b/include/sys/Makefile.am @@ -139,6 +139,8 @@ libzfs_HEADERS = $(COMMON_H) endif if CONFIG_KERNEL +if BUILD_LINUX kerneldir = @prefix@/src/zfs-$(VERSION)/include/sys kernel_HEADERS = $(COMMON_H) $(KERNEL_H) endif +endif diff --git a/include/sys/crypto/Makefile.am b/include/sys/crypto/Makefile.am index 79a5adfae6..eb31f6a457 100644 --- a/include/sys/crypto/Makefile.am +++ b/include/sys/crypto/Makefile.am @@ -9,6 +9,8 @@ libzfs_HEADERS = $(COMMON_H) endif if CONFIG_KERNEL +if BUILD_LINUX kerneldir = @prefix@/src/zfs-$(VERSION)/include/sys/crypto kernel_HEADERS = $(COMMON_H) endif +endif diff --git a/include/sys/fm/Makefile.am b/include/sys/fm/Makefile.am index fd735e1878..7c6c3d49b6 100644 --- a/include/sys/fm/Makefile.am +++ b/include/sys/fm/Makefile.am @@ -10,6 +10,8 @@ libzfs_HEADERS = $(COMMON_H) endif if CONFIG_KERNEL +if BUILD_LINUX kerneldir = @prefix@/src/zfs-$(VERSION)/include/sys/fm kernel_HEADERS = $(COMMON_H) endif +endif diff --git a/include/sys/fm/fs/Makefile.am b/include/sys/fm/fs/Makefile.am index 7f33a1532d..a662753a9e 100644 --- a/include/sys/fm/fs/Makefile.am +++ b/include/sys/fm/fs/Makefile.am @@ -7,6 +7,8 @@ libzfs_HEADERS = $(COMMON_H) endif if CONFIG_KERNEL +if BUILD_LINUX kerneldir = @prefix@/src/zfs-$(VERSION)/include/sys/fm/fs kernel_HEADERS = $(COMMON_H) endif +endif diff --git a/include/sys/fs/Makefile.am b/include/sys/fs/Makefile.am index 3517457865..6a93053c8e 100644 --- a/include/sys/fs/Makefile.am +++ b/include/sys/fs/Makefile.am @@ -7,6 +7,8 @@ libzfs_HEADERS = $(COMMON_H) endif if CONFIG_KERNEL +if BUILD_LINUX kerneldir = @prefix@/src/zfs-$(VERSION)/include/sys/fs kernel_HEADERS = $(COMMON_H) endif +endif diff --git a/include/sys/lua/Makefile.am b/include/sys/lua/Makefile.am index e9d1185a49..8b4dafaa8c 100644 --- a/include/sys/lua/Makefile.am +++ b/include/sys/lua/Makefile.am @@ -10,6 +10,8 @@ libzfs_HEADERS = $(COMMON_H) endif if CONFIG_KERNEL +if BUILD_LINUX kerneldir = @prefix@/src/zfs-$(VERSION)/include/sys/lua kernel_HEADERS = $(COMMON_H) endif +endif diff --git a/include/sys/sysevent/Makefile.am b/include/sys/sysevent/Makefile.am index 18949913ee..64e5376395 100644 --- a/include/sys/sysevent/Makefile.am +++ b/include/sys/sysevent/Makefile.am @@ -8,6 +8,8 @@ libzfs_HEADERS = $(COMMON_H) endif if CONFIG_KERNEL +if BUILD_LINUX kerneldir = @prefix@/src/zfs-$(VERSION)/include/sys/sysevent kernel_HEADERS = $(COMMON_H) endif +endif