Whamcloud - gitweb
Branch b1_4_mountconf
[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 ldlm ptlrpc osc lov obdecho \
9         mgc doc utils tests conf scripts autoconf
10
11 SERVER_SUBDIRS := ldiskfs obdfilter ost mds
12 # mgs
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 # this needs to be after the client subdirs
29 if LIBLUSTRE
30 if !CLIENT
31 SUBDIRS += $(CLIENT_SUBDIRS)
32 endif
33 SUBDIRS += $(LIBLUSTRE_SUBDIRS)
34 endif
35
36 DIST_SUBDIRS := $(ALWAYS_SUBDIRS) $(SERVER_SUBDIRS) $(CLIENT_SUBDIRS)   \
37         $(LIBLUSTRE_SUBDIRS)
38
39 EXTRA_DIST = BUGS FDL kernel_patches
40
41 if LDISKFS
42 LDISKFS = ldiskfs-sources
43 ldiskfs-sources:
44         $(MAKE) sources -C ldiskfs
45 endif
46
47 lvfs-sources:
48         $(MAKE) sources -C lvfs
49
50 sources: $(LDISKFS) lvfs-sources lustre_build_version
51
52 all-recursive: lustre_build_version
53
54 lustre_build_version:
55         perl $(top_builddir)/lustre/scripts/version_tag.pl $(top_srcdir) $(top_builddir) > tmpver
56         echo "#define LUSTRE_RELEASE @RELEASE@" >> tmpver
57         cmp -s $(top_builddir)/lustre/include/linux/lustre_build_version.h tmpver \
58                 2> /dev/null &&                                            \
59                 $(RM) tmpver ||                                            \
60                 mv tmpver $(top_builddir)/lustre/include/linux/lustre_build_version.h
61
62 CSTK=/tmp/checkstack
63 CSTKO=/tmp/checkstack.orig
64
65 checkstack:
66         [ -f ${CSTK} -a ! -s ${CSTKO} ] && mv ${CSTK} ${CSTKO} || true
67         for i in ${SUBDIRS} lnet/klnds/*; do                                 \
68                 MOD=$$i/`basename $$i`.o;                                    \
69                 [ -f $$MOD ] && objdump -d $$MOD | perl tests/checkstack.pl; \
70         done | sort -nr > ${CSTK}
71         [ -f ${CSTKO} ] && ! diff -u ${CSTKO} ${CSTK} || head -30 ${CSTK}
72
73 checkstack-update:
74         [ -f ${CSTK} ] && mv ${CSTK} ${CSTKO}
75
76 checkstack-clean:
77         rm -f ${CSTK} ${CSTKO}