Whamcloud - gitweb
LU-1757 brw: added OBDO short io flag
[fs/lustre-release.git] / autoMakefile.am
index efd73e7..768deeb 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 \
@@ -88,19 +89,17 @@ dist-hook:
          top_distdir="$(top_distdir)" distdir="$(distdir)" \
          module-dist-hook
 
-EXTRA_DIST = @PACKAGE_TARNAME@.spec                                    \
-       build/Makefile                                                  \
-       build/Rules.in
+EXTRA_DIST = @PACKAGE_TARNAME@.spec    \
+       build/Makefile                  \
+       build/Rules.in                  \
+       build/gen_filelist.sh
 
-if ARCH_MIC
-EXTRA_DIST += build/gen_filelist.sh
-endif
-
-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'" ;; \
@@ -113,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" \
@@ -127,11 +129,10 @@ rpms-real: @PACKAGE_TARNAME@.spec dist Makefile
                RPMARGS="$$RPMARGS --define \"_mandir %{_prefix}/share/man\""; \
                RPMARGS="$$RPMARGS --define \"_sysconfdir %{cross_path}/etc\""; \
                RPMARGS="$$RPMARGS --define \"make_args @CROSS_VARS@\""; \
-               if [ -s @LINUX@/../../.ver.build ]; then \
-                       MPSS_VERSION=$$(sed -ne 's/DRIVERS_\(.*\)-.*/\1/p' @LINUX@/../../.ver.build); \
-                       if [ -n "$$MPSS_VERSION" ]; then \
-                               RPMARGS="$$RPMARGS --define \"cross_requires intel-mic-gpl = 2.1.$$MPSS_VERSION\""; \
-                       fi; \
+               if [ "@CC_TARGET_ARCH@" = "k1om-mpss-linux" ]; then \
+                       RPMARGS="$$RPMARGS --define \"cross_requires mpss-bootimage\""; \
+               else \
+                       RPMARGS="$$RPMARGS --define \"cross_requires intel-mic-gpl\""; \
                fi; \
        fi; \
        if [[ "X$(BUILD_TESTS)" = Xfalse ]]; then \
@@ -149,27 +150,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: