2015-04-09 20:14:29 +00:00
|
|
|
diff --git a/Makefile.am b/Makefile.am
|
2016-01-13 16:07:33 +00:00
|
|
|
index f8abb5f..82e8fb6 100644
|
2015-04-09 20:14:29 +00:00
|
|
|
--- a/Makefile.am
|
|
|
|
+++ b/Makefile.am
|
2016-01-13 16:07:33 +00:00
|
|
|
@@ -11,10 +11,10 @@ endif
|
2015-04-09 20:14:29 +00:00
|
|
|
if CONFIG_KERNEL
|
|
|
|
SUBDIRS += module
|
|
|
|
|
|
|
|
-extradir = @prefix@/src/zfs-$(VERSION)
|
|
|
|
+extradir = @prefix@/libexec/zfs-$(VERSION)
|
|
|
|
extra_HEADERS = zfs.release.in zfs_config.h.in
|
|
|
|
|
|
|
|
-kerneldir = @prefix@/src/zfs-$(VERSION)/$(LINUX_VERSION)
|
|
|
|
+kerneldir = @prefix@/zfs-$(VERSION)/$(LINUX_VERSION)
|
|
|
|
nodist_kernel_HEADERS = zfs.release zfs_config.h module/$(LINUX_SYMBOLS)
|
|
|
|
endif
|
|
|
|
|
|
|
|
diff --git a/include/Makefile.am b/include/Makefile.am
|
|
|
|
index a94cad5..a160fe2 100644
|
|
|
|
--- a/include/Makefile.am
|
|
|
|
+++ b/include/Makefile.am
|
|
|
|
@@ -29,6 +29,6 @@ libzfs_HEADERS = $(COMMON_H) $(USER_H)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if CONFIG_KERNEL
|
|
|
|
-kerneldir = @prefix@/src/zfs-$(VERSION)/include
|
|
|
|
+kerneldir = @prefix@/include
|
|
|
|
kernel_HEADERS = $(COMMON_H) $(KERNEL_H)
|
|
|
|
endif
|
|
|
|
diff --git a/include/linux/Makefile.am b/include/linux/Makefile.am
|
2016-01-13 16:07:33 +00:00
|
|
|
index 595d1db..d41375d 100644
|
2015-04-09 20:14:29 +00:00
|
|
|
--- a/include/linux/Makefile.am
|
|
|
|
+++ b/include/linux/Makefile.am
|
2016-01-13 16:07:33 +00:00
|
|
|
@@ -18,6 +18,6 @@ libzfs_HEADERS = $(COMMON_H) $(USER_H)
|
2015-04-09 20:14:29 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
if CONFIG_KERNEL
|
|
|
|
-kerneldir = @prefix@/src/zfs-$(VERSION)/include/linux
|
|
|
|
+kerneldir = @prefix@/include/linux
|
|
|
|
kernel_HEADERS = $(COMMON_H) $(KERNEL_H)
|
|
|
|
endif
|
|
|
|
diff --git a/include/sys/Makefile.am b/include/sys/Makefile.am
|
2016-01-13 16:07:33 +00:00
|
|
|
index 77ecfb2..52b3612 100644
|
2015-04-09 20:14:29 +00:00
|
|
|
--- a/include/sys/Makefile.am
|
|
|
|
+++ b/include/sys/Makefile.am
|
2016-01-13 16:07:33 +00:00
|
|
|
@@ -114,6 +114,6 @@ libzfs_HEADERS = $(COMMON_H) $(USER_H)
|
2015-04-09 20:14:29 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
if CONFIG_KERNEL
|
|
|
|
-kerneldir = @prefix@/src/zfs-$(VERSION)/include/sys
|
|
|
|
+kerneldir = @prefix@/include/sys
|
|
|
|
kernel_HEADERS = $(COMMON_H) $(KERNEL_H)
|
|
|
|
endif
|
|
|
|
diff --git a/include/sys/fm/Makefile.am b/include/sys/fm/Makefile.am
|
|
|
|
index 8bca5d8..a5eafcd 100644
|
|
|
|
--- a/include/sys/fm/Makefile.am
|
|
|
|
+++ b/include/sys/fm/Makefile.am
|
|
|
|
@@ -16,6 +16,6 @@ libzfs_HEADERS = $(COMMON_H) $(USER_H)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if CONFIG_KERNEL
|
|
|
|
-kerneldir = @prefix@/src/zfs-$(VERSION)/include/sys/fm
|
|
|
|
+kerneldir = @prefix@/include/sys/fm
|
|
|
|
kernel_HEADERS = $(COMMON_H) $(KERNEL_H)
|
|
|
|
endif
|
|
|
|
diff --git a/include/sys/fm/fs/Makefile.am b/include/sys/fm/fs/Makefile.am
|
|
|
|
index fdc9eb5..807c47c 100644
|
|
|
|
--- a/include/sys/fm/fs/Makefile.am
|
|
|
|
+++ b/include/sys/fm/fs/Makefile.am
|
|
|
|
@@ -13,6 +13,6 @@ libzfs_HEADERS = $(COMMON_H) $(USER_H)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if CONFIG_KERNEL
|
|
|
|
-kerneldir = @prefix@/src/zfs-$(VERSION)/include/sys/fm/fs
|
|
|
|
+kerneldir = @prefix@/include/sys/fm/fs
|
|
|
|
kernel_HEADERS = $(COMMON_H) $(KERNEL_H)
|
|
|
|
endif
|
|
|
|
diff --git a/include/sys/fs/Makefile.am b/include/sys/fs/Makefile.am
|
|
|
|
index 0859b9f..b0c6eec 100644
|
|
|
|
--- a/include/sys/fs/Makefile.am
|
|
|
|
+++ b/include/sys/fs/Makefile.am
|
|
|
|
@@ -13,6 +13,6 @@ libzfs_HEADERS = $(COMMON_H) $(USER_H)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if CONFIG_KERNEL
|
|
|
|
-kerneldir = @prefix@/src/zfs-$(VERSION)/include/sys/fs
|
|
|
|
+kerneldir = @prefix@/include/sys/fs
|
|
|
|
kernel_HEADERS = $(COMMON_H) $(KERNEL_H)
|
|
|
|
endif
|
|
|
|
diff --git a/module/Makefile.in b/module/Makefile.in
|
2016-01-13 16:07:33 +00:00
|
|
|
index d4ddee2..876c811 100644
|
2015-04-09 20:14:29 +00:00
|
|
|
--- a/module/Makefile.in
|
|
|
|
+++ b/module/Makefile.in
|
|
|
|
@@ -18,9 +18,9 @@ modules:
|
|
|
|
@# installed devel headers, or they may be in the module
|
|
|
|
@# subdirectory when building against the spl source tree.
|
|
|
|
@if [ -f @SPL_OBJ@/@SPL_SYMBOLS@ ]; then \
|
|
|
|
- /bin/cp @SPL_OBJ@/@SPL_SYMBOLS@ .; \
|
|
|
|
+ cp @SPL_OBJ@/@SPL_SYMBOLS@ .; \
|
|
|
|
elif [ -f @SPL_OBJ@/module/@SPL_SYMBOLS@ ]; then \
|
|
|
|
- /bin/cp @SPL_OBJ@/module/@SPL_SYMBOLS@ .; \
|
|
|
|
+ cp @SPL_OBJ@/module/@SPL_SYMBOLS@ .; \
|
|
|
|
else \
|
|
|
|
echo -e "\n" \
|
|
|
|
"*** Missing spl symbols ensure you have built the spl:\n" \
|
|
|
|
@@ -28,6 +28,8 @@ modules:
|
|
|
|
"*** - @SPL_OBJ@/module/@SPL_SYMBOLS@\n"; \
|
|
|
|
exit 1; \
|
|
|
|
fi
|
2016-01-13 16:07:33 +00:00
|
|
|
+ @# when copying a file out of the nix store, we need to make it writable again.
|
2015-04-09 20:14:29 +00:00
|
|
|
+ chmod +w @SPL_SYMBOLS@
|
|
|
|
$(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ CONFIG_ZFS=m $@
|
|
|
|
|
|
|
|
clean:
|
|
|
|
@@ -42,15 +44,15 @@ clean:
|
|
|
|
modules_install:
|
|
|
|
@# Install the kernel modules
|
|
|
|
$(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` $@ \
|
|
|
|
- INSTALL_MOD_PATH=$(DESTDIR)$(INSTALL_MOD_PATH) \
|
|
|
|
+ INSTALL_MOD_PATH=@prefix@/$(INSTALL_MOD_PATH) \
|
|
|
|
INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) \
|
|
|
|
KERNELRELEASE=@LINUX_VERSION@
|
|
|
|
@# Remove extraneous build products when packaging
|
|
|
|
- kmoddir=$(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@; \
|
2016-01-13 16:07:33 +00:00
|
|
|
- if [ -n "$(DESTDIR)" ]; then \
|
2015-04-09 20:14:29 +00:00
|
|
|
+ kmoddir=@prefix@/$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@; \
|
2016-01-13 16:07:33 +00:00
|
|
|
+ if [ -n "@prefix@" ]; then \
|
2015-04-09 20:14:29 +00:00
|
|
|
find $$kmoddir -name 'modules.*' | xargs $(RM); \
|
|
|
|
fi
|
|
|
|
- sysmap=$(DESTDIR)$(INSTALL_MOD_PATH)/boot/System.map-@LINUX_VERSION@; \
|
|
|
|
+ sysmap=@prefix@/$(INSTALL_MOD_PATH)/boot/System.map-@LINUX_VERSION@; \
|
|
|
|
if [ -f $$sysmap ]; then \
|
|
|
|
depmod -ae -F $$sysmap @LINUX_VERSION@; \
|
|
|
|
fi
|