Whamcloud - gitweb
b=17604
[fs/lustre-release.git] / autoMakefile.am
1 SUBDIRS := @LDISKFS_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 EXTRA_SOURCES := @SYMVERFILE@
7 endif
8
9 include build/autoMakefile.am.toplevel
10
11 EXTRA_DIST += config.h.in
12
13 if LDISKFS_ENABLED
14 @SYMVERFILE@: @LDISKFS_DIR@/@SYMVERFILE@
15         touch @SYMVERFILE@
16         -grep -v ldiskfs @SYMVERFILE@ > @SYMVERFILE@.old
17         cat @SYMVERFILE@.old @LDISKFS_DIR@/@SYMVERFILE@ > @SYMVERFILE@
18 endif
19
20 CSTK=/tmp/checkstack
21 CSTKO=/tmp/checkstack.orig
22
23 checkstack:
24         [ -f ${CSTK} -a ! -s ${CSTKO} ] && mv -f ${CSTK} ${CSTKO} || true
25         { for i in lustre/* lnet/* libcfs/*; do                                      \
26                 MOD=$$i/`basename $$i`;                                      \
27                 if [ $$i = "lustre/llite" ]; then MOD=$$i/lustre; fi;        \
28                 [ -f $$MOD.ko ] && MOD=$$MOD.ko || MOD=$$MOD.o;              \
29                 [ -f $$MOD ] && objdump -d $$MOD | perl build/checkstack.pl; \
30           done;                                                              \
31           for i in lnet/klnds/*; do                                          \
32                 MOD=$$i/k`basename $$i`;                                     \
33                 [ -f $$MOD.ko ] && MOD=$$MOD.ko || MOD=$$MOD.o;              \
34                 [ -f $$MOD ] && objdump -d $$MOD | perl build/checkstack.pl; \
35           done } | sort -nr > ${CSTK}
36         [ -f ${CSTKO} ] && ! diff -u ${CSTKO} ${CSTK} || head -30 ${CSTK}
37
38 checkstack-update:
39         [ -f ${CSTK} ] && mv -f ${CSTK} ${CSTKO}
40
41 checkstack-clean:
42         rm -f ${CSTK} ${CSTKO}