Make on SMP systems
Rex Dieter
rdieter at math.unl.edu
Wed Mar 23 15:06:55 UTC 2005
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
-- Rex
More information about the fedora-extras-list
mailing list