Whamcloud - gitweb
24f80d0e294de02ff813bed4a5a72cc4bc5b4533
[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 sec 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
14 if LDISKFS
15 LDISKFS = ldiskfs-sources
16 ldiskfs-sources:
17         $(MAKE) sources -C ldiskfs
18 endif
19
20 lvfs-sources:
21         $(MAKE) sources -C lvfs
22
23 sources: $(LDISKFS) lvfs-sources lustre_build_version
24
25 all-recursive: lustre_build_version
26
27 lustre_build_version:
28         perl $(top_builddir)/lustre/scripts/version_tag.pl $(top_srcdir) $(top_builddir) > tmpver
29         echo "#define LUSTRE_RELEASE @RELEASE@" >> tmpver
30         cmp -s $(top_builddir)/lustre/include/linux/lustre_build_version.h tmpver \
31                 2> /dev/null &&                                            \
32                 $(RM) tmpver ||                                            \
33                 mv tmpver $(top_builddir)/lustre/include/linux/lustre_build_version.h
34
35 CSTK=/tmp/checkstack
36 CSTKO=/tmp/checkstack.orig
37
38 checkstack:
39         [ -f ${CSTK} -a ! -s ${CSTKO} ] && mv ${CSTK} ${CSTKO} || true
40         for i in ${SUBDIRS} portals/knals/*; do                              \
41                 MOD=$$i/`basename $$i`.o;                                    \
42                 [ -f $$MOD ] && objdump -d $$MOD | perl tests/checkstack.pl; \
43         done | sort -nr > ${CSTK}
44         [ -f ${CSTKO} ] && ! diff -u ${CSTKO} ${CSTK} || head -30 ${CSTK}
45
46 checkstack-update:
47         [ -f ${CSTK} ] && mv ${CSTK} ${CSTKO}
48
49 checkstack-clean:
50         rm -f ${CSTK} ${CSTKO}