In some distant past, %_smp_mflags didn't exist on all
supported platforms.
We can use it now. The only difference is the lack of an
8-CPU limit, which can be overridden by explicitly defining
RPM_BUILD_NCPUS anyway.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I0b5c2f879da9ba6e8aa3103bfe59e6b43f8d72bc
Reviewed-on: http://review.whamcloud.com/5492
Tested-by: Jenkins
Reviewed-by: Christopher J. Morrone <chris.morrone.llnl@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
ln lnet/ChangeLog ChangeLog-lnet
%build
ln lnet/ChangeLog ChangeLog-lnet
%build
-# if RPM_BUILD_NCPUS unset, set it
-if [ -z "$RPM_BUILD_NCPUS" ] ; then
- RPM_BUILD_NCPUS=$(egrep -c "^cpu[0-9]+" /proc/stat 2>/dev/null || echo 0 :)
- if [ $RPM_BUILD_NCPUS -eq 0 ] ; then
- RPM_BUILD_NCPUS=1
- fi
- if [ $RPM_BUILD_NCPUS -gt 8 ] ; then
- RPM_BUILD_NCPUS=8
- fi
-fi
# Set an explicit path to our Linux tree, if we can.
cd $RPM_BUILD_DIR/lustre-%{version}
# Set an explicit path to our Linux tree, if we can.
cd $RPM_BUILD_DIR/lustre-%{version}
%eval_configure \
%{?kdir: --with-linux=%kdir} %{?kobjdir: --with-linux-obj=%kobjdir} \
$CONFIGURE_ARGS --with-kmp-moddir=%{kmoddir}
%eval_configure \
%{?kdir: --with-linux=%kdir} %{?kobjdir: --with-linux-obj=%kobjdir} \
$CONFIGURE_ARGS --with-kmp-moddir=%{kmoddir}
-make -j $RPM_BUILD_NCPUS -s %{?make_args}
+make %{?_smp_mflags} -s %{?make_args}
%install
make install DESTDIR=$RPM_BUILD_ROOT
%install
make install DESTDIR=$RPM_BUILD_ROOT