You are not logged in.

#1 2022-08-07 02:37:47

lomaharshana
Member
Registered: 2020-11-06
Posts: 26

Set threadcount for yay

I want to set the thread count (-j option) for building packages with yay. What is the command line option to set the thread count (or PKGBUILD flags in general) for yay packages?

Offline

#2 2022-08-07 02:58:33

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,543

Re: Set threadcount for yay

man makepkg.conf

. MAKEFLAGS

Offline

#3 2022-08-07 03:53:29

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

Re: Set threadcount for yay

There is no such thing as a "yay package".  Please do not use yay until you understand how the AUR works.


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

Offline

#4 2022-08-07 04:59:40

lomaharshana
Member
Registered: 2020-11-06
Posts: 26

Re: Set threadcount for yay

@skunktrader Thanks. Could you please tell me how to pass MAKEFLAGS to yay via command line?

Offline

#5 2022-08-07 06:28:16

a821
Member
Registered: 2012-10-31
Posts: 381

Re: Set threadcount for yay

see tips and trick in the wiki for makepkg, and also makepkg.conf(5)

Offline

#6 2022-08-07 07:25:18

lomaharshana
Member
Registered: 2020-11-06
Posts: 26

Re: Set threadcount for yay

I tried

yay -S --mflags j12 <package_name>

But it doesn't seem to work.

However, if I use --editmenu and add -j12 option to make through external editor, it works.
But I don't want to make changes using every time the package files need to be compiled.

Offline

#7 2022-08-07 07:47:58

loqs
Member
Registered: 2014-03-06
Posts: 17,369

Re: Set threadcount for yay

Is there a reason you want to avoid using makepkg.conf?

Offline

#8 2022-08-07 07:52:09

a821
Member
Registered: 2012-10-31
Posts: 381

Re: Set threadcount for yay

lomaharshana wrote:
yay -S --mflags j12 <package_name>

I suppose it should be "-j12", did you miss the "-"?

lomaharshana wrote:

[...] But I don't want to make changes using every time the package files need to be compiled.

Did you even read the links I posted in #5?

Offline

#9 2022-08-07 09:27:32

lomaharshana
Member
Registered: 2020-11-06
Posts: 26

Re: Set threadcount for yay

a821 wrote:

Did you even read the links I posted in #5?

Yes, I had read it. But thought makepkg.conf man page was about makepkg options. But after prodding from you, I read it once again and found out that I can configure standard make options via .makepkg.conf in the home folder.
This solves my problem. Thank you very much.

Offline

Board footer

Powered by FluxBB