Whamcloud - gitweb
LU-1511 kernel: kernel update [RHEL5.8 2.6.18-308.11.1.el5]
[fs/lustre-release.git] / autoMakefile.am
1 SUBDIRS := @LDISKFS_SUBDIR@ @SPL_SUBDIR@ @ZFS_SUBDIR@ . @LIBSYSIO_SUBDIR@ @SNMP_SUBDIR@ @LUSTREIOKIT_SUBDIR@ @LIBCFS_SUBDIR@ lnet lustre
2 DIST_SUBDIRS := @SNMP_DIST_SUBDIR@ libsysio ldiskfs @LUSTREIOKIT_SUBDIR@ @LIBCFS_SUBDIR@ lnet lustre
3 SOURCES_SUBDIRS := @LDISKFS_SUBDIR@ @LIBCFS_SUBDIR@ lnet lustre
4 RPM_SUBDIRS := @LDISKFS_SUBDIR@ @LUSTREIOKIT_SUBDIR@
5 if LDISKFS_ENABLED
6 if !LDISKFS_IN_KERNEL
7 EXTRA_SOURCES := @SYMVERFILE@
8 endif
9 endif
10
11 @TESTS_TRUE@BUILD_TESTS = true
12 @TESTS_FALSE@BUILD_TESTS = false
13 @SERVER_TRUE@BUILD_SERVER = true
14 @SERVER_FALSE@BUILD_SERVER = false
15 @CLIENT_TRUE@BUILD_CLIENT = true
16 @CLIENT_FALSE@BUILD_CLIENT = false
17
18 include build/autoMakefile.am.toplevel
19
20 EXTRA_DIST += config.h.in
21
22 if USES_DPKG
23 EXTRA_DIST += debian/control.modules.in debian/control.main \
24               debian/linux-patch-lustre.kpatches \
25               debian/lustre-utils.examples debian/copyright debian/source \
26               debian/source/format debian/lustre-source.docs \
27               debian/lustre-utils.docs debian/lustre-utils.manpages \
28               debian/lustre-client-modules.install debian/README.Debian \
29               debian/.gitignore debian/linux-patch-lustre.dirs \
30               debian/linux-patch-lustre.unpatch debian/lustre-dev.install \
31               debian/lustre-source.dirs debian/liblustre.install debian/rules \
32               debian/lustre-dev.dirs debian/linux-patch-lustre.apply \
33               debian/control debian/changelog debian/lustre-tests.install \
34               debian/lustre-utils.install
35 endif
36
37 if LDISKFS_ENABLED
38 if !LDISKFS_IN_KERNEL
39 @SYMVERFILE@: @LDISKFS_DIR@/@SYMVERFILE@
40         touch @SYMVERFILE@
41         -grep -v ldiskfs @SYMVERFILE@ > @SYMVERFILE@.old
42         cat @SYMVERFILE@.old @LDISKFS_DIR@/@SYMVERFILE@ > @SYMVERFILE@
43 endif
44 endif
45
46 CSTK=/tmp/checkstack
47 CSTKO=/tmp/checkstack.orig
48
49 checkstack:
50         [ -f ${CSTK} -a ! -s ${CSTKO} ] && mv -f ${CSTK} ${CSTKO} || true
51         { for MOD in $$(find . -name "*.ko"); do                             \
52                 objdump -d $$MOD | perl build/checkstack.pl;                 \
53           done } | grep -v " bug " | sort -nr | uniq > ${CSTK}
54         [ -f ${CSTKO} ] && ! diff -u ${CSTKO} ${CSTK} || head -30 ${CSTK}
55
56 checkstack-update:
57         [ -f ${CSTK} ] && mv -f ${CSTK} ${CSTKO}
58
59 checkstack-clean:
60         rm -f ${CSTK} ${CSTKO}
61
62 module-dist-hook:
63         if [ -d CVS -o -d .git ]; then \
64             perl lustre/scripts/make_META.pl > $(distdir)/META; \
65             cp $(distdir)/META $(distdir)/ldiskfs/META; \
66         elif [ -f META ]; then \
67             cp META $(distdir)/META; \
68             cp $(distdir)/META $(distdir)/ldiskfs/META; \
69         else \
70             echo -e "I have no idea how to create a META file in $(distdir).\nPlease file a bug at http://bugzilla.lustre.org/"; \
71             exit 1; \
72         fi
73         if [ -d .git ]; then \
74                 build/extract_patches $(distdir); \
75                 if grep -e "^--- .*\/autoconf" -e "^--- .*\/Makefile\.am" -e ".*\/configure\.ac" -e ".*\/configure\.in" $(distdir)/debian/patches/*; then \
76                         cp build/autogen.sh $(distdir)/build; \
77                         cp libsysio/autogen.sh $(distdir)/libsysio; \
78                         cp lustre-iokit/autogen.sh $(distdir)/lustre-iokit; \
79                 fi; \
80                 mkdir empty; \
81                 diff -urN empty $(distdir)/debian > debian.diff; \
82                 rm -rf $(distdir)/debian; \
83                 rmdir empty; \
84         fi