Whamcloud - gitweb
LU-184 Keep orphan on failover umount
[fs/lustre-release.git] / autoMakefile.am
index 251ab1e..5d1d839 100644 (file)
@@ -1,5 +1,5 @@
 SUBDIRS := @LDISKFS_SUBDIR@ @SPL_SUBDIR@ @ZFS_SUBDIR@ . @LIBSYSIO_SUBDIR@ @SNMP_SUBDIR@ @LUSTREIOKIT_SUBDIR@ @LIBCFS_SUBDIR@ lnet lustre
-DIST_SUBDIRS := @SNMP_DIST_SUBDIR@ libsysio ldiskfs @LUSTREIOKIT_SUBDIR@ @LIBCFS_SUBDIR@ lnet lustre 
+DIST_SUBDIRS := @SNMP_DIST_SUBDIR@ libsysio ldiskfs lustre-iokit @LIBCFS_SUBDIR@ lnet lustre 
 SOURCES_SUBDIRS := @LDISKFS_SUBDIR@ @LIBCFS_SUBDIR@ lnet lustre
 RPM_SUBDIRS := @LDISKFS_SUBDIR@ @LUSTREIOKIT_SUBDIR@
 if LDISKFS_ENABLED
@@ -13,7 +13,11 @@ endif
 
 include build/autoMakefile.am.toplevel
 
-EXTRA_DIST += config.h.in debian/*
+EXTRA_DIST += config.h.in
+
+if USES_DPKG
+EXTRA_DIST += debian/*
+endif
 
 if LDISKFS_ENABLED
 if !LDISKFS_IN_KERNEL
@@ -51,3 +55,15 @@ module-dist-hook:
            echo -e "I have no idea how to create a META file in $(distdir).\nPlease file a bug at http://bugzilla.lustre.org/"; \
            exit 1; \
        fi
+       if [ -d .git ]; then \
+               build/extract_patches $(distdir); \
+               if grep -e "^--- .*\/autoconf" -e "^--- .*\/Makefile\.am" -e ".*\/configure\.ac" -e ".*\/configure\.in" $(distdir)/debian/patches/*; then \
+                       cp build/autogen.sh $(distdir)/build; \
+                       cp libsysio/autogen.sh $(distdir)/libsysio; \
+                       cp lustre-iokit/autogen.sh $(distdir)/lustre-iokit; \
+               fi; \
+               mkdir empty; \
+               diff -urN empty $(distdir)/debian > debian.diff; \
+               rm -rf $(distdir)/debian; \
+               rmdir empty; \
+       fi