Re: Can you test machine to set --jobs[=N] from w/i PKGBUILD?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 1 April 2012 10:59, David C. Rankin <drankinatty@xxxxxxxxxxxxxxxxxx>wrote:

> Guys,
>
>  Is there any way to check the number of cores on a machine to set the
> number
> of jobs within a PKGBUILD?:
>
> make -j'X'
>
> I have some dual-core and some quad-core boxes and the difference between
> -j2
> and -j4 on build time is tremendous. However, for generically creating a
> source
> package to be used by someone else, I can't hardcode the jobs number.
> Anyway to
> test in pkgbuild or is this just a per box makepkg.conf issue?
>

I had this for a one-fit Arch UFD:

CPUCORES=$(grep processor /proc/cpuinfo | wc -l)
[ $CPUCORES -gt 1 ] && MAKEFLAGS="-j$(($CPUCORES + 1))"

But that's in makepkg.conf :) You shouldn't enforce this from within a
PKGBUILD.


--
GPG/PGP ID: C0711BF1


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux