Whamcloud - gitweb
8211b00e9a7812b6bc2821ff5c6e0ac72207fe6b
[fs/lustre-release.git] / lustre / autoMakefile.am
1 # Copyright (C) 2001  Cluster File Systems, Inc.
2 #
3 # This code is issued under the GNU General Public License.
4 # See the file COPYING in this distribution
5
6 AUTOMAKE_OPTIONS = foreign
7
8 SUBDIRS = include ldiskfs lvfs obdclass lov ldlm ptlrpc      \
9         obdecho osc mdc lmv  mds obdfilter ost llite cobd ptlbd smfs snapfs \
10         cmobd liblustre doc utils tests conf scripts autoconf
11
12 EXTRA_DIST = BUGS FDL Rules.in kernel_patches \
13         README.kernel-source
14
15 if LDISKFS
16 LDISKFS = ldiskfs-sources
17 ldiskfs-sources:
18         $(MAKE) sources -C ldiskfs
19 endif
20
21 lvfs-sources:
22         $(MAKE) sources -C lvfs
23
24 sources: $(LDISKFS) lvfs-sources lustre_build_version
25
26 all-recursive: lustre_build_version
27
28 lustre_build_version:
29         perl $(top_builddir)/lustre/scripts/version_tag.pl $(top_srcdir) $(top_builddir) > tmpver
30         echo "#define LUSTRE_RELEASE @RELEASE@" >> tmpver
31         cmp -s $(top_builddir)/lustre/include/linux/lustre_build_version.h tmpver \
32                 2> /dev/null &&                                            \
33                 $(RM) tmpver ||                                            \
34                 mv tmpver $(top_builddir)/lustre/include/linux/lustre_build_version.h
35
36 CSTK=/tmp/checkstack
37 CSTKO=/tmp/checkstack.orig
38
39 checkstack:
40         [ -f ${CSTK} -a ! -s ${CSTKO} ] && mv ${CSTK} ${CSTKO} || true
41         for i in ${SUBDIRS} portals/knals/*; do                              \
42                 MOD=$$i/`basename $$i`.o;                                    \
43                 [ -f $$MOD ] && objdump -d $$MOD | perl tests/checkstack.pl; \
44         done | sort -nr > ${CSTK}
45         [ -f ${CSTKO} ] && ! diff -u ${CSTKO} ${CSTK} || head -30 ${CSTK}
46
47 checkstack-update:
48         [ -f ${CSTK} ] && mv ${CSTK} ${CSTKO}
49
50 checkstack-clean:
51         rm -f ${CSTK} ${CSTKO}