From 775f2d34a3ccd5f866cfa04be76f83cb562f3881 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 21 Feb 2013 15:10:11 -0800 Subject: [PATCH] Change zfs-kmod-devel install path Install the common zfs kernel development headers under /usr/src/zfs-/ rather than in a kernel specific directory. The kernel specific build products such as zfs_config.h and Modules.symvers are left installed under /usr/src/zfs-/. This was done to be consistent with where dkms expects kernel module source to be packaged. It also allows for a common zfs-kmod-devel package which includes the headers, and per-kernel zfs-kmod-devel- packages. Signed-off-by: Brian Behlendorf --- Makefile.am | 16 ++++++---------- include/Makefile.am | 2 +- include/linux/Makefile.am | 2 +- include/sys/Makefile.am | 2 +- include/sys/fm/Makefile.am | 2 +- include/sys/fm/fs/Makefile.am | 2 +- include/sys/fs/Makefile.am | 2 +- 7 files changed, 12 insertions(+), 16 deletions(-) diff --git a/Makefile.am b/Makefile.am index ca8a41939b41..c0e82eb68804 100644 --- a/Makefile.am +++ b/Makefile.am @@ -8,6 +8,12 @@ SUBDIRS += dracut udev etc man scripts lib cmd endif if CONFIG_KERNEL SUBDIRS += module + +extradir = /usr/src/zfs-$(VERSION) +extra_HEADERS = zfs.release.in zfs_config.h.in + +kerneldir = /usr/src/zfs-$(VERSION)/$(LINUX_VERSION) +nodist_kernel_HEADERS = zfs.release zfs_config.h module/$(LINUX_SYMBOLS) endif AUTOMAKE_OPTIONS = foreign @@ -15,7 +21,6 @@ EXTRA_DIST = autogen.sh zfs.spec.in zfs-modules.spec.in EXTRA_DIST += config/config.awk config/rpm.am config/deb.am config/tgz.am EXTRA_DIST += META DISCLAIMER COPYRIGHT README.markdown OPENSOLARIS.LICENSE EXTRA_DIST += dkms.postinst copy-builtin -noinst_HEADERS = zfs_config.h zfs.release distclean-local:: -$(RM) -R autom4te*.cache @@ -29,15 +34,6 @@ distclean-local:: -o -name '*.order' -o -name '*.markers' \) \ -type f -print | xargs $(RM) -if CONFIG_KERNEL -install-data-local: - release=$(ZFS_META_VERSION)-$(ZFS_META_RELEASE); \ - instdest=$(DESTDIR)/usr/src/zfs-$$release/$(LINUX_VERSION); \ - for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \ - $(INSTALL) -m 644 -D $$instfile $$instdest/$$instfile; \ - done -endif - ctags: $(RM) $(top_srcdir)/tags find $(top_srcdir) -name .git -prune -o -name '*.[hc]' | xargs ctags diff --git a/include/Makefile.am b/include/Makefile.am index 8325a8ec0446..64141d9bce30 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -28,6 +28,6 @@ libzfs_HEADERS = $(COMMON_H) $(USER_H) endif if CONFIG_KERNEL -kerneldir = /usr/src/zfs-$(ZFS_META_VERSION)-$(ZFS_META_RELEASE)/$(LINUX_VERSION) +kerneldir = /usr/src/zfs-$(VERSION)/include kernel_HEADERS = $(COMMON_H) $(KERNEL_H) endif diff --git a/include/linux/Makefile.am b/include/linux/Makefile.am index 6e481a136aed..c2a74912180c 100644 --- a/include/linux/Makefile.am +++ b/include/linux/Makefile.am @@ -16,6 +16,6 @@ libzfs_HEADERS = $(COMMON_H) $(USER_H) endif if CONFIG_KERNEL -kerneldir = /usr/src/zfs-$(ZFS_META_VERSION)-$(ZFS_META_RELEASE)/$(LINUX_VERSION)/linux +kerneldir = /usr/src/zfs-$(VERSION)/include/linux kernel_HEADERS = $(COMMON_H) $(KERNEL_H) endif diff --git a/include/sys/Makefile.am b/include/sys/Makefile.am index a0cc9d1d6036..2245ff445564 100644 --- a/include/sys/Makefile.am +++ b/include/sys/Makefile.am @@ -91,6 +91,6 @@ libzfs_HEADERS = $(COMMON_H) $(USER_H) endif if CONFIG_KERNEL -kerneldir = /usr/src/zfs-$(ZFS_META_VERSION)-$(ZFS_META_RELEASE)/$(LINUX_VERSION)/sys +kerneldir = /usr/src/zfs-$(VERSION)/include/sys kernel_HEADERS = $(COMMON_H) $(KERNEL_H) endif diff --git a/include/sys/fm/Makefile.am b/include/sys/fm/Makefile.am index 900ed9310e08..4dc58945d0e6 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 = /usr/src/zfs-$(ZFS_META_VERSION)-$(ZFS_META_RELEASE)/$(LINUX_VERSION)/sys/fm +kerneldir = /usr/src/zfs-$(VERSION)/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 d82d076127c2..76b525fe68ef 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 = /usr/src/zfs-$(ZFS_META_VERSION)-$(ZFS_META_RELEASE)/$(LINUX_VERSION)/sys/fm/fs +kerneldir = /usr/src/zfs-$(VERSION)/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 b702679a87ab..c9fdf128d743 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 = /usr/src/zfs-$(ZFS_META_VERSION)-$(ZFS_META_RELEASE)/$(LINUX_VERSION)/sys/fs +kerneldir = /usr/src/zfs-$(VERSION)/include/sys/fs kernel_HEADERS = $(COMMON_H) $(KERNEL_H) endif