[arch-general] MAKEFLAGS remodelation

Rashif Ray Rahman schiv at archlinux.org
Mon Jan 6 01:43:10 EST 2014


On 6 January 2014 03:57, Kalrish Bäakjen <kalrish.antrax at gmail.com> wrote:
> My goal was to make it generic. SCons and Waf support the "-j" option, but
> that is coincidental. MAKEFLAGS is for make; why tweak it to make it work
> with other build systems? And, if other build systems support some options
> (for debugging, for output supression, for whatever), we need a way to tell
> them.
>
> I'm not sure and I can't test it, but I think that your example would be
> broken if MAKEFLAGS was "-j N" instead of "-jN".

I gave an obvious example; I didn't intend to cover all cases. My
point was that you could tweak as much as you'd like within the
PKGBUILD, on a case-by-case basis, as and when the need arises (or
rather, increases), until it becomes more than just a few packages.

_JOBS=${MAKEFLAGS// }
--parellel-jobs=${_JOBS/-j}

On 6 January 2014 04:10, SpinFlo <sl1pkn07 at gmail.com> wrote:
> MAKEFLAGS in makepkg.conf is disabled (#) by default. add makeflags
> variable like "--parellel-jobs=${MAKEFLAGS/-j}" in PKGBUILD only gets
> errors (or not work).

And our workaround would grow to accommodate that (while still keeping
it simple, i.e. no sed magic):

_JOBS=${MAKEFLAGS// }
_JOBS=${_JOBS/-j}
--parellel-jobs=${_JOBS:-1}

If this looks nasty, it is. The point is, again, how often do we need
to do this, right now? Is it an expected future use case, for sure?

> about waf, yes, can use JOBS or --parellel-jobs, but if you test
> with/without these options, without options waf use all thread available in
> the system (for example in my system is 8 threads), if set JOBS or
> --parellel-jobs with all thread available (8) have the same result.

That's good news, then, and your English is just fine.

> sorry my english


--
GPG/PGP ID: C0711BF1


More information about the arch-general mailing list