]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
spec: Run all make jobs in parallel
authorAndrea Bolognani <abologna@redhat.com>
Mon, 7 Nov 2016 15:09:17 +0000 (16:09 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Mon, 7 Nov 2016 16:27:23 +0000 (17:27 +0100)
Commit e8861f69714f changed our spec file to compile and run
tests in parallel. That's a very good step forward, but why
stop there? Let's run *all* make jobs in parallel and really
put those expensive cores to use!

On my laptop, this shaves ~10s off 'make rpm'.

libvirt.spec.in

index 513393629e7da8027adf1efd810b132d03868d61..a2c2f2f10625cb298dde6bcbf70fb27bb4e0578a 100644 (file)
@@ -1210,9 +1210,9 @@ rm -fr %{buildroot}
 # Avoid using makeinstall macro as it changes prefixes rather than setting
 # DESTDIR. Newer make_install macro would be better but it's not available
 # on RHEL 5, thus we need to expand it here.
-make install DESTDIR=%{?buildroot} SYSTEMD_UNIT_DIR=%{_unitdir}
+make %{?_smp_mflags} install DESTDIR=%{?buildroot} SYSTEMD_UNIT_DIR=%{_unitdir}
 
-make -C examples distclean
+make %{?_smp_mflags} -C examples distclean
 
 rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
 rm -f $RPM_BUILD_ROOT%{_libdir}/*.a