Whamcloud - gitweb
LU-2034 changelog: redo changelog using OSD llog
[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 := @LDISKFS_DIST_SUBDIR@ @SNMP_DIST_SUBDIR@ libsysio lustre-iokit @LIBCFS_SUBDIR@ lnet lustre
3 SOURCES_SUBDIRS := @LDISKFS_SUBDIR@ @LIBCFS_SUBDIR@ lnet lustre
4 RPM_SUBDIRS := @LDISKFS_SUBDIR@ @LUSTREIOKIT_SUBDIR@
5 MODULE_SYMVERS_DEPS = module-symvers
6
7 @TESTS_TRUE@BUILD_TESTS = true
8 @TESTS_FALSE@BUILD_TESTS = false
9 @SERVER_TRUE@BUILD_SERVER = true
10 @SERVER_FALSE@BUILD_SERVER = false
11 @CLIENT_TRUE@BUILD_CLIENT = true
12 @CLIENT_FALSE@BUILD_CLIENT = false
13
14 include build/autoMakefile.am.toplevel
15
16 EXTRA_DIST += config.h.in
17
18 if USES_DPKG
19 EXTRA_DIST += debian/*
20 endif
21
22 module-symvers-ldiskfs:
23 if LDISKFS_ENABLED
24         @if [ -f @LDISKFS_DIR@/@SYMVERFILE@ ]; then \
25                 cat @LDISKFS_DIR@/@SYMVERFILE@ >>@SYMVERFILE@; \
26         elif [ -f @LDISKFS_DIR@/ldiskfs/@SYMVERFILE@ ]; then \
27                 cat @LDISKFS_DIR@/ldiskfs/@SYMVERFILE@ >>@SYMVERFILE@; \
28         else \
29                 echo -e "\n" \
30                 "*** Missing ldiskfs symbols. Ensure you have built ldiskfs:\n"\
31                 "*** - @LDISKFS_OBJ@/ldiskfs/@SYMVERFILE@\n"; \
32                 exit 1; \
33         fi
34 endif # LDISKFS_ENABLED
35
36 module-symvers-zfs:
37 if ZFS_ENABLED
38         @if [ -f @SPL_OBJ@/@SPL_SYMBOLS@ ]; then \
39                 cat @SPL_OBJ@/@SPL_SYMBOLS@ >>@SYMVERFILE@; \
40         elif [ -f @SPL_OBJ@/module/@SPL_SYMBOLS@ ]; then \
41                 cat @SPL_OBJ@/module/@SPL_SYMBOLS@ >>@SYMVERFILE@; \
42         else \
43                 echo -e "\n" \
44                 "*** Missing spl symbols. Ensure you have built spl:\n" \
45                 "*** - @SPL_OBJ@/@SYMVERFILE@\n"; \
46                 exit 1; \
47         fi
48         @if [ -f @ZFS_OBJ@/@ZFS_SYMBOLS@ ]; then \
49                 cat @ZFS_OBJ@/@ZFS_SYMBOLS@ >>@SYMVERFILE@; \
50         elif [ -f @ZFS_OBJ@/module/@ZFS_SYMBOLS@ ]; then \
51                 cat @ZFS_OBJ@/module/@ZFS_SYMBOLS@ >>@SYMVERFILE@; \
52         else \
53                 echo -e "\n" \
54                 "*** Missing zfs symbols. Ensure you have built zfs:\n" \
55                 "*** - @ZFS_OBJ@/@SYMVERFILE@\n"; \
56                 exit 1; \
57         fi
58 endif # ZFS_ENABLED
59
60 module-symvers: module-symvers-ldiskfs module-symvers-zfs
61
62 CSTK=/tmp/checkstack
63 CSTKO=/tmp/checkstack.orig
64
65 checkstack:
66         [ -f ${CSTK} -a ! -s ${CSTKO} ] && mv -f ${CSTK} ${CSTKO} || true
67         { for MOD in $$(find . -name "*.ko"); do                             \
68                 objdump -d $$MOD | perl build/checkstack.pl;                 \
69           done } | grep -v " bug " | sort -nr | uniq > ${CSTK}
70         [ -f ${CSTKO} ] && ! diff -u ${CSTKO} ${CSTK} || head -30 ${CSTK}
71
72 checkstack-update:
73         [ -f ${CSTK} ] && mv -f ${CSTK} ${CSTKO}
74
75 checkstack-clean:
76         rm -f ${CSTK} ${CSTKO}
77
78 module-dist-hook:
79         if [ -d CVS -o -d .git ]; then \
80             perl lustre/scripts/make_META.pl > $(distdir)/META; \
81             cp $(distdir)/META $(distdir)/ldiskfs/META; \
82         elif [ -f META ]; then \
83             cp META $(distdir)/META; \
84             cp $(distdir)/META $(distdir)/ldiskfs/META; \
85         else \
86             echo -e "I have no idea how to create a META file in $(distdir).\nPlease file a bug at http://bugzilla.lustre.org/"; \
87             exit 1; \
88         fi