Whamcloud - gitweb
LU-4196 build: Build support for OFED-3.5 and SLES 11
[fs/lustre-release.git] / autoMakefile.am
index 0afd2ed..768deeb 100644 (file)
@@ -94,11 +94,12 @@ 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 \
                        --with-release=* ) ;; \
+                       --with-kmp-moddir=* ) ;; \
                        --enable-tests | --disable-tests ) ;; \
                        --with-linux=* | --with-linux-obj=* ) ;; \
                        * ) CONFIGURE_ARGS="$$CONFIGURE_ARGS '$$arg'" ;; \
@@ -111,6 +112,9 @@ rpms-real: @PACKAGE_TARNAME@.spec dist Makefile
                        RPMARGS="$$RPMARGS --define \"kobjdir @LINUX_OBJ@\""; \
                fi; \
        fi; \
+       if [ -n "@KMP_MODDIR@" ]; then \
+               RPMARGS="$$RPMARGS --define \"kmoddir @KMP_MODDIR@\""; \
+       fi; \
        if [ -n "@CROSS_PATH@" ]; then \
                if [[ "X$(BUILD_SERVER)" = Xtrue ]]; then \
                        echo -e "\n" \
@@ -152,7 +156,7 @@ rpms-real: @PACKAGE_TARNAME@.spec dist Makefile
        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; \
@@ -161,18 +165,6 @@ srpm-real: @PACKAGE_TARNAME@.spec dist Makefile
         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: