X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2FautoMakefile.am;h=6be5e694b1a7b25dbc737c6944cdda47e3e48f3b;hp=04e635645b4ddaf531aae4abbda1c5e2ce3abdb8;hb=abeb01e26ab62fba03d239f78cf3c680a0a42841;hpb=23de47e82bd999ec651f927097922413527cca71 diff --git a/lustre/autoMakefile.am b/lustre/autoMakefile.am index 04e6356..6be5e69 100644 --- a/lustre/autoMakefile.am +++ b/lustre/autoMakefile.am @@ -5,89 +5,59 @@ AUTOMAKE_OPTIONS = foreign -SUBDIRS = . include portals ldiskfs lvfs obdclass lov ldlm ptlrpc \ - obdecho osc mdc mds obdfilter ost llite cobd ptlbd snapfs smfs cmobd \ - liblustre doc utils tests conf scripts +# also update lustre/autoconf/lustre-core.m4 AC_CONFIG_FILES +ALWAYS_SUBDIRS := include lvfs obdclass ldlm ptlrpc osc lov obdecho \ + mgc fid fld doc utils tests scripts autoconf contrib -EXTRA_DIST = BUGS FDL Rules.in kernel_patches kernel-tests/Makefile \ - README.kernel-source +SERVER_SUBDIRS := obdfilter ost mds mgs mdt cmm mdd osd -# these empty rules are needed so that automake doesn't add its own -# recursive rules -etags-recursive: +CLIENT_SUBDIRS := mdc lmv llite -ctags-recursive: +QUOTA_SUBDIRS := quota -tags-recursive: +LIBLUSTRE_SUBDIRS := liblustre -TAGS: +SUBDIRS := $(ALWAYS_SUBDIRS) -tags: - rm -f $(top_srcdir)/TAGS - ETAGSF=`etags --version | grep -iq exuberant && \ - echo "-I __initdata,__exitdata,EXPORT_SYMBOL"`; \ - find $(top_srcdir) -name '*.[hc]' | xargs etags $$ETAGSF -a - - rm -f $(top_srcdir)/tags - CTAGSF=`ctags --version | grep -iq exuberant && \ - echo "-I __initdata,__exitdata,EXPORT_SYMBOL"`; \ - find $(top_srcdir) -name '*.[hc]' | xargs ctags $$CTAGSF -a - -if MODULES -all-am: modules +if SERVER +SUBDIRS += $(SERVER_SUBDIRS) +endif -if !LINUX25 -DEP = dep -dep: .depend +if CLIENT +SUBDIRS += $(CLIENT_SUBDIRS) +endif -.depend: - $(MAKE) $(ARCH_UM) -C $(LINUX) -f $(PWD)/kernel-tests/Makefile LUSTRE_LINUX_CONFIG=$(LINUX_CONFIG) -o scripts -o include/config/MARKER _sfdep_$(PWD) _FASTDEP_ALL_SUB_DIRS="$(PWD)" +if QUOTA +SUBDIRS += $(QUOTA_SUBDIRS) endif -if LDISKFS -LDISKFS = ldiskfs-sources -ldiskfs-sources: - $(MAKE) sources -C ldiskfs +# this needs to be after the client subdirs +if LIBLUSTRE +if !CLIENT +SUBDIRS += $(CLIENT_SUBDIRS) +endif +SUBDIRS += $(LIBLUSTRE_SUBDIRS) endif +DIST_SUBDIRS := $(ALWAYS_SUBDIRS) $(SERVER_SUBDIRS) $(CLIENT_SUBDIRS) \ + $(LIBLUSTRE_SUBDIRS) $(QUOTA_SUBDIRS) + +EXTRA_DIST = BUGS FDL kernel_patches + lvfs-sources: $(MAKE) sources -C lvfs +obdclass-sources: + $(MAKE) sources -C obdclass -modules: lustre_build_version $(DEP) $(LDISKFS) lvfs-sources - $(MAKE) $(ARCH_UM) -C $(LINUX) -f $(PWD)/kernel-tests/Makefile LUSTRE_LINUX_CONFIG=$(LINUX_CONFIG) SUBDIRS=$(PWD) -o tmp_include_depends -o scripts -o include/config/MARKER $@ - -endif # MODULES +sources: $(LDISKFS) lvfs-sources obdclass-sources lustre_build_version all-recursive: lustre_build_version +BUILD_VER_H=$(top_builddir)/lustre/include/lustre/lustre_build_version.h + lustre_build_version: - perl $(top_builddir)/scripts/version_tag.pl $(top_srcdir) $(top_builddir) > tmpver + perl $(top_builddir)/lustre/scripts/version_tag.pl $(top_srcdir) $(top_builddir) > tmpver echo "#define LUSTRE_RELEASE @RELEASE@" >> tmpver - cmp -s $(top_builddir)/include/linux/lustre_build_version.h tmpver \ - 2> /dev/null && \ - $(RM) tmpver || \ - mv tmpver $(top_builddir)/include/linux/lustre_build_version.h - -dist-hook: - find $(distdir) -name .deps | xargs rm -rf - find $(distdir) -name CVS | xargs rm -rf - -rpms: dist Makefile - rpmbuild -ta $(distdir).tar.gz - -CSTK=/tmp/checkstack -CSTKO=/tmp/checkstack.orig - -checkstack: - [ -f ${CSTK} -a ! -s ${CSTKO} ] && mv ${CSTK} ${CSTKO} || true - for i in ${SUBDIRS} portals/knals/*; do \ - MOD=$$i/`basename $$i`.o; \ - [ -f $$MOD ] && objdump -d $$MOD | perl tests/checkstack.pl; \ - done | sort -nr > ${CSTK} - [ -f ${CSTKO} ] && ! diff -u ${CSTKO} ${CSTK} || head -30 ${CSTK} - -checkstack-update: - [ -f ${CSTK} ] && mv ${CSTK} ${CSTKO} - -checkstack-clean: - rm -f ${CSTK} ${CSTKO} + cmp -s $(BUILD_VER_H) tmpver > tmpdiff 2> /dev/null && \ + $(RM) tmpver tmpdiff || \ + mv -f tmpver $(BUILD_VER_H)