threads / patch / 1958

patchParallelize building rpm

Subject: [PATCH] Parallelize building rpm

## tl;dr

2 messages between Sep 27, 2005 and Sep 27, 2005. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

H. Peter Anvin· Sep 27, 2005, 02:48 UTC · lore

Allow parallelization of rpm build by adding %{_smp_mflags} to the specfile. The absence of this macro in a specfile means a make should not be parallelized.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>

--- commit b8d5dfede58c6e787b06edf9a179b54876ef04db tree fb5f6eabbc1cf9c57f0d6c2f52db334faa704269 parent 4ae95682694a1cd05ee2029fe241ad90d43c8c0e author H. Peter Anvin <hpa@hera.kernel.org> Mon, 26 Sep 2005 19:43:24 -0700 committer H. Peter Anvin <hpa@hera.kernel.org> Mon, 26 Sep 2005 19:43:24 -0700

 git-core.spec.in |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
Show changes to git-core.spec.in +5 −2
diff --git a/git-core.spec.in b/git-core.spec.in
--- a/git-core.spec.in
+++ b/git-core.spec.in
@@ -23,12 +23,12 @@ elsewhere for tools for ordinary humans 
 %setup -q
 
 %build
-make COPTS="$RPM_OPT_FLAGS" WITH_OWN_SUBPROCESS_PY=YesPlease \
+make %{_smp_mflags} COPTS="$RPM_OPT_FLAGS" WITH_OWN_SUBPROCESS_PY=YesPlease \
      prefix=%{_prefix} all %{!?_without_docs: doc}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-make DESTDIR=$RPM_BUILD_ROOT WITH_OWN_SUBPROCESS_PY=YesPlease \
+make %{_smp_mflags} DESTDIR=$RPM_BUILD_ROOT WITH_OWN_SUBPROCESS_PY=YesPlease \
      prefix=%{_prefix} mandir=%{_mandir} \
      install %{!?_without_docs: install-doc}
 
@@ -45,6 +45,9 @@ rm -rf $RPM_BUILD_ROOT
 %{!?_without_docs: %{_mandir}/man7/*.7*}
 
 %changelog
+* Mon Sep 26 2005 H. Peter Anvin <hpa@zytor.com>
+- add %{_smp_mflags}
+
 * Fri Sep 16 2005 Chris Wright <chrisw@osdl.org> 0.99.6-1
 - update to 0.99.6
 
Junio C Hamano· Sep 27, 2005, 04:21 UTC · re: H. Peter Anvin · lore

Re: [PATCH] Parallelize building rpm

"H. Peter Anvin" <hpa@zytor.com> writes:

Could you also fix COPTS while you are at it, please? I think it is caleld CFLAGS these days.

>  %build
> -make COPTS="$RPM_OPT_FLAGS" WITH_OWN_SUBPROCESS_PY=YesPlease \
> +make %{_smp_mflags} COPTS="$RPM_OPT_FLAGS" WITH_OWN_SUBPROCESS_PY=YesPlease \
>       prefix=%{_prefix} all %{!?_without_docs: doc}

← back to recent threads