[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug #49844] 'make -j' without explicit process count sometimes does

From: Paul Smith
Subject: Re: [bug #49844] 'make -j' without explicit process count sometimes doesn't parallelize
Date: Thu, 22 Jun 2017 08:10:37 -0400

On Thu, 2017-06-22 at 13:01 +0100, Sven C. Dack wrote:
> You either have to restrict the number of jobs by giving an explicit 
> count or by limiting it with a load average ( -l option) or use 
> non-numerical make targets such as "t1 t2 t3 ..." or simply add another 
> flag after -j to make.

> $ seq 1000 | xargs -n1000 make -j -C .
> which results in:
> $ make -j -C . 1 2 3 ...

GNU make, as with all GNU tools (and with all well-formed POSIX
commands) accepts the "--" option to mean "everything after this is not
an option even if it looks like one".

So, the simplest solution is to use:

  seq 1000 | xargs -n1000 make j --

I don't really understand why you use the pipe to xargs.  Wouldn't it be
simpler to just say:

  make -j -- $(seq 1000)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]