Whamcloud - gitweb
b=24037 Changes of 2.6.32 kernel.
[fs/lustre-release.git] / lustre / autoMakefile.am
1 #
2 # GPL HEADER START
3 #
4 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 #
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License version 2 only,
8 # as published by the Free Software Foundation.
9 #
10 # This program is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 # General Public License version 2 for more details (a copy is included
14 # in the LICENSE file that accompanied this code).
15 #
16 # You should have received a copy of the GNU General Public License
17 # version 2 along with this program; If not, see
18 # http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
19 #
20 # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
21 # CA 95054 USA or visit www.sun.com if you need additional information or
22 # have any questions.
23 #
24 # GPL HEADER END
25 #
26
27 #
28 # Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
29 # Use is subject to license terms.
30 #
31
32 #
33 # This file is part of Lustre, http://www.lustre.org/
34 # Lustre is a trademark of Sun Microsystems, Inc.
35 #
36
37 AUTOMAKE_OPTIONS = foreign
38
39 # also update lustre/autoconf/lustre-core.m4 AC_CONFIG_FILES
40 ALWAYS_SUBDIRS := include lvfs obdclass ldlm ptlrpc osc lov obdecho \
41         mgc fid fld doc utils tests scripts autoconf contrib conf
42
43 SERVER_SUBDIRS := obdfilter ost mds mgs mdt cmm mdd osd-ldiskfs
44
45 CLIENT_SUBDIRS := mdc lmv llite lclient
46
47 QUOTA_SUBDIRS := quota
48
49 LIBLUSTRE_SUBDIRS := liblustre
50
51 SUBDIRS := $(ALWAYS_SUBDIRS)
52
53 if SERVER
54 SUBDIRS += $(SERVER_SUBDIRS)
55 endif
56
57 if CLIENT
58 SUBDIRS += $(CLIENT_SUBDIRS)
59 endif
60
61 SUBDIRS += $(QUOTA_SUBDIRS)
62
63 # this needs to be after the client subdirs
64 if LIBLUSTRE
65 if !CLIENT
66 SUBDIRS += $(CLIENT_SUBDIRS)
67 endif
68 SUBDIRS += $(LIBLUSTRE_SUBDIRS)
69 endif
70
71 DIST_SUBDIRS := $(ALWAYS_SUBDIRS) $(SERVER_SUBDIRS) $(CLIENT_SUBDIRS)   \
72         $(LIBLUSTRE_SUBDIRS) $(QUOTA_SUBDIRS)
73
74 EXTRA_DIST = BUGS FDL kernel_patches
75
76 lvfs-sources:
77         $(MAKE) sources -C lvfs
78 obdclass-sources:
79         $(MAKE) sources -C obdclass
80
81 sources: $(LDISKFS) lvfs-sources obdclass-sources lustre_build_version
82
83 all-recursive: lustre_build_version
84
85 BUILD_VER_H=$(top_builddir)/lustre/include/lustre/lustre_build_version.h
86
87 lustre_build_version:
88         perl $(top_builddir)/lustre/scripts/version_tag.pl $(top_srcdir) $(top_builddir) > tmpver
89         echo "#define LUSTRE_RELEASE @RELEASE@" >> tmpver
90         cmp -s $(BUILD_VER_H) tmpver > tmpdiff 2> /dev/null &&          \
91                 $(RM) tmpver tmpdiff ||                                 \
92                 mv -f tmpver $(BUILD_VER_H)