1 # This file is included by each package's toplevel autoMakefile[.am],
2 # which must define SUBDIRS as a minimum.
4 AUTOMAKE_OPTIONS = foreign
6 FIND_TAG_FILES_CMD = find $(top_srcdir) \
7 -path $(top_srcdir)/ldiskfs/ldiskfs/linux-stage -prune -false -o\
10 # these empty rules are needed so that automake doesn't add its own
23 $(RM) $(top_srcdir)/TAGS
24 ETAGSF=`etags --version | grep -iq exuberant && \
25 echo "-I __initdata,__exitdata,EXPORT_SYMBOL"`; \
26 $(FIND_TAG_FILES_CMD) | xargs etags $$ETAGSF -a
29 $(RM) $(top_srcdir)/tags
30 CTAGSF=`ctags --version | grep -iq exuberant && \
31 echo "-I __initdata,__exitdata,EXPORT_SYMBOL"`; \
32 $(FIND_TAG_FILES_CMD) | xargs ctags $$CTAGSF -a
37 $(RM) $(top_srcdir)/cscope*.out $(top_srcdir)/cscope.files
38 $(FIND_TAG_FILES_CMD) > cscope.files
42 $(FIND_TAG_FILES_CMD) | xargs mkid
45 doxygen: doxygen-api doxygen-ref
47 doxygen-%: build/doxyfile.%
53 all-sources: $(EXTRA_SOURCES)
54 for dir in $(SOURCES_SUBDIRS) ; do \
55 $(MAKE) sources -C $$dir || exit $$? ; \
66 $(MAKE) $(ARCH_UM) CC="$(CC)" -C $(LINUX_OBJ) \
67 -f $(PWD)/build/Makefile LUSTRE_LINUX_CONFIG=$(LINUX_CONFIG) \
68 -o scripts -o include/config/MARKER _sfdep_$(PWD) \
69 _FASTDEP_ALL_SUB_DIRS="$(PWD)"
74 modules: $(DEP) all-sources
75 $(MAKE) $(ARCH_UM) CC="$(CC)" -C $(LINUX_OBJ) \
76 -f $(PWD)/build/Makefile LUSTRE_LINUX_CONFIG=$(LINUX_CONFIG) \
77 LINUXINCLUDE='$(EXTRA_LNET_INCLUDE) -I$$(srctree)/arch/$$(SRCARCH)/include -Iinclude $$(if $$(KBUILD_SRC),-Iinclude2 -I$$(srctree)/include) -include include/linux/autoconf.h' \
78 $(MODULE_TARGET)=$(PWD) -o tmp_include_depends -o scripts -o \
79 include/config/MARKER $@
85 $(RM) $(distdir)/ldiskfs/*.spec
86 $(RM) $(distdir)/lustre-iokit/*.spec
87 find $(distdir) -name .deps -o \
91 -name .#* | xargs rm -rf
92 $(MAKE) $(AM_MAKEFLAGS) \
93 top_distdir="$(top_distdir)" distdir="$(distdir)" \
96 EXTRA_DIST = @PACKAGE_TARNAME@.spec \
97 build/Makefile build/autoMakefile.am.toplevel build/lbuild \
98 build/linux-merge-config.awk build/linux-merge-modules.awk \
99 build/linux-rhconfig.h build/lmake build/Rules.in \
100 build/lustre-kernel-2.4.spec.in build/suse-functions.sh \
101 build/suse-post.sh build/suse-postun.sh \
102 build/suse-trigger-script.sh.in build/README.kernel-source \
103 build/sles8-post.sh build/sles8-postun.sh build/sles8-pre.sh \
104 build/sles8-update_INITRD_MODULES.sh \
105 build/sles8-update_rcfile_setting.sh build/update_oldconfig \
106 build/autoconf/lustre-build-linux.m4 \
107 build/autoconf/lustre-build.m4 build/rdac_spec \
108 build/mptlinux.spec.patch
110 rpms-real: @PACKAGE_TARNAME@.spec dist Makefile
111 rpmbuild -ta $(distdir).tar.gz
113 srpm-real: @PACKAGE_TARNAME@.spec dist Makefile
114 rpmbuild -ts $(distdir).tar.gz
117 for subdir in $(RPM_SUBDIRS) ; do \
118 echo "Making rpms in $$subdir"; \
119 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) rpms); \
120 echo "Finished rpms in $$subdir"; \
122 $(MAKE) $(AM_MAKEFLAGS) rpms-real
125 for subdir in $(RPM_SUBDIRS) ; do \
126 echo "Making srpm in $$subdir"; \
127 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) srpm); \
128 echo "Finished srpms in $$subdir"; \
130 $(MAKE) $(AM_MAKEFLAGS) srpm-real
132 # In the debs target, first make sure what's in the changelog reflects
133 # the software version. Here's how we could dig the version out of the
134 # autoconf version file directly:
135 # lversion=$$(sed -ne 's/m4_define(\[LUSTRE_[A-Z][A-Z]*\],\[\([0-9][0-9]*\)\])$$/\1/p'
136 # lustre/autoconf/lustre-version.ac | tr '\n' '.' | sed -e 's/.$//');
138 # However, one cannot really run "make debs" without having done a
139 # configure first, so we could use the easier method of digging the
140 # version out of the config.h file.
142 lversion=$$(sed -ne 's/^#define VERSION "\(.*\)"$$/\1/p' config.h); \
143 cversion=$$(sed -ne '1s/^lustre (\(.*\)-[0-9][0-9]*).*$$/\1/p' debian/changelog); \
144 if [ "$$lversion" != "$$cversion" ]; then \
145 echo -e "1i\nlustre ($$lversion-1) unstable; urgency=low\n\n * Automated changelog entry update\n\n -- Brian J. Murrell <brian@interlinx.bc.ca> $$(date -R)\n\n.\nwq" | ed debian/changelog; \
147 dpkg-buildpackage || { \
148 rc=$${PIPESTATUS[0]}; \
149 [ $${rc} -gt 1 ] && exit $${rc}; \
152 export KPKG_DEST_DIR="$$(pwd)/.." && \
153 version=$$(sed -ne '1s/^lustre (\(.*\)).*$$/\1/p' debian/changelog) && \
154 rm -rf debian/tmp/modules-deb && \
155 mkdir debian/tmp/modules-deb && \
156 cd debian/tmp/modules-deb && \
157 dpkg -x ../../../../lustre-source_$${version}_all.deb $$(pwd) && \
159 tar -C usr_src/ -xjf usr/src/lustre.tar.bz2 && \
160 chmod 755 usr_src/modules/lustre/debian/rules && \
161 mkdir -p usr_share_modass && \
162 ln -s /usr/share/modass/include/ usr_share_modass/ && \
163 ln -s /usr/share/modass/packages/ usr_share_modass/ && \
164 echo "lustre" > usr_share_modass/compliant.list && \
165 export MA_DIR=$$(pwd)/usr_share_modass && \
166 m-a build $${KVERS:+-l $$KVERS} -i -u $$(pwd) lustre