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

Re: Problem with make -j xxx



Hi,
>>"Brederlow" == Brederlow  <goswin.brederlow@student.uni-tuebingen.de> writes:

 Brederlow> I run into several problems using
 >> make -j 5
 Brederlow> to compile packages. make doesn't fork multiple gcc's.
 >> make -j
 Brederlow> on the other hand works as expected, but forks far to
 Brederlow> often.

 Brederlow> I'm now wondering if that behaviour is a problem with the
 Brederlow> makefiles or with make itself.

 Brederlow> Can anybody help out there?


	Are you executing a lot in a subdir? That sounds like the
 description in the info pages.

======================================================================
File: make.info,  Node: Options/Recursion,  Next: -w Option,  Prev: Variables/R\
ecursion,  Up: Recursion

Communicating Options to a Sub-`make'
-------------------------------------

   The `-j' option is a special case (*note Parallel Execution:
Parallel.).  If you set it to some numeric value, `-j 1' is always put
into `MAKEFLAGS' instead of the value you specified.  This is because if
the `-j' option were passed down to sub-`make's, you would get many
more jobs running in parallel than you asked for.  If you give `-j'
with no numeric argument, meaning to run as many jobs as possible in
parallel, this is passed down, since multiple infinities are no more
than one.
======================================================================

	Most people just look at the following:
======================================================================
   If the `-j' option is followed by an integer, this is the number of
commands to execute at once; this is called the number of "job slots".
If there is nothing looking like an integer after the `-j' option,
there is no limit on the number of job slots.  The default number of job
slots is one, which means serial execution (one thing at a time).
======================================================================


	manoj
-- 
 "He's the kind of man for the times that need the kind of man he is
 ..."
Manoj Srivastava  <srivasta@acm.org> <http://www.datasync.com/%7Esrivasta/>
Key C7261095 fingerprint = CB D9 F4 12 68 07 E4 05  CC 2D 27 12 1D F5 E8 6E


Reply to: