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 Sun, Apr 1, 2012 at 12:59 AM, 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?
>
> --
> David C. Rankin, J.D.,P.E.

i am not sure why are you trying to do it in PKGBUILD. if you have
several machines that you want to have different settings, why not set
/etc/makepkg.conf or $HOME/.makepkg.conf separately?

anyway, i think the following command can easily get the information you need:
grep -c processor /proc/cpuinfo


[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