[libvirt] [PATCH] spec: Run all make jobs in parallel

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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 5133936..a2c2f2f 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -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 -- 2.7.4

On Mon, Nov 07, 2016 at 05:30:53PM +0100, Andrea Bolognani wrote:
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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in index 5133936..a2c2f2f 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -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.
Oooh, cleanup option for someone - we no longer need RHEL-5, so that comment can be addressed now.
-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
ACK Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://entangle-photo.org -o- http://search.cpan.org/~danberr/ :|

On Mon, 2016-11-07 at 16:32 +0000, Daniel P. Berrange wrote:
On Mon, Nov 07, 2016 at 05:30:53PM +0100, Andrea Bolognani wrote:
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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 5133936..a2c2f2f 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -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. Oooh, cleanup option for someone - we no longer need RHEL-5, so that comment can be addressed now.
I'll take a stab at it if nobody beats me to it :)
-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 ACK
Pushed, thanks! -- Andrea Bolognani / Red Hat / Virtualization
participants (2)
-
Andrea Bolognani
-
Daniel P. Berrange