Whamcloud - gitweb
LU-3750 mdt: fix typo in mdt_txn_stop_cb()
[fs/lustre-release.git] / autoMakefile.am
index e5fa239..d45897a 100644 (file)
@@ -11,6 +11,8 @@ DIST_SUBDIRS := ldiskfs @SNMP_DIST_SUBDIR@ libsysio lustre-iokit @LIBCFS_SUBDIR@
 @LDISKFS_ENABLED_FALSE@BUILD_OSD_LDISKFS = false
 @ZFS_ENABLED_TRUE@BUILD_OSD_ZFS = true
 @ZFS_ENABLED_FALSE@BUILD_OSD_ZFS = false
+@BUILD_LUSTREIOKIT_TRUE@BUILD_LUSTREIOKIT = true
+@BUILD_LUSTREIOKIT_FALSE@BUILD_LUSTREIOKIT = false
 
 AUTOMAKE_OPTIONS = foreign
 
@@ -78,7 +80,6 @@ endif # LINUX
 endif # MODULES
 
 dist-hook:
-       $(RM) $(distdir)/lustre-iokit/*.spec
        find $(distdir) -name .deps -o \
                        -name CVS -o \
                        -name .svn -o \
@@ -93,7 +94,7 @@ EXTRA_DIST = @PACKAGE_TARNAME@.spec   \
        build/Rules.in                  \
        build/gen_filelist.sh
 
-rpms-real: @PACKAGE_TARNAME@.spec dist Makefile
+rpms: @PACKAGE_TARNAME@.spec dist Makefile
        @CONFIGURE_ARGS=""; \
        for arg in $(ac_configure_args); do \
                case $$arg in \
@@ -145,27 +146,21 @@ rpms-real: @PACKAGE_TARNAME@.spec dist Makefile
        if [[ "X$(BUILD_OSD_ZFS)" = Xtrue ]]; then \
                RPMARGS="$$RPMARGS --with zfs"; \
        fi; \
+        if [[ "X$(BUILD_LUSTREIOKIT)" = Xfalse ]]; then \
+                RPMARGS="$$RPMARGS --without lustre_iokit"; \
+        fi; \
        echo "Building Lustre RPM with $$RPMARGS"; \
        eval rpmbuild $$RPMARGS -ta $(distdir).tar.gz
 
-srpm-real: @PACKAGE_TARNAME@.spec dist Makefile
+srpm: @PACKAGE_TARNAME@.spec dist Makefile
        if [[ "X$(BUILD_TESTS)" = Xfalse ]]; then \
                RPMARGS="--without lustre_tests"; \
        fi; \
+        if [[ "X$(BUILD_LUSTREIOKIT)" = Xfalse ]]; then \
+                RPMARGS="$$RPMARGS --without lustre_iokit"; \
+        fi; \
        eval rpmbuild $$RPMARGS -ts $(distdir).tar.gz
 
-rpms:
-if BUILD_LUSTREIOKIT
-       $(MAKE) -C @LUSTREIOKIT_SUBDIR@ $(AM_MAKEFLAGS) $@
-endif
-       $(MAKE) $(AM_MAKEFLAGS) rpms-real
-
-srpm:
-if BUILD_LUSTREIOKIT
-       $(MAKE) -C @LUSTREIOKIT_SUBDIR@ $(AM_MAKEFLAGS) $@
-endif
-       $(MAKE) $(AM_MAKEFLAGS) srpm-real
-
 # In the debs target, first make sure what's in the changelog reflects
 # the software version.  Here's how we could dig the version out of the
 # autoconf version file directly: