Make on SMP systems

Owen Taylor otaylor at redhat.com
Wed Mar 23 15:31:44 UTC 2005


On Wed, 2005-03-23 at 09:06 -0600, Rex Dieter wrote:
> Quentin Spencer wrote:
> > I am in the process of repackaging a SRPM provided by an upstream 
> > developer, and I found the following code in the %build section of the 
> > script:
> > 
> > if [ -x /usr/bin/getconf ] ; then
> >  NCPU=$(/usr/bin/getconf _NPROCESSORS_ONLN)
> >  if [ $NCPU -eq 0 ] ; then
> >    NCPU=1
> >  fi
> > else  NCPU=1
> > fi
> > (make -k -j $NCPU; exit 0)
> > make
> > 
> > Now, I assume that all of this can be taken care of with the following 
> > command:
> > 
> > make %{?_smp_mflags}
> 
> Yes.
> 
> > However, I'm wondering if there's any good reason for the double make 
> > command in the first case. 
> 
> Only if the Makefile's are broken.  Still, if the Makefiles are broken, 
> you can still get *some* build-speed benefits from smp boxes if that is 
> the case by using:
> 
> make -k %{?_smp_mflags} || make

On the other hand, one might say that if the makefiles are broken on
SMP, trying to force a SMP build with them is a bad idea. Is it more
important that the package builds fast or that it builds right?

Regards,
	`					Owen

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/fedora-extras-list/attachments/20050323/ea087fb2/attachment.sig>


More information about the fedora-extras-list mailing list