You are not logged in.

#1 2014-03-12 12:07:00

cgo
Member
From: Paris, France
Registered: 2010-11-05
Posts: 22

[solved] make -j (parallel jobs) in PKGBUILD ?

Hi,

I just rediscovered option -j in make, that lets make runs parallel jobs. On my computer (4 cores, ssd), it speeds up things.

I was wondering if it was clean/permitted/a good idea to use this in PKGBUILDs, by automatically adjusting the -j parameter to the number of cores, or half the number of cores ?

Cheers,
Charles

Last edited by cgo (2014-03-12 12:48:45)

Offline

#2 2014-03-12 12:10:03

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,447
Website

Re: [solved] make -j (parallel jobs) in PKGBUILD ?

This should not be added to PKGBUILDs.  Makepkg already sets this if the user has opted for it in /etc/makepkg.conf.  If you try to override this you will be using a setting that works best on your machine to override a setting the user has found works best on their own machine.

For your own use, just set -j4 in makepkg.conf on your system.

Last edited by Trilby (2014-03-12 12:11:04)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2014-03-12 12:47:59

cgo
Member
From: Paris, France
Registered: 2010-11-05
Posts: 22

Re: [solved] make -j (parallel jobs) in PKGBUILD ?

Hi,
thanks, I should have checked in makepkg.conf (MAKEFLAGS option).
It's great it already exists !

Enjoy,
Charles

Offline

#4 2014-03-12 12:48:09

portix
Member
Registered: 2009-01-13
Posts: 757

Re: [solved] make -j (parallel jobs) in PKGBUILD ?

There is one exception, -j1 can be used in a PKGBUILD to limit the number of threads, e.g. if the build fails due to some race conditions in the build process.

Offline

#5 2014-03-12 13:00:11

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,365
Website

Re: [solved] make -j (parallel jobs) in PKGBUILD ?

portix wrote:

There is one exception, -j1 can be used in a PKGBUILD to limit the number of threads, e.g. if the build fails due to some race conditions in the build process.

There is even an option....   Add options=('!makeflags') to the PKGBUILD

Offline

Board footer

Powered by FluxBB