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