X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=build%2FautoMakefile.am.toplevel;h=56bb2dc2a4f793f68f6588c338eba42c014c74fc;hb=43aa8147c9a7666aae22d97514c86efdd054de58;hp=3413efc0df991c4028f3e04671bd5ccd403f1ff6;hpb=a2f68bc17cf30fc91ad5da36be41b235c9b51409;p=fs%2Flustre-release.git diff --git a/build/autoMakefile.am.toplevel b/build/autoMakefile.am.toplevel index 3413efc..56bb2dc 100644 --- a/build/autoMakefile.am.toplevel +++ b/build/autoMakefile.am.toplevel @@ -1,9 +1,7 @@ -AUTOMAKE_OPTIONS = foreign - -SUBDIRS := . build @LIBSYSIO_SUBDIR@ @SNMP_SUBDIR@ lnet @LUSTRE_PORTALS_SUBDIR@ lustre -DIST_SUBDIRS := build @SNMP_DIST_SUBDIR@ libsysio lnet @LUSTRE_PORTALS_SUBDIR@ lustre +# This file is included by each package's toplevel autoMakefile[.am], +# which must define SUBDIRS as a minimum. -EXTRA_DIST := config.h.in +AUTOMAKE_OPTIONS = foreign # these empty rules are needed so that automake doesn't add its own # recursive rules @@ -19,18 +17,20 @@ tags: rm -f $(top_srcdir)/TAGS ETAGSF=`etags --version | grep -iq exuberant && \ echo "-I __initdata,__exitdata,EXPORT_SYMBOL"`; \ - find $(top_srcdir) -name '*.[hc]' |grep -v linux-stage |xargs etags $$ETAGSF -a + find $(top_srcdir) -name .pc -prune -o -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]' |grep -v linux-stage |xargs ctags $$CTAGSF -a + find $(top_srcdir) -name .pc -prune -o -name '*.[hc]' |xargs ctags $$CTAGSF -a if MODULES -all-sources: - $(MAKE) sources -C lnet - $(MAKE) sources -C lustre - if [ "x@LUSTRE_PORTALS_SUBDIR@" = "xportals" ] ; then $(MAKE) sources -C @LUSTRE_PORTALS_SUBDIR@ ; fi +sources: all-sources + +all-sources: $(EXTRA_SOURCES) + for dir in $(SOURCES_SUBDIRS) ; do \ + $(MAKE) sources -C $$dir || exit $$? ; \ + done if LINUX all-am: modules @@ -51,6 +51,7 @@ endif # !LINUX25 modules: $(DEP) all-sources $(MAKE) $(ARCH_UM) CC="$(CC)" -C $(LINUX_OBJ) \ -f $(PWD)/build/Makefile LUSTRE_LINUX_CONFIG=$(LINUX_CONFIG) \ + LINUXINCLUDE='$(EXTRA_LNET_INCLUDE) -Iinclude $$(if $$(KBUILD_SRC),-Iinclude2 -I$$(srctree)/include) -include include/linux/autoconf.h' \ $(MODULE_TARGET)=$(PWD) -o tmp_include_depends -o scripts -o \ include/config/MARKER $@ endif # LINUX @@ -58,15 +59,43 @@ endif # LINUX endif # MODULES dist-hook: + rm -f $(distdir)/ldiskfs/*.spec + rm -f $(distdir)/lustre-iokit/*.spec find $(distdir) -name .deps -o \ -name CVS -o \ + -name .svn -o \ -name .#* | xargs rm -rf -build/lustre.spec: build/lustre.spec.in config.status - ./config.status build/lustre.spec - -rpms: build/lustre.spec dist Makefile +EXTRA_DIST = @PACKAGE_TARNAME@.spec \ + build/Makefile build/autoMakefile.am.toplevel build/lbuild \ + build/linux-merge-config.awk build/linux-merge-modules.awk \ + build/linux-rhconfig.h build/lmake build/Rules.in \ + build/lustre-kernel-2.4.spec.in build/suse-functions.sh \ + build/suse-post.sh build/suse-postun.sh \ + build/suse-trigger-script.sh.in build/README.kernel-source \ + build/sles8-post.sh build/sles8-postun.sh build/sles8-pre.sh \ + build/sles8-update_INITRD_MODULES.sh \ + build/sles8-update_rcfile_setting.sh build/update_oldconfig \ + build/autoconf/lustre-build-linux.m4 \ + build/autoconf/lustre-build.m4 + +rpms-real: @PACKAGE_TARNAME@.spec dist Makefile rpmbuild -ta $(distdir).tar.gz -srpm: build/lustre.spec dist Makefile +srpm-real: @PACKAGE_TARNAME@.spec dist Makefile rpmbuild -ts $(distdir).tar.gz + +rpms: + for subdir in $(RPM_SUBDIRS) ; do \ + echo "Making rpms in $$subdir"; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) rpms); \ + done; \ + $(MAKE) $(AM_MAKEFLAGS) rpms-real + +srpm: + for subdir in $(RPM_SUBDIRS) ; do \ + echo "Making srpm in $$subdir"; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) srpm); \ + done; \ + $(MAKE) $(AM_MAKEFLAGS) srpm-real +