summaryrefslogtreecommitdiffstats
path: root/include/Makefile.am
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2013-02-13 14:01:00 -0800
committerBrian Behlendorf <[email protected]>2013-03-01 16:55:06 -0800
commitd1142fbffe720cd5f82691d7a00816ce72f4e2b2 (patch)
treefc19d2bf74f9c11029e3b4222f333426913cccb3 /include/Makefile.am
parent0298f3d67ff4971513ff848d640ca431a983de43 (diff)
Remove custom install-data-local for headers
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 <[email protected]>
Diffstat (limited to 'include/Makefile.am')
-rw-r--r--include/Makefile.am45
1 files changed, 19 insertions, 26 deletions
diff --git a/include/Makefile.am b/include/Makefile.am
index 9cca2840c..952c4a267 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -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