Support custom build directories and move includes
[zfs.git] / Makefile.am
index f573e1d..5a03f1e 100644 (file)
@@ -1,14 +1,14 @@
 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
 
 if CONFIG_USER
-USER_DIR = config etc man scripts lib cmd
+USER_DIR = etc man scripts lib cmd
 endif
 if CONFIG_KERNEL
 KERNEL_DIR = module
 endif
-SUBDIRS = $(USER_DIR) $(KERNEL_DIR)
+SUBDIRS = $(USER_DIR) $(KERNEL_DIR) include
 
 AUTOMAKE_OPTIONS = foreign
 EXTRA_DIST  = autogen.sh zfs.spec.in zfs-modules.spec.in
@@ -34,7 +34,7 @@ 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; \
+       echo "$(ZFS_META_VERSION)" >$$instdest/zfs.release; \
        for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \
                $(INSTALL) -D $$instfile $$instdest/$$instfile; \
        done