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

Auguste Pop auguste at gmail.com
Sun Apr 1 04:45:08 EDT 2012


On Sun, Apr 1, 2012 at 12:59 AM, David C. Rankin
<drankinatty at suddenlinkmail.com> 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


More information about the arch-general mailing list