bug-make
[Top][All Lists]
Advanced

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

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


From: Sven C. Dack
Subject: Re: [bug #49844] 'make -j' without explicit process count sometimes doesn't parallelize
Date: Thu, 22 Jun 2017 13:22:55 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

Hello Paul,

I was thinking of "--", but didn't test it, because it isn't being mentioned in the man page nor in the info page.

Cheers



On 22/06/17 13:10, Paul Smith wrote:
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)

?

_______________________________________________
Bug-make mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/bug-make




reply via email to

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