help-make
[Top][All Lists]
Advanced

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

Re: warning with recursive gmakes and -j<integer> option


From: Paul D. Smith
Subject: Re: warning with recursive gmakes and -j<integer> option
Date: Tue, 12 Jun 2001 00:04:26 -0400

%% "Asperheim, Eric" <address@hidden> writes:

  ae> 1. There seems to be some issue when using recursive gmakes in
  ae>    parallel (-j switch) with a limit on the parallelism (-j
  ae>    <integer>). If I use just the -j option (no integer - unlimited
  ae>    parallelism), I get the following (test case has 3 targets:
  ae>    a.db, b.db, and c.db)

First, please always remember to mention the version of GNU make you're
using and the type of system you're using it on.

If you're not using the latest (3.79.1), please upgrade and try that
first.

  ae> But if I supply an integer to the -j option, I get 
  ae>   warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.

  ae> I read about this warning in the gmake docs. I don't know why the
  ae> parent gmake wouldn't know that a child is a gmake with -j10
  ae> option and it would know the child is a gmake with -j option.

If you use -j with no arguments, then no jobserver is actually used.

Since -j means "start as many as you want", there's no reason for the
different makes to communicate how many jobs they have started, and thus
no need for the jobserver.  Every make simply spawns as many children as
it can, given the constraints of the makefile.

That's the difference.

  ae> I'm using the (MAKE) variable to launch the child gmake:

  ae> # @ $(MAKE) $(DB)$(notdir $@) -C $(subst $(DB)$(notdir $@),,$@)
  ae>   +@ cd $(subst $(DB)$(notdir $@),,$@) && $(MAKE) $(DB)$(notdir $@)

Both of these look fine to me, as they stand, but without seeing the
full context it's hard to say for sure.

Can you provide me with the _complete_ example makefile (assuming it's
not too large) that reproduces the problem?

  ae> I've tried both forms (with cd and -C option) and neither works. 

Neither of these will have any effect whatever on this warning: it has
nothing to do with whether you use -C or cd.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://www.paulandlesley.org/gmake/
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist



reply via email to

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