1 # Copyright (C) 2001 Cluster File Systems, Inc.
3 # This code is issued under the GNU General Public License.
4 # See the file COPYING in this distribution
6 AUTOMAKE_OPTIONS = foreign
8 SUBDIRS = . include portals ldiskfs lvfs obdclass lov ldlm ptlrpc \
9 obdecho osc mdc mds obdfilter ost llite cobd ptlbd snapfs smfs \
10 liblustre doc utils tests conf scripts
12 EXTRA_DIST = BUGS FDL Rules.in kernel_patches kernel-tests/Makefile \
15 # these empty rules are needed so that automake doesn't add its own
26 rm -f $(top_srcdir)/TAGS
27 ETAGSF=`etags --version | grep -iq exuberant && \
28 echo "-I __initdata,__exitdata,EXPORT_SYMBOL"`; \
29 find $(top_srcdir) -name '*.[hc]' | xargs etags $$ETAGSF -a
31 rm -f $(top_srcdir)/tags
32 CTAGSF=`ctags --version | grep -iq exuberant && \
33 echo "-I __initdata,__exitdata,EXPORT_SYMBOL"`; \
34 find $(top_srcdir) -name '*.[hc]' | xargs ctags $$CTAGSF -a
43 .depend: $(LDISKFS) lvfs-sources
44 $(MAKE) $(ARCH_UM) CC="$(CC)" -C $(LINUX_OBJ) -f $(PWD)/kernel-tests/Makefile LUSTRE_LINUX_CONFIG=$(LINUX_CONFIG) -o scripts -o include/config/MARKER _sfdep_$(PWD) _FASTDEP_ALL_SUB_DIRS="$(PWD)"
50 LDISKFS = ldiskfs-sources
52 $(MAKE) sources -C ldiskfs
56 $(MAKE) sources -C lvfs
58 modules: lustre_build_version $(DEP) $(LDISKFS) lvfs-sources
59 $(MAKE) $(ARCH_UM) CC="$(CC)" -C $(LINUX_OBJ) -f $(PWD)/kernel-tests/Makefile LUSTRE_LINUX_CONFIG=$(LINUX_CONFIG) $(MODULE_TARGET)=$(PWD) -o tmp_include_depends -o scripts -o include/config/MARKER $@
63 all-recursive: lustre_build_version
66 perl $(top_builddir)/scripts/version_tag.pl $(top_srcdir) $(top_builddir) > tmpver
67 echo "#define LUSTRE_RELEASE @RELEASE@" >> tmpver
68 cmp -s $(top_builddir)/include/linux/lustre_build_version.h tmpver \
71 mv tmpver $(top_builddir)/include/linux/lustre_build_version.h
74 find $(distdir) -name .deps | xargs rm -rf
75 find $(distdir) -name CVS | xargs rm -rf
78 rpmbuild -ta $(distdir).tar.gz
81 CSTKO=/tmp/checkstack.orig
84 [ -f ${CSTK} -a ! -s ${CSTKO} ] && mv ${CSTK} ${CSTKO} || true
85 for i in ${SUBDIRS} portals/knals/*; do \
86 MOD=$$i/`basename $$i`.o; \
87 [ -f $$MOD ] && objdump -d $$MOD | perl tests/checkstack.pl; \
88 done | sort -nr > ${CSTK}
89 [ -f ${CSTKO} ] && ! diff -u ${CSTKO} ${CSTK} || head -30 ${CSTK}
92 [ -f ${CSTK} ] && mv ${CSTK} ${CSTKO}
95 rm -f ${CSTK} ${CSTKO}