Whamcloud - gitweb
* add a bit in ptlrpc_request to indicate ptlrpcs error, gss recovery
[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 ALWAYS_SUBDIRS := include lvfs obdclass lov ldlm sec ptlrpc           \
9         obdecho osc lmv cobd ptlbd cmobd doc utils tests conf scripts \
10         autoconf
11
12 SERVER_SUBDIRS := ldiskfs smfs snapfs obdfilter ost mds
13
14 CLIENT_SUBDIRS := mdc llite
15
16 LIBLUSTRE_SUBDIRS := liblustre
17
18 SUBDIRS := $(ALWAYS_SUBDIRS)
19
20 if SERVER
21 SUBDIRS += $(SERVER_SUBDIRS)
22 endif
23
24 if CLIENT
25 SUBDIRS += $(CLIENT_SUBDIRS)
26 endif
27
28 if LIBLUSTRE
29 if !CLIENT
30 SUBDIRS += $(CLIENT_SUBDIRS)
31 endif
32 SUBDIRS += $(LIBLUSTRE_SUBDIRS)
33 endif
34
35 DIST_SUBDIRS := $(ALWAYS_SUBDIRS) $(SERVER_SUBDIRS) $(CLIENT_SUBDIRS) \
36         $(LIBLUSTRE_SUBDIRS)
37
38 EXTRA_DIST = BUGS FDL Rules.in kernel_patches
39
40 if LDISKFS
41 LDISKFS = ldiskfs-sources
42 ldiskfs-sources:
43         $(MAKE) sources -C ldiskfs
44 endif
45
46 lvfs-sources:
47         $(MAKE) sources -C lvfs
48
49 sources: $(LDISKFS) lvfs-sources lustre_build_version
50
51 all-recursive: lustre_build_version
52
53 lustre_build_version:
54         perl $(top_builddir)/lustre/scripts/version_tag.pl $(top_srcdir) $(top_builddir) > tmpver
55         echo "#define LUSTRE_RELEASE @RELEASE@" >> tmpver
56         cmp -s $(top_builddir)/lustre/include/linux/lustre_build_version.h tmpver \
57                 2> /dev/null &&                                            \
58                 $(RM) tmpver ||                                            \
59                 mv tmpver $(top_builddir)/lustre/include/linux/lustre_build_version.h
60
61 CSTK=/tmp/checkstack
62 CSTKO=/tmp/checkstack.orig
63
64 checkstack:
65         [ -f ${CSTK} -a ! -s ${CSTKO} ] && mv ${CSTK} ${CSTKO} || true
66         for i in ${SUBDIRS} portals/knals/*; do                              \
67                 MOD=$$i/`basename $$i`.o;                                    \
68                 [ -f $$MOD ] && objdump -d $$MOD | perl tests/checkstack.pl; \
69         done | sort -nr > ${CSTK}
70         [ -f ${CSTKO} ] && ! diff -u ${CSTKO} ${CSTK} || head -30 ${CSTK}
71
72 checkstack-update:
73         [ -f ${CSTK} ] && mv ${CSTK} ${CSTKO}
74
75 checkstack-clean:
76         rm -f ${CSTK} ${CSTKO}