Whamcloud - gitweb
Branch b1_6
[fs/lustre-release.git] / build / autoMakefile.am.toplevel
index e42c725..d1030ff 100644 (file)
@@ -1,9 +1,7 @@
-AUTOMAKE_OPTIONS = foreign
-
-SUBDIRS := . build @LIBSYSIO_SUBDIR@ portals lustre
-DIST_SUBDIRS := build libsysio portals 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
@@ -27,9 +25,12 @@ tags:
        find $(top_srcdir) -name '*.[hc]' |grep -v linux-stage |xargs ctags $$CTAGSF -a
 
 if MODULES
+sources: all-sources
+
 all-sources:
-       $(MAKE) sources -C portals
-       $(MAKE) sources -C lustre
+       for dir in $(SOURCES_SUBDIRS) ; do \
+               $(MAKE) sources -C $$dir ; \
+       done
 
 if LINUX
 all-am: modules
@@ -57,11 +58,41 @@ endif # LINUX
 endif # MODULES
 
 dist-hook:
-       find $(distdir) -name .deps | xargs rm -rf
-       find $(distdir) -name CVS | xargs rm -rf
+       find $(distdir) -name .deps -o \
+                       -name CVS -o \
+                       -name .svn -o \
+                       -name .#* | xargs rm -rf
+
+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
 
-build/lustre.spec: build/lustre.spec.in config.status
-       ./config.status build/lustre.spec
+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
 
-rpms: build/lustre.spec dist Makefile
-       rpmbuild -ta $(distdir).tar.gz