Whamcloud - gitweb
Branch b1_4
[fs/lustre-release.git] / autoMakefile.am
index d9e18a8..f31200a 100644 (file)
@@ -1 +1,25 @@
 include build/autoMakefile.am.toplevel
 include build/autoMakefile.am.toplevel
+
+CSTK=/tmp/checkstack
+CSTKO=/tmp/checkstack.orig
+
+checkstack:
+       [ -f ${CSTK} -a ! -s ${CSTKO} ] && mv -f ${CSTK} ${CSTKO} || true
+       { for i in lustre/* lnet/* ; do                                      \
+               MOD=$$i/`basename $$i`;                                      \
+               if [ $$i = "lustre/llite" ]; then MOD=$$i/lustre; fi;        \
+               [ -f $$MOD.ko ] && MOD=$$MOD.ko || MOD=$$MOD.o;              \
+               [ -f $$MOD ] && objdump -d $$MOD | perl build/checkstack.pl; \
+         done;                                                              \
+         for i in lnet/klnds/*; do                                          \
+               MOD=$$i/k`basename $$i`;                                     \
+               [ -f $$MOD.ko ] && MOD=$$MOD.ko || MOD=$$MOD.o;              \
+               [ -f $$MOD ] && objdump -d $$MOD | perl build/checkstack.pl; \
+         done } | sort -nr > ${CSTK}
+       [ -f ${CSTKO} ] && ! diff -u ${CSTKO} ${CSTK} || head -30 ${CSTK}
+
+checkstack-update:
+       [ -f ${CSTK} ] && mv -f ${CSTK} ${CSTKO}
+
+checkstack-clean:
+       rm -f ${CSTK} ${CSTKO}