Whamcloud - gitweb
Branch b1_6
[fs/lustre-release.git] / autoMakefile.am
1 SUBDIRS := @LDISKFS_SUBDIR@ . @LIBSYSIO_SUBDIR@ @SNMP_SUBDIR@ lnet lustre
2 DIST_SUBDIRS := @SNMP_DIST_SUBDIR@ libsysio ldiskfs lnet lustre
3 SOURCES_SUBDIRS := @LDISKFS_SUBDIR@ lnet lustre
4 RPM_SUBDIRS := @LDISKFS_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         cp @LDISKFS_DIR@/@SYMVERFILE@ @SYMVERFILE@
16 endif
17
18 CSTK=/tmp/checkstack
19 CSTKO=/tmp/checkstack.orig
20
21 checkstack:
22         [ -f ${CSTK} -a ! -s ${CSTKO} ] && mv -f ${CSTK} ${CSTKO} || true
23         { for i in lustre/* lnet/* ; do                                      \
24                 MOD=$$i/`basename $$i`;                                      \
25                 if [ $$i = "lustre/llite" ]; then MOD=$$i/lustre; fi;        \
26                 [ -f $$MOD.ko ] && MOD=$$MOD.ko || MOD=$$MOD.o;              \
27                 [ -f $$MOD ] && objdump -d $$MOD | perl build/checkstack.pl; \
28           done;                                                              \
29           for i in lnet/klnds/*; do                                          \
30                 MOD=$$i/k`basename $$i`;                                     \
31                 [ -f $$MOD.ko ] && MOD=$$MOD.ko || MOD=$$MOD.o;              \
32                 [ -f $$MOD ] && objdump -d $$MOD | perl build/checkstack.pl; \
33           done } | sort -nr > ${CSTK}
34         [ -f ${CSTKO} ] && ! diff -u ${CSTKO} ${CSTK} || head -30 ${CSTK}
35
36 checkstack-update:
37         [ -f ${CSTK} ] && mv -f ${CSTK} ${CSTKO}
38
39 checkstack-clean:
40         rm -f ${CSTK} ${CSTKO}