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 <behlendorf1@llnl.gov>
Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Closes #10506
This commit is contained in:
Arvind Sankar 2020-06-26 17:20:30 -04:00 committed by Brian Behlendorf
parent 67b1362f04
commit 4d8e68c42f
14 changed files with 23 additions and 20 deletions

View File

@ -26,6 +26,8 @@ libzfs_HEADERS = $(COMMON_H) $(USER_H)
endif endif
if CONFIG_KERNEL if CONFIG_KERNEL
if BUILD_LINUX
kerneldir = @prefix@/src/zfs-$(VERSION)/include kerneldir = @prefix@/src/zfs-$(VERSION)/include
kernel_HEADERS = $(COMMON_H) kernel_HEADERS = $(COMMON_H)
endif endif
endif

View File

@ -2,7 +2,4 @@ KERNEL_H = \
compiler.h \ compiler.h \
types.h types.h
if CONFIG_KERNEL noinst_HEADERS = $(KERNEL_H)
kerneldir = @prefix@/src/zfs-$(VERSION)/include/linux
kernel_HEADERS = $(KERNEL_H)
endif

View File

@ -1,7 +1,4 @@
KERNEL_H = \ KERNEL_H = \
acl_common.h acl_common.h
if CONFIG_KERNEL noinst_HEADERS = $(KERNEL_H)
kerneldir = @prefix@/src/zfs-$(VERSION)/include/spl/acl
kernel_HEADERS = $(KERNEL_H)
endif

View File

@ -1,7 +1,4 @@
KERNEL_H = \ KERNEL_H = \
xdr.h xdr.h
if CONFIG_KERNEL noinst_HEADERS = $(KERNEL_H)
kerneldir = @prefix@/src/zfs-$(VERSION)/include/spl/rpc
kernel_HEADERS = $(KERNEL_H)
endif

View File

@ -69,7 +69,4 @@ KERNEL_H = \
zmod.h \ zmod.h \
zone.h zone.h
if CONFIG_KERNEL noinst_HEADERS = $(KERNEL_H)
kerneldir = @prefix@/src/zfs-$(VERSION)/include/spl/sys
kernel_HEADERS = $(KERNEL_H)
endif

View File

@ -11,7 +11,4 @@ KERNEL_H = \
zfs_znode_impl.h \ zfs_znode_impl.h \
zpl.h zpl.h
if CONFIG_KERNEL noinst_HEADERS = $(KERNEL_H)
kerneldir = @prefix@/src/zfs-$(VERSION)/include/sys
kernel_HEADERS = $(KERNEL_H)
endif

View File

@ -15,6 +15,8 @@ KERNEL_H = \
compiler_compat.h compiler_compat.h
if CONFIG_KERNEL if CONFIG_KERNEL
if BUILD_LINUX
kerneldir = @prefix@/src/zfs-$(VERSION)/include/linux kerneldir = @prefix@/src/zfs-$(VERSION)/include/linux
kernel_HEADERS = $(KERNEL_H) kernel_HEADERS = $(KERNEL_H)
endif endif
endif

View File

@ -139,6 +139,8 @@ libzfs_HEADERS = $(COMMON_H)
endif endif
if CONFIG_KERNEL if CONFIG_KERNEL
if BUILD_LINUX
kerneldir = @prefix@/src/zfs-$(VERSION)/include/sys kerneldir = @prefix@/src/zfs-$(VERSION)/include/sys
kernel_HEADERS = $(COMMON_H) $(KERNEL_H) kernel_HEADERS = $(COMMON_H) $(KERNEL_H)
endif endif
endif

View File

@ -9,6 +9,8 @@ libzfs_HEADERS = $(COMMON_H)
endif endif
if CONFIG_KERNEL if CONFIG_KERNEL
if BUILD_LINUX
kerneldir = @prefix@/src/zfs-$(VERSION)/include/sys/crypto kerneldir = @prefix@/src/zfs-$(VERSION)/include/sys/crypto
kernel_HEADERS = $(COMMON_H) kernel_HEADERS = $(COMMON_H)
endif endif
endif

View File

@ -10,6 +10,8 @@ libzfs_HEADERS = $(COMMON_H)
endif endif
if CONFIG_KERNEL if CONFIG_KERNEL
if BUILD_LINUX
kerneldir = @prefix@/src/zfs-$(VERSION)/include/sys/fm kerneldir = @prefix@/src/zfs-$(VERSION)/include/sys/fm
kernel_HEADERS = $(COMMON_H) kernel_HEADERS = $(COMMON_H)
endif endif
endif

View File

@ -7,6 +7,8 @@ libzfs_HEADERS = $(COMMON_H)
endif endif
if CONFIG_KERNEL if CONFIG_KERNEL
if BUILD_LINUX
kerneldir = @prefix@/src/zfs-$(VERSION)/include/sys/fm/fs kerneldir = @prefix@/src/zfs-$(VERSION)/include/sys/fm/fs
kernel_HEADERS = $(COMMON_H) kernel_HEADERS = $(COMMON_H)
endif endif
endif

View File

@ -7,6 +7,8 @@ libzfs_HEADERS = $(COMMON_H)
endif endif
if CONFIG_KERNEL if CONFIG_KERNEL
if BUILD_LINUX
kerneldir = @prefix@/src/zfs-$(VERSION)/include/sys/fs kerneldir = @prefix@/src/zfs-$(VERSION)/include/sys/fs
kernel_HEADERS = $(COMMON_H) kernel_HEADERS = $(COMMON_H)
endif endif
endif

View File

@ -10,6 +10,8 @@ libzfs_HEADERS = $(COMMON_H)
endif endif
if CONFIG_KERNEL if CONFIG_KERNEL
if BUILD_LINUX
kerneldir = @prefix@/src/zfs-$(VERSION)/include/sys/lua kerneldir = @prefix@/src/zfs-$(VERSION)/include/sys/lua
kernel_HEADERS = $(COMMON_H) kernel_HEADERS = $(COMMON_H)
endif endif
endif

View File

@ -8,6 +8,8 @@ libzfs_HEADERS = $(COMMON_H)
endif endif
if CONFIG_KERNEL if CONFIG_KERNEL
if BUILD_LINUX
kerneldir = @prefix@/src/zfs-$(VERSION)/include/sys/sysevent kerneldir = @prefix@/src/zfs-$(VERSION)/include/sys/sysevent
kernel_HEADERS = $(COMMON_H) kernel_HEADERS = $(COMMON_H)
endif endif
endif