Mailinglist Archive: opensuse-packaging (161 mails)

< Previous Next >
Re: [opensuse-packaging] Is there a decent explanation of "%__make %{?jobs:-j%{jobs}}" somewhere?
  • From: Dave Plater <dplater@xxxxxxxxxxxxxxxx>
  • Date: Fri, 08 Jan 2010 10:58:51 +0200
  • Message-id: <4B46F3CB.5000405@xxxxxxxxxxxxxxxx>
On 01/08/2010 10:23 AM, Ludwig Nussel wrote:
Dave Plater wrote:

I'm fine tuning the build of lilypond and they (lilypond devs) recommend
building the documentation, which takes a long time, using "make -jx
CPU_COUNT=x doc" where x is the cpu core count +1. When building online
the "%{?jobs:-j%{jobs}}" macro expands to -j 4 but not being sure of
these things, when I use just plain "make -j x" on my box it doesn't
speed up the documentation build much whereas if I add "-j 3
CPU_COUNT=3" the build time is reduced from one and a half hours to half
an hour approximately. Is there a way of duplicating this on line?

%jobs is set to the number of parallel compile jobs to use. It's
independent of the number of actual cpus as %jobs is set when iceream
is used too. That CPU_COUNT thing is a special feature of your
Makefile I guess. You better don't use %jobs there as icecream is of
no use for building the documentation.

I'll play with the CPU_COUNT= option, is there a way of getting the
jobs= number to use in the spec file, that you know of?

Another question, using the openSUSE build script, I've tried to pass
the option to rpmbuild "-bi --short-circuit" via RPM_BUILD_STAGE
environment option and it gets rejected as invalid either because of the
other options or because of the '-bi --short-circuit' '' quotes. If I'm
not making a silly mistake when executing "export RPM_BUILD_STAGE=-bi\
--short-circuit" then I'll make an enhancement request.

--short-circuit won't work anyways I guess as the build script wipes
%_topdir in each run. You'd have to chroot into the buildroot and
call rpmbuild yourself:
# vi $BUILD_ROOT/.build.command
# chroot $BUILD_ROOT su -c /.build.command - abuild

cu
Ludwig


This calls for an enhancement request, as build is a good way of
simulating osc build to fine tune packages, it picks up things that
plain rpmbuild doesn't, in fact I can even play with the script myself
and submit it. There is nothing better to debug %install and %file
section problems than rpmbuild -bx --short-circuit.
Thanks
Dave P

--
To unsubscribe, e-mail: opensuse-packaging+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-packaging+help@xxxxxxxxxxxx

< Previous Next >