Configure --with-spl{-obj} auto-detect cleanup
[zfs.git] / Makefile.am
index f573e1d..c0e82eb 100644 (file)
@@ -1,22 +1,26 @@
 include $(top_srcdir)/config/rpm.am
-include ${top_srcdir}/config/deb.am
-include ${top_srcdir}/config/tgz.am
+include $(top_srcdir)/config/deb.am
+include $(top_srcdir)/config/tgz.am
 
+SUBDIRS = include
 if CONFIG_USER
-USER_DIR = config etc man scripts lib cmd
+SUBDIRS += dracut udev etc man scripts lib cmd
 endif
 if CONFIG_KERNEL
-KERNEL_DIR = module
+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
-SUBDIRS = $(USER_DIR) $(KERNEL_DIR)
 
 AUTOMAKE_OPTIONS = foreign
 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
-EXTRA_DIST += OPENSOLARIS.LICENSE ZFS.RELEASE
-
-noinst_HEADERS = zfs_config.h
+EXTRA_DIST += META DISCLAIMER COPYRIGHT README.markdown OPENSOLARIS.LICENSE
+EXTRA_DIST += dkms.postinst copy-builtin
 
 distclean-local::
        -$(RM) -R autom4te*.cache
@@ -30,16 +34,6 @@ distclean-local::
                -o -name '*.order' -o -name '*.markers' \) \
                -type f -print | xargs $(RM)
 
-if CONFIG_KERNEL
-install-data-local:
-       destname=zfs-$(ZFS_META_VERSION)/$(LINUX_VERSION); \
-       instdest=$(DESTDIR)/usr/src/$$destname; \
-       echo "${ZFS_META_VERSION}" >$$instdest/zfs.release; \
-       for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \
-               $(INSTALL) -D $$instfile $$instdest/$$instfile; \
-       done
-endif
-
 ctags:
        $(RM) $(top_srcdir)/tags
        find $(top_srcdir) -name .git -prune -o -name '*.[hc]' | xargs ctags