]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
redhat: parallel builds
authorStephan Wiesand <stephan.wiesand@desy.de>
Mon, 2 Jul 2018 12:05:47 +0000 (14:05 +0200)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 27 Jul 2018 12:50:58 +0000 (08:50 -0400)
Parallel builds can be an order of magnitude faster. Add the
_smp_mflags macro to all invocations of make in the rpm spec,
to make use of all available cores and SMT threads on the build
system. This should also help noticing new dependency issues
early. Note the macro can be overridden on the rpmbuild command
line.

Reviewed-on: https://gerrit.openafs.org/13240
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit e60766286b7a581dcdd14466884ea7fdcae10918)

Change-Id: I3428e5acc7114a5bf1a1090352055041ef099fbd
Reviewed-on: https://gerrit.openafs.org/13249
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
src/packaging/RedHat/openafs.spec.in

index de2c4699505ddbc0f6bfebfec60872fa2f93c058..8938e0d8daf6637b9f35626dd320f47fd2484cc1 100644 (file)
@@ -606,7 +606,7 @@ export KRB5_CONFIG
        || exit 1
 
 # Build the libafs tree
-make only_libafs_tree || exit 1
+make %{_smp_mflags} only_libafs_tree || exit 1
 
 %if %{krb5support}
 %if %{?krb5config:1}%{!?krb5config:0}
@@ -655,7 +655,7 @@ done
 
 %if %{build_userspace}
 # Build the user-space AFS stuff
-make all_nolibafs
+make %{_smp_mflags} all_nolibafs
 %endif
 
 %if %{build_modules}
@@ -663,10 +663,10 @@ for kvariant in %{kvariants}
 do
   if [ -n "${kvariant}" ] ; then
     pushd _kmod_build_$kvariant;
-    make all
+    make %{_smp_mflags} all
     popd
   else
-    make libafs
+    make %{_smp_mflags} libafs
   fi
 done
 %endif
@@ -693,7 +693,7 @@ export DONT_GPRINTIFY=1 # Do not modify initscripts.
 #-----------------------------------------------------------------------------
 # Install userspace files
 #-----------------------------------------------------------------------------
-make install_nolibafs DESTDIR="$RPM_BUILD_ROOT"
+make %{_smp_mflags} install_nolibafs DESTDIR="$RPM_BUILD_ROOT"
 
 # Set the executable bit on libraries in libdir, so rpmbuild knows to
 # create "Provides" entries in the package metadata for the libraries