Whamcloud - gitweb
Branch HEAD
[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 # also update lustre/autoconf/lustre-core.m4 AC_CONFIG_FILES
9 ALWAYS_SUBDIRS := include lvfs obdclass ldlm ptlrpc osc lov obdecho \
10         mgc fid fld doc utils tests scripts autoconf contrib
11
12 SERVER_SUBDIRS := obdfilter ost mds mgs mdt cmm mdd osd
13
14 CLIENT_SUBDIRS := mdc lmv llite
15
16 QUOTA_SUBDIRS := quota
17
18 LIBLUSTRE_SUBDIRS := liblustre
19
20 SUBDIRS := $(ALWAYS_SUBDIRS)
21
22 if SERVER
23 SUBDIRS += $(SERVER_SUBDIRS)
24 endif
25
26 if CLIENT
27 SUBDIRS += $(CLIENT_SUBDIRS)
28 endif
29
30 if QUOTA
31 SUBDIRS += $(QUOTA_SUBDIRS)
32 endif
33
34 # this needs to be after the client subdirs
35 if LIBLUSTRE
36 if !CLIENT
37 SUBDIRS += $(CLIENT_SUBDIRS)
38 endif
39 SUBDIRS += $(LIBLUSTRE_SUBDIRS)
40 endif
41
42 DIST_SUBDIRS := $(ALWAYS_SUBDIRS) $(SERVER_SUBDIRS) $(CLIENT_SUBDIRS)   \
43         $(LIBLUSTRE_SUBDIRS) $(QUOTA_SUBDIRS)
44
45 EXTRA_DIST = BUGS FDL kernel_patches
46
47 lvfs-sources:
48         $(MAKE) sources -C lvfs
49 obdclass-sources:
50         $(MAKE) sources -C obdclass
51
52 sources: $(LDISKFS) lvfs-sources obdclass-sources lustre_build_version
53
54 all-recursive: lustre_build_version
55
56 BUILD_VER_H=$(top_builddir)/lustre/include/lustre/lustre_build_version.h
57
58 lustre_build_version:
59         perl $(top_builddir)/lustre/scripts/version_tag.pl $(top_srcdir) $(top_builddir) > tmpver
60         echo "#define LUSTRE_RELEASE @RELEASE@" >> tmpver
61         cmp -s $(BUILD_VER_H) tmpver > tmpdiff 2> /dev/null &&          \
62                 $(RM) tmpver tmpdiff ||                                 \
63                 mv -f tmpver $(BUILD_VER_H)