AUTOMAKE_OPTIONS = foreign
-DIST_SUBDIRS =
-SUBDIRS = include portals conf scripts ldlm
-
-# ldiskfs creates headers that the ldiskfs fsfilt will need
-if MODULES
-if LDISKFS
-SUBDIRS += ldiskfs
-else
-DIST_SUBDIRS += ldiskfs
-endif
-else
-DIST_SUBDIRS += ldiskfs
-endif
-
-# directories shared by the liblustre and modules builds
-CORE_SUBDIRS = lvfs obdclass lov ptlrpc obdecho osc mdc
-if LIBLUSTRE
-SUBDIRS += $(CORE_SUBDIRS)
-else
-if MODULES
-SUBDIRS += $(CORE_SUBDIRS)
-else
-DIST_SUBDIRS += $(CORE_SUBDIRS)
-endif
-endif
-
-# directories only built in the modules build
-MODULES_SUBDIRS = mds obdfilter ost llite cobd
-MODULES_DIST_SUBDIRS =
-
if LINUX25
-MODULES_DIST_SUBDIRS += ptlbd
+DIRS24 =
else
-MODULES_SUBDIRS += ptlbd
+DIRS24 = ptlbd
endif
-if SNAPFS
-MODULES_SUBDIRS += snapfs
+# just until things are farther along
+if CRAY_PORTALS
+UTILS_TESTS =
else
-MODULES_DIST_SUBDIRS += snapfs
-endif
-
-if SMFS
-MODULES_SUBDIRS += smfs
-else
-MODULES_DIST_SUBDIRS += smfs
-endif
-
-if MODULES
-SUBDIRS += $(MODULES_SUBDIRS)
-DIST_SUBDIRS += $(MODULES_DIST_SUBDIRS)
-else
-DIST_SUBDIRS += $(MODULES_SUBDIRS) $(MODULES_DIST_SUBDIRS)
+UTILS_TESTS = utils tests
endif
if LIBLUSTRE
-SUBDIRS += liblustre
+SUBDIRS = portals obdclass lov ptlrpc obdecho osc utils mdc lvfs liblustre lmv
else
-DIST_SUBDIRS += liblustre
+SUBDIRS = lvfs portals obdclass include $(DIRS24) mds obdfilter mdc osc ost
+SUBDIRS+= llite obdecho lov cobd doc scripts conf ptlrpc lmv $(UTILS_TESTS)
endif
-if DOC
-SUBDIRS += doc
-else
-DIST_SUBDIRS += doc
-endif
-if UTILS
-SUBDIRS += utils
-else
-DIST_SUBDIRS += utils
+if SNAPFS
+SUBDIRS+= snapfs
endif
-if TESTS
-SUBDIRS += tests
-else
-DIST_SUBDIRS += tests
+if SMFS
+SUBDIRS += smfs
endif
+DIST_SUBDIRS = $(SUBDIRS) liblustre snapfs smfs
+EXTRA_DIST = BUGS FDL Rules kernel_patches
-DIST_SUBDIRS += $(SUBDIRS)
-
-EXTRA_DIST = BUGS FDL Rules.in kernel_patches kernel-tests/Makefile
+# We get the version from the spec file.
+CONFIGURE_DEPENDENCIES = scripts/lustre.spec.in
dist-hook:
find $(distdir) -name .deps | xargs rm -rf
find $(distdir) -name CVS | xargs rm -rf
+include $(top_srcdir)/Rules
+
rpms: dist Makefile
rpmbuild -ta $(distdir).tar.gz