]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Remove custom install-data-local for headers
authorBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 13 Feb 2013 22:01:00 +0000 (14:01 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Sat, 2 Mar 2013 00:55:06 +0000 (16:55 -0800)
Rather than use a custom install target it is cleaner to define
a 'kerneldir' and set 'kernel_HEADERS' appropriately.  This
allows us to leverage the standing configure install support.

Additionally, I took this opertunity add the missing make files
to the include subdirectories.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
13 files changed:
Makefile.am
configure.ac
include/Makefile.am
include/fs/Makefile.am [new file with mode: 0644]
include/linux/Makefile.am [new file with mode: 0644]
include/rpc/Makefile.am [new file with mode: 0644]
include/sharefs/Makefile.am [new file with mode: 0644]
include/sys/Makefile.am [new file with mode: 0644]
include/sys/fm/Makefile.am [new file with mode: 0644]
include/sys/fs/Makefile.am [new file with mode: 0644]
include/sys/sysevent/Makefile.am [new file with mode: 0644]
include/util/Makefile.am [new file with mode: 0644]
include/vm/Makefile.am [new file with mode: 0644]

index 1210c6d6b9f4b2af1b6065b237c0784ab5e63561..3a6b61438ac3a426466eae0a0abf19b502117bc4 100644 (file)
@@ -3,12 +3,12 @@ include $(top_srcdir)/config/deb.am
 include $(top_srcdir)/config/tgz.am
 include $(top_srcdir)/config/arch.am
 
-SUBDIRS =
+SUBDIRS = include
 if CONFIG_USER
 SUBDIRS += lib cmd scripts
 endif
 if CONFIG_KERNEL
-SUBDIRS += module include
+SUBDIRS += module
 endif
 
 AUTOMAKE_OPTIONS = foreign
index 27d3356ecbe0260c71c13fe7f68c0420bdb55447..f739a58bc598d21beb1154be774261400c08cdf4 100644 (file)
@@ -53,6 +53,16 @@ AC_CONFIG_FILES([
        module/spl/Makefile
        module/splat/Makefile
        include/Makefile
+       include/fs/Makefile
+       include/linux/Makefile
+       include/rpc/Makefile
+       include/sharefs/Makefile
+       include/sys/Makefile
+       include/sys/fm/Makefile
+       include/sys/fs/Makefile
+       include/sys/sysevent/Makefile
+       include/util/Makefile
+       include/vm/Makefile
        scripts/Makefile
        spl.spec
        spl-modules.spec
index 9cca2840cb156231c45faf86d5ab93399c9174c8..952c4a267232e56dd6c326881c847f9ea10e50dc 100644 (file)
@@ -1,28 +1,21 @@
-# All headers are referenced by this top level Makefile.am are
-# noinst_HEADERS because they are not installed in the usual include
-# location.  We do not want to be using $includedir for this.
-# Installation is handled by the custom install-data-local rule.
-noinst_HEADERS  = $(top_srcdir)/include/*.h
-noinst_HEADERS += $(top_srcdir)/include/fs/*.h
-noinst_HEADERS += $(top_srcdir)/include/linux/*.h
-noinst_HEADERS += $(top_srcdir)/include/rpc/*.h
-noinst_HEADERS += $(top_srcdir)/include/sharefs/*.h
-noinst_HEADERS += $(top_srcdir)/include/sys/fm/*.h
-noinst_HEADERS += $(top_srcdir)/include/sys/fs/*.h
-noinst_HEADERS += $(top_srcdir)/include/sys/sysevent/*.h
-noinst_HEADERS += $(top_srcdir)/include/sys/*.h
-noinst_HEADERS += $(top_srcdir)/include/util/*.h
-noinst_HEADERS += $(top_srcdir)/include/vm/*.h
+SUBDIRS = fs linux rpc sharefs sys util vm
 
-install-data-local:
-       release=$(SPL_META_VERSION)-$(SPL_META_RELEASE); \
-       instdest=$(DESTDIR)/usr/src/spl-$$release/$(LINUX_VERSION); \
-       instfiles=`find . -name '*.h'`; \
-        for instfile in $$instfiles; do \
-               $(INSTALL) -m 644 -D $$instfile $$instdest/$$instfile; \
-        done
+COMMON_H =
 
-uninstall-local:
-       release=$(SPL_META_VERSION)-$(SPL_META_RELEASE); \
-       instdest=$(DESTDIR)/usr/src/spl-$$release/$(LINUX_VERSION); \
-       $(RM) -R $$instdest
+KERNEL_H = \
+       $(top_srcdir)/include/splat-ctl.h \
+       $(top_srcdir)/include/spl-ctl.h \
+       $(top_srcdir)/include/spl-debug.h \
+       $(top_srcdir)/include/spl-device.h \
+       $(top_srcdir)/include/spl-trace.h \
+       $(top_srcdir)/include/strings.h \
+       $(top_srcdir)/include/unistd.h
+
+USER_H =
+
+EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
+
+if CONFIG_KERNEL
+kerneldir = /usr/src/spl-$(SPL_META_VERSION)-$(SPL_META_RELEASE)/$(LINUX_VERSION)
+kernel_HEADERS = $(KERNEL_H)
+endif
diff --git a/include/fs/Makefile.am b/include/fs/Makefile.am
new file mode 100644 (file)
index 0000000..2a36737
--- /dev/null
@@ -0,0 +1,13 @@
+COMMON_H =
+
+KERNEL_H = \
+       $(top_srcdir)/include/fs/fs_subr.h
+
+USER_H =
+
+EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
+
+if CONFIG_KERNEL
+kerneldir = /usr/src/spl-$(SPL_META_VERSION)-$(SPL_META_RELEASE)/$(LINUX_VERSION)/fs
+kernel_HEADERS = $(KERNEL_H)
+endif
diff --git a/include/linux/Makefile.am b/include/linux/Makefile.am
new file mode 100644 (file)
index 0000000..cf1f62a
--- /dev/null
@@ -0,0 +1,28 @@
+COMMON_H =
+
+KERNEL_H = \
+       $(top_srcdir)/include/linux/bitops_compat.h \
+       $(top_srcdir)/include/linux/compiler_compat.h \
+       $(top_srcdir)/include/linux/file_compat.h \
+       $(top_srcdir)/include/linux/kallsyms_compat.h \
+       $(top_srcdir)/include/linux/list_compat.h \
+       $(top_srcdir)/include/linux/math64_compat.h \
+       $(top_srcdir)/include/linux/mm_compat.h \
+       $(top_srcdir)/include/linux/module_compat.h \
+       $(top_srcdir)/include/linux/mutex_compat.h \
+       $(top_srcdir)/include/linux/proc_compat.h \
+       $(top_srcdir)/include/linux/rwsem_compat.h \
+       $(top_srcdir)/include/linux/smp_compat.h \
+       $(top_srcdir)/include/linux/sysctl_compat.h \
+       $(top_srcdir)/include/linux/time_compat.h \
+       $(top_srcdir)/include/linux/uaccess_compat.h \
+       $(top_srcdir)/include/linux/zlib_compat.h
+
+USER_H =
+
+EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
+
+if CONFIG_KERNEL
+kerneldir = /usr/src/spl-$(SPL_META_VERSION)-$(SPL_META_RELEASE)/$(LINUX_VERSION)/linux
+kernel_HEADERS = $(KERNEL_H)
+endif
diff --git a/include/rpc/Makefile.am b/include/rpc/Makefile.am
new file mode 100644 (file)
index 0000000..cb68f45
--- /dev/null
@@ -0,0 +1,14 @@
+COMMON_H =
+
+KERNEL_H = \
+       $(top_srcdir)/include/rpc/types.h \
+       $(top_srcdir)/include/rpc/xdr.h
+
+USER_H =
+
+EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
+
+if CONFIG_KERNEL
+kerneldir = /usr/src/spl-$(SPL_META_VERSION)-$(SPL_META_RELEASE)/$(LINUX_VERSION)/rpc
+kernel_HEADERS = $(KERNEL_H)
+endif
diff --git a/include/sharefs/Makefile.am b/include/sharefs/Makefile.am
new file mode 100644 (file)
index 0000000..b343c75
--- /dev/null
@@ -0,0 +1,13 @@
+COMMON_H =
+
+KERNEL_H = \
+       $(top_srcdir)/include/sharefs/share.h
+
+USER_H =
+
+EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
+
+if CONFIG_KERNEL
+kerneldir = /usr/src/spl-$(SPL_META_VERSION)-$(SPL_META_RELEASE)/$(LINUX_VERSION)/sharefs
+kernel_HEADERS = $(KERNEL_H)
+endif
diff --git a/include/sys/Makefile.am b/include/sys/Makefile.am
new file mode 100644 (file)
index 0000000..37e9582
--- /dev/null
@@ -0,0 +1,110 @@
+SUBDIRS = fm fs sysevent
+
+COMMON_H =
+
+KERNEL_H = \
+       $(top_srcdir)/include/sys/acl.h \
+       $(top_srcdir)/include/sys/acl_impl.h \
+       $(top_srcdir)/include/sys/atomic.h \
+       $(top_srcdir)/include/sys/attr.h \
+       $(top_srcdir)/include/sys/bitmap.h \
+       $(top_srcdir)/include/sys/bootconf.h \
+       $(top_srcdir)/include/sys/bootprops.h \
+       $(top_srcdir)/include/sys/buf.h \
+       $(top_srcdir)/include/sys/byteorder.h \
+       $(top_srcdir)/include/sys/callb.h \
+       $(top_srcdir)/include/sys/cmn_err.h \
+       $(top_srcdir)/include/sys/compress.h \
+       $(top_srcdir)/include/sys/condvar.h \
+       $(top_srcdir)/include/sys/conf.h \
+       $(top_srcdir)/include/sys/console.h \
+       $(top_srcdir)/include/sys/cpupart.h \
+       $(top_srcdir)/include/sys/cpuvar.h \
+       $(top_srcdir)/include/sys/crc32.h \
+       $(top_srcdir)/include/sys/cred.h \
+       $(top_srcdir)/include/sys/ctype.h \
+       $(top_srcdir)/include/sys/ddi.h \
+       $(top_srcdir)/include/sys/debug.h \
+       $(top_srcdir)/include/sys/dirent.h \
+       $(top_srcdir)/include/sys/disp.h \
+       $(top_srcdir)/include/sys/dkio.h \
+       $(top_srcdir)/include/sys/dklabel.h \
+       $(top_srcdir)/include/sys/dnlc.h \
+       $(top_srcdir)/include/sys/dumphdr.h \
+       $(top_srcdir)/include/sys/efi_partition.h \
+       $(top_srcdir)/include/sys/errno.h \
+       $(top_srcdir)/include/sys/extdirent.h \
+       $(top_srcdir)/include/sys/fcntl.h \
+       $(top_srcdir)/include/sys/file.h \
+       $(top_srcdir)/include/sys/idmap.h \
+       $(top_srcdir)/include/sys/int_limits.h \
+       $(top_srcdir)/include/sys/int_types.h \
+       $(top_srcdir)/include/sys/inttypes.h \
+       $(top_srcdir)/include/sys/isa_defs.h \
+       $(top_srcdir)/include/sys/kidmap.h \
+       $(top_srcdir)/include/sys/kmem.h \
+       $(top_srcdir)/include/sys/kobj.h \
+       $(top_srcdir)/include/sys/kstat.h \
+       $(top_srcdir)/include/sys/list.h \
+       $(top_srcdir)/include/sys/mkdev.h \
+       $(top_srcdir)/include/sys/mntent.h \
+       $(top_srcdir)/include/sys/modctl.h \
+       $(top_srcdir)/include/sys/mode.h \
+       $(top_srcdir)/include/sys/mount.h \
+       $(top_srcdir)/include/sys/mutex.h \
+       $(top_srcdir)/include/sys/note.h \
+       $(top_srcdir)/include/sys/open.h \
+       $(top_srcdir)/include/sys/param.h \
+       $(top_srcdir)/include/sys/pathname.h \
+       $(top_srcdir)/include/sys/policy.h \
+       $(top_srcdir)/include/sys/pool.h \
+       $(top_srcdir)/include/sys/priv_impl.h \
+       $(top_srcdir)/include/sys/processor.h \
+       $(top_srcdir)/include/sys/proc.h \
+       $(top_srcdir)/include/sys/pset.h \
+       $(top_srcdir)/include/sys/random.h \
+       $(top_srcdir)/include/sys/refstr.h \
+       $(top_srcdir)/include/sys/resource.h \
+       $(top_srcdir)/include/sys/rwlock.h \
+       $(top_srcdir)/include/sys/sdt.h \
+       $(top_srcdir)/include/sys/sid.h \
+       $(top_srcdir)/include/sys/signal.h \
+       $(top_srcdir)/include/sys/stat.h \
+       $(top_srcdir)/include/sys/stropts.h \
+       $(top_srcdir)/include/sys/sunddi.h \
+       $(top_srcdir)/include/sys/sunldi.h \
+       $(top_srcdir)/include/sys/sysdc.h \
+       $(top_srcdir)/include/sys/sysevent.h \
+       $(top_srcdir)/include/sys/sysmacros.h \
+       $(top_srcdir)/include/sys/systeminfo.h \
+       $(top_srcdir)/include/sys/systm.h \
+       $(top_srcdir)/include/sys/taskq.h \
+       $(top_srcdir)/include/sys/thread.h \
+       $(top_srcdir)/include/sys/time.h \
+       $(top_srcdir)/include/sys/timer.h \
+       $(top_srcdir)/include/sys/t_lock.h \
+       $(top_srcdir)/include/sys/tsd.h \
+       $(top_srcdir)/include/sys/types32.h \
+       $(top_srcdir)/include/sys/types.h \
+       $(top_srcdir)/include/sys/u8_textprep.h \
+       $(top_srcdir)/include/sys/uio.h \
+       $(top_srcdir)/include/sys/unistd.h \
+       $(top_srcdir)/include/sys/utsname.h \
+       $(top_srcdir)/include/sys/va_list.h \
+       $(top_srcdir)/include/sys/varargs.h \
+       $(top_srcdir)/include/sys/vfs.h \
+       $(top_srcdir)/include/sys/vfs_opreg.h \
+       $(top_srcdir)/include/sys/vmsystm.h \
+       $(top_srcdir)/include/sys/vnode.h \
+       $(top_srcdir)/include/sys/zmod.h \
+       $(top_srcdir)/include/sys/zone.h
+
+USER_H =
+
+EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
+
+if CONFIG_KERNEL
+kerneldir = /usr/src/spl-$(SPL_META_VERSION)-$(SPL_META_RELEASE)/$(LINUX_VERSION)/sys
+kernel_HEADERS = $(KERNEL_H)
+endif
+
diff --git a/include/sys/fm/Makefile.am b/include/sys/fm/Makefile.am
new file mode 100644 (file)
index 0000000..a073d2a
--- /dev/null
@@ -0,0 +1,14 @@
+COMMON_H =
+
+KERNEL_H = \
+       $(top_srcdir)/include/sys/fm/protocol.h \
+       $(top_srcdir)/include/sys/fm/util.h
+
+USER_H =
+
+EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
+
+if CONFIG_KERNEL
+kerneldir = /usr/src/spl-$(SPL_META_VERSION)-$(SPL_META_RELEASE)/$(LINUX_VERSION)/sys/fm
+kernel_HEADERS = $(KERNEL_H)
+endif
diff --git a/include/sys/fs/Makefile.am b/include/sys/fs/Makefile.am
new file mode 100644 (file)
index 0000000..3805a5e
--- /dev/null
@@ -0,0 +1,13 @@
+COMMON_H =
+
+KERNEL_H = \
+       $(top_srcdir)/include/sys/fs/swapnode.h
+
+USER_H =
+
+EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
+
+if CONFIG_KERNEL
+kerneldir = /usr/src/spl-$(SPL_META_VERSION)-$(SPL_META_RELEASE)/$(LINUX_VERSION)/sys/fs
+kernel_HEADERS = $(KERNEL_H)
+endif
diff --git a/include/sys/sysevent/Makefile.am b/include/sys/sysevent/Makefile.am
new file mode 100644 (file)
index 0000000..d2247d7
--- /dev/null
@@ -0,0 +1,13 @@
+COMMON_H =
+
+KERNEL_H = \
+       $(top_srcdir)/include/sys/sysevent/eventdefs.h
+
+USER_H =
+
+EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
+
+if CONFIG_KERNEL
+kerneldir = /usr/src/spl-$(SPL_META_VERSION)-$(SPL_META_RELEASE)/$(LINUX_VERSION)/sys/sysevent
+kernel_HEADERS = $(KERNEL_H)
+endif
diff --git a/include/util/Makefile.am b/include/util/Makefile.am
new file mode 100644 (file)
index 0000000..61fdff0
--- /dev/null
@@ -0,0 +1,14 @@
+COMMON_H =
+
+KERNEL_H = \
+       $(top_srcdir)/include/util/qsort.h \
+        $(top_srcdir)/include/util/sscanf.h
+
+USER_H =
+
+EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
+
+if CONFIG_KERNEL
+kerneldir = /usr/src/spl-$(SPL_META_VERSION)-$(SPL_META_RELEASE)/$(LINUX_VERSION)/util
+kernel_HEADERS = $(KERNEL_H)
+endif
diff --git a/include/vm/Makefile.am b/include/vm/Makefile.am
new file mode 100644 (file)
index 0000000..9b09929
--- /dev/null
@@ -0,0 +1,15 @@
+COMMON_H =
+
+KERNEL_H = \
+       $(top_srcdir)/include/vm/anon.h \
+       $(top_srcdir)/include/vm/pvn.h \
+       $(top_srcdir)/include/vm/seg_kmem.h
+
+USER_H =
+
+EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
+
+if CONFIG_KERNEL
+kerneldir = /usr/src/spl-$(SPL_META_VERSION)-$(SPL_META_RELEASE)/$(LINUX_VERSION)/vm
+kernel_HEADERS = $(KERNEL_H)
+endif