Whamcloud - gitweb
057c556bf355e884b3be7c36b3adfc64424a2f7a
[fs/lustre-release.git] / autoMakefile.am
1 SUBDIRS := @LDISKFS_SUBDIR@ @SPL_SUBDIR@ @ZFS_SUBDIR@ . @LIBSYSIO_SUBDIR@ @SNMP_SUBDIR@ @LUSTREIOKIT_SUBDIR@ @LIBCFS_SUBDIR@ lnet lustre
2 DIST_SUBDIRS := @SNMP_DIST_SUBDIR@ libsysio ldiskfs @LUSTREIOKIT_SUBDIR@ @LIBCFS_SUBDIR@ lnet lustre 
3 SOURCES_SUBDIRS := @LDISKFS_SUBDIR@ @LIBCFS_SUBDIR@ lnet lustre
4 RPM_SUBDIRS := @LDISKFS_SUBDIR@ @LUSTREIOKIT_SUBDIR@
5 if LDISKFS_ENABLED
6 if !LDISKFS_IN_KERNEL
7 EXTRA_SOURCES := @SYMVERFILE@
8 endif
9 endif
10
11 @TESTS_TRUE@BUILD_TESTS = true
12 @TESTS_FALSE@BUILD_TESTS = false
13
14 include build/autoMakefile.am.toplevel
15
16 EXTRA_DIST += config.h.in
17
18 if USES_DPKG
19 EXTRA_DIST += debian/*
20 endif
21
22 if LDISKFS_ENABLED
23 if !LDISKFS_IN_KERNEL
24 @SYMVERFILE@: @LDISKFS_DIR@/@SYMVERFILE@
25         touch @SYMVERFILE@
26         -grep -v ldiskfs @SYMVERFILE@ > @SYMVERFILE@.old
27         cat @SYMVERFILE@.old @LDISKFS_DIR@/@SYMVERFILE@ > @SYMVERFILE@
28 endif
29 endif
30
31 CSTK=/tmp/checkstack
32 CSTKO=/tmp/checkstack.orig
33
34 checkstack:
35         [ -f ${CSTK} -a ! -s ${CSTKO} ] && mv -f ${CSTK} ${CSTKO} || true
36         { for MOD in $$(find . -name "*.ko"); do                             \
37                 objdump -d $$MOD | perl build/checkstack.pl;                 \
38           done } | grep -v " bug " | sort -nr | uniq > ${CSTK}
39         [ -f ${CSTKO} ] && ! diff -u ${CSTKO} ${CSTK} || head -30 ${CSTK}
40
41 checkstack-update:
42         [ -f ${CSTK} ] && mv -f ${CSTK} ${CSTKO}
43
44 checkstack-clean:
45         rm -f ${CSTK} ${CSTKO}
46
47 module-dist-hook:
48         if [ -d CVS -o -d .git ]; then \
49             perl lustre/scripts/tree_status.pl > $(distdir)/tree_status; \
50         elif [ -f tree_status ]; then \
51             cp tree_status $(distdir)/tree_status; \
52         else \
53             echo -e "I have no idea how to create a tree_status file in $(distdir).\nPlease file a bug at http://bugzilla.lustre.org/"; \
54         fi
55         if [ -d .git ]; then \
56                 build/extract_patches $(distdir); \
57                 if grep -e "^--- .*\/autoconf" -e "^--- .*\/Makefile\.am" -e ".*\/configure\.ac" -e ".*\/configure\.in" $(distdir)/debian/patches/*; then \
58                         cp build/autogen.sh $(distdir)/build; \
59                         cp libsysio/autogen.sh $(distdir)/libsysio; \
60                         cp lustre-iokit/autogen.sh $(distdir)/lustre-iokit; \
61                 fi; \
62                 mkdir empty; \
63                 diff -urN empty $(distdir)/debian > debian.diff; \
64                 rm -rf $(distdir)/debian; \
65                 rmdir empty; \
66         fi