-modules: $(DEP) all-sources
- $(MAKE) $(ARCH_UM) CC="$(CC)" -C $(LINUX_OBJ) \
- -f $(PWD)/build/Makefile LUSTRE_LINUX_CONFIG=$(LINUX_CONFIG) \
- $(MODULE_TARGET)=$(PWD) -o tmp_include_depends -o scripts -o \
- include/config/MARKER $@
-
-endif # MODULES
-
-dist-hook:
- find $(distdir) -name .deps | xargs rm -rf
- find $(distdir) -name CVS | xargs rm -rf
-
-rpms: dist Makefile
- rpmbuild -ta $(distdir).tar.gz
+CSTK=/tmp/checkstack
+CSTKO=/tmp/checkstack.orig
+
+checkstack:
+ [ -f ${CSTK} -a ! -s ${CSTKO} ] && mv -f ${CSTK} ${CSTKO} || true
+ { for MOD in $$(find . -name "*.ko"); do \
+ objdump -d $$MOD | perl build/checkstack.pl; \
+ done } | grep -v " bug " | sort -nr | uniq > ${CSTK}
+ [ -f ${CSTKO} ] && ! diff -u ${CSTKO} ${CSTK} || head -30 ${CSTK}
+
+checkstack-update:
+ [ -f ${CSTK} ] && mv -f ${CSTK} ${CSTKO}
+
+checkstack-clean:
+ rm -f ${CSTK} ${CSTKO}
+
+module-dist-hook:
+ if [ -d CVS -o -d .git ]; then \
+ perl lustre/scripts/tree_status.pl > $(distdir)/tree_status; \
+ elif [ -f tree_status ]; then \
+ cp tree_status $(distdir)/tree_status; \
+ else \
+ echo -e "I have no idea how to create a tree_status file in $(distdir).\nPlease file a bug at http://bugzilla.lustre.org/"; \
+ fi